Skip to content
This repository was archived by the owner on May 14, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="worker-url" content="https://grok-install-api.jani-starck2.workers.dev">
<meta name="worker-url" content="https://grok-install.jani-starck2.workers.dev">
<title>grok-install — Owner dashboard</title>
<meta name="description" content="Manage your minted grok-install agents. Limits, memory, settings, and history — all under your X handle.">
<meta property="og:type" content="website">
Expand Down Expand Up @@ -1080,7 +1080,7 @@ <h2>History</h2>

<script>
// === grok-install dashboard ===
const WORKER_URL = "https://grok-install-api.jani-starck2.workers.dev";
const WORKER_URL = "https://grok-install.jani-starck2.workers.dev";

const _qs = new URLSearchParams(window.location.search);
const SESSION_ID = _qs.get('session');
Expand Down
42 changes: 28 additions & 14 deletions safe-agent-builder.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="worker-url" content="https://grok-install-api.jani-starck2.workers.dev">
<meta name="worker-url" content="https://grok-install.jani-starck2.workers.dev">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>grok-install — Build a Safe AI Agent in 60 seconds</title>
<meta name="description" content="Build a safe AI agent that lives on X. Mint your agent in 60 seconds — 100% yours, Apache 2.0, billed via your xAI credits.">
Expand Down Expand Up @@ -3288,7 +3288,7 @@ <h2>Mint an AI from <span class="gradient">your signal</span></h2>
<div class="dna-overlay" role="dialog" aria-label="Sign in to see your Voice DNA">
<h3>Sign in with X to see your Voice DNA</h3>
<p>We read your bio and recent posts to extract your voice traits, domains, and vibe — then mirror them in your agent. Read-only access. No posts on your behalf, ever.</p>
<a class="btn-signin-overlay btn-signin" href="https://grok-install-api.jani-starck2.workers.dev/auth/x/start" data-bypass-js="1">Sign in with X (read-only)</a>
<a class="btn-signin-overlay btn-signin" href="https://grok-install.jani-starck2.workers.dev/auth/x/start" data-bypass-js="1">Sign in with X (read-only)</a>
<p style="font-size: 11px; color: var(--text-faint); font-family: var(--mono);">The card below is a placeholder until you sign in.</p>
</div>
<div class="dna-header">
Expand Down Expand Up @@ -3948,7 +3948,7 @@ <h2 id="tm-title" class="tm-title">SECURITY CHECKED</h2>

<script>
// === grok-install Worker wiring (injected by Phase 8) ===
const WORKER_URL = "https://grok-install-api.jani-starck2.workers.dev";
const WORKER_URL = "https://grok-install.jani-starck2.workers.dev";

const _qs = new URLSearchParams(window.location.search);
const _qsSession = _qs.get('session');
Expand Down Expand Up @@ -4262,10 +4262,11 @@ <h2 id="tm-title" class="tm-title">SECURITY CHECKED</h2>
}

const copyTweetBtn = document.getElementById('mint-copy-tweet');
copyTweetBtn.addEventListener('click', () => copyTo(copyTweetBtn, tweet, 'Copy tweet', 'mint-tweet-text'));
if (copyTweetBtn) copyTweetBtn.addEventListener('click', () => copyTo(copyTweetBtn, tweet, 'Copy tweet', 'mint-tweet-text'));
const copyCommentBtn = document.getElementById('mint-copy-comment');
copyCommentBtn.addEventListener('click', () => copyTo(copyCommentBtn, comment, 'Copy install comment', 'mint-install-text'));
document.getElementById('mint-close').addEventListener('click', close);
if (copyCommentBtn) copyCommentBtn.addEventListener('click', () => copyTo(copyCommentBtn, comment, 'Copy install comment', 'mint-install-text'));
const mintCloseBtn = document.getElementById('mint-close');
if (mintCloseBtn) mintCloseBtn.addEventListener('click', close);

const initial = document.getElementById('mint-intent') || copyTweetBtn;
if (initial) initial.focus();
Expand Down Expand Up @@ -4295,6 +4296,7 @@ <h2 id="tm-title" class="tm-title">SECURITY CHECKED</h2>
const retryCounter = overlay.querySelector('#mc-retry-counter');
const retryBtn = overlay.querySelector('#mc-retry');
const bar = overlay.querySelector('#mc-bar');
if (!counter || !retryCounter || !retryBtn || !bar) return;
const tick = setInterval(() => {
remaining -= 1;
if (remaining <= 0) {
Expand All @@ -4321,7 +4323,8 @@ <h2 id="tm-title" class="tm-title">SECURITY CHECKED</h2>
}
function onKey(e) { if (e.key === 'Escape') { e.preventDefault(); close(); } }
document.addEventListener('keydown', onKey);
overlay.querySelector('#mc-close').addEventListener('click', close);
const mcCloseBtn = overlay.querySelector('#mc-close');
if (mcCloseBtn) mcCloseBtn.addEventListener('click', close);
retryBtn.addEventListener('click', () => {
if (retryBtn.disabled) return;
close();
Expand Down Expand Up @@ -4368,12 +4371,16 @@ <h2 id="tm-title" class="tm-title">SECURITY CHECKED</h2>
function onKey(e) { if (e.key === 'Escape') { e.preventDefault(); close(); } }
document.addEventListener('keydown', onKey);
overlay.addEventListener('click', (e) => { if (e.target === overlay) close(); });
document.getElementById('me-close').addEventListener('click', close);
const meCloseBtn = document.getElementById('me-close');
if (meCloseBtn) meCloseBtn.addEventListener('click', close);
if (retry) {
document.getElementById('me-retry').addEventListener('click', () => { close(); retry(); });
document.getElementById('me-retry').focus();
} else {
document.getElementById('me-close').focus();
const meRetryBtn = document.getElementById('me-retry');
if (meRetryBtn) {
meRetryBtn.addEventListener('click', () => { close(); retry(); });
meRetryBtn.focus();
}
} else if (meCloseBtn) {
meCloseBtn.focus();
}
}

Expand Down Expand Up @@ -4599,7 +4606,7 @@ <h2 id="tm-title" class="tm-title">SECURITY CHECKED</h2>

// Step 3: pick a mascot at random from the 8 styles.
setQmStep('mascot', 'active');
const mascotStyles = ['cyberpunk_neon','retro_pixel','liquid_gold','crystal_glass','spectrum_glitch','linework_ink','specimen_plate','terra_glyph'];
const mascotStyles = Object.keys(MASCOT_GRADIENTS);
const mascotStyle = mascotStyles[Math.floor(Math.random() * mascotStyles.length)];
await qmWait(520);
setQmStep('mascot', 'done');
Expand Down Expand Up @@ -4656,6 +4663,9 @@ <h2 id="tm-title" class="tm-title">SECURITY CHECKED</h2>
setQmStep('mint', 'error');
setTimeout(closeCheckingOverlay, 1500);
try { localStorage.removeItem(QUICK_MINT_FLAG); } catch {}
if (typeof showMintError === 'function') {
showMintError({ status: 0, body: { error: e && e.message ? e.message : 'Network error' }, retry: () => runQuickMintFlow() });
}
return;
}

Expand All @@ -4682,7 +4692,9 @@ <h2 id="tm-title" class="tm-title">SECURITY CHECKED</h2>
setQmStep('mint', 'error');
setTimeout(closeCheckingOverlay, 1600);
try { localStorage.removeItem(QUICK_MINT_FLAG); } catch {}
if (typeof showMintError === 'function') showMintError(r);
if (typeof showMintError === 'function') {
showMintError({ status: r.status, body: r.body, retry: () => runQuickMintFlow(), retryAfter: r.retryAfter });
}
}

(async function init() {
Expand Down Expand Up @@ -4998,6 +5010,7 @@ <h3 class="lt-title" id="lt-title">Chat with your future agent</h3>

renderThread() {
const el = document.getElementById('lt-thread');
if (!el) return;
if (this.thread.length === 0) {
el.innerHTML = '<div class="lt-empty">Send a message to start the conversation. Your agent replies in your voice.<br>Nothing posts to X — this is a private dry run.</div>';
return;
Expand Down Expand Up @@ -5029,6 +5042,7 @@ <h3 class="lt-title" id="lt-title">Chat with your future agent</h3>
domains[1] ? ('A friend asks for advice about ' + domains[1] + ' — what do you say?') : 'Sum up your point of view in one sentence',
];
const el = document.getElementById('lt-suggestions');
if (!el) return;
el.innerHTML = (this.thread.length === 0)
? sugs.map(s => '<button class="lt-sug" type="button" data-sug="' + escapeHtmlBuilder(s).replace(/"/g, '&quot;') + '">' + escapeHtmlBuilder(s) + '</button>').join('')
: '';
Expand Down
2 changes: 1 addition & 1 deletion wrangler.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = "grok-install-api"
name = "grok-install"
main = "worker/src/index.js"
compatibility_date = "2026-04-28"
compatibility_flags = ["nodejs_compat"]
Expand Down
Loading