booth: actionable 'bring it online' instance modal (0.55.0)
- the instance-created modal was a terse field list; now it's a 2-step
broker onboarding guide at the point of need:
1. Heartbeat — a copy-pasteable curl loop (real instance id + accesskey)
that keeps the instance online (<30s check-in, verified from the API)
2. Relay — the broker WebSocket + note that the amerc webagent speaks it
- color-coded offline status, code block with copy button
- removes the supply-side last-mile guesswork for publishers
- verified end-to-end via the real publish flow (register → class → instance)
This commit is contained in:
parent
22719be3c8
commit
a614b17e05
@ -4,7 +4,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<meta name="theme-color" content="#0e0a14" />
|
<meta name="theme-color" content="#0e0a14" />
|
||||||
<meta name="description" content="amerc is the agent mercenary tavern — hire, run, publish, and remotely deliver AI agents across software boundaries. No infrastructure, just skills." />
|
<meta name="description" content="amerc is the agent mercenary tavern — hire, run, publish, and remotely deliver AI agents across software boundaries. No infrastructure, just skills." />
|
||||||
<meta name="version" content="0.54.0-discover" />
|
<meta name="version" content="0.55.0-broker" />
|
||||||
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
||||||
<link rel="icon" href="/app-192.png" type="image/png" sizes="192x192" />
|
<link rel="icon" href="/app-192.png" type="image/png" sizes="192x192" />
|
||||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "amerc-site",
|
"name": "amerc-site",
|
||||||
"version": "0.54.0-discover",
|
"version": "0.55.0-broker",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@ -308,17 +308,27 @@ export function BoothDashboard({ auth, setRoute }) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<KeysCard />
|
<KeysCard />
|
||||||
{newInst && (
|
{newInst && (() => {
|
||||||
<div className="ap-modal" onClick={() => setNewInst(null)}>
|
const hb = `while true; do curl -s -XPOST https://amerc.ai/api/agents/instances/${newInst.id}/heartbeat -H 'content-type: application/json' -d '{"accesskey":"${newInst.accesskey}","status":"online","broker":"my-broker"}' >/dev/null; sleep 10; done`;
|
||||||
<div className="ap-modal-box" onClick={(e) => e.stopPropagation()}>
|
return (
|
||||||
<div className="ap-modal-head"><h3>Instance #{newInst.id} created</h3><button onClick={() => setNewInst(null)}>✕</button></div>
|
<div className="ap-modal" onClick={() => setNewInst(null)}>
|
||||||
<p className="ap-hint">Run your broker against this instance, then it shows online. The accesskey is the relay token.</p>
|
<div className="ap-modal-box" onClick={(e) => e.stopPropagation()}>
|
||||||
<label className="ap-field">accesskey<code className="ap-token" onClick={() => copyToast(newInst.accesskey)}>{newInst.accesskey} ⧉</code></label>
|
<div className="ap-modal-head"><h3>Instance #{newInst.id} — bring it online</h3><button onClick={() => setNewInst(null)}>✕</button></div>
|
||||||
<label className="ap-field">broker WS<code className="ap-token" onClick={() => copyToast(newInst.relayWs)}>{newInst.relayWs} ⧉</code></label>
|
<p className="ap-hint">Registered, but <b style={{ color: '#ff9f5a' }}>offline</b> until a broker checks in. Two steps bring it to life:</p>
|
||||||
<label className="ap-field">heartbeat<code className="ap-token">POST /api/agents/instances/{newInst.id}/heartbeat {'{'}accesskey,broker,tui{'}'}</code></label>
|
<ol className="ap-steps">
|
||||||
|
<li><b>Heartbeat</b> — keeps it marked online (check in every <30s). Paste this anywhere with <code>curl</code>:
|
||||||
|
<div className="ap-codeblock"><code>{hb}</code><button className="px-action" onClick={() => copyToast(hb, 'Heartbeat loop copied')}>copy</button></div>
|
||||||
|
</li>
|
||||||
|
<li><b>Relay</b> — bridge your agent so live sessions reach it, over the broker WebSocket:
|
||||||
|
<code className="ap-token" onClick={() => copyToast(newInst.relayWs)}>{newInst.relayWs} ⧉</code>
|
||||||
|
<span className="ap-hint">The amerc webagent broker speaks this relay for you — point it at the accesskey below.</span>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
<label className="ap-field">accesskey · your broker's secret<code className="ap-token" onClick={() => copyToast(newInst.accesskey)}>{newInst.accesskey} ⧉</code></label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
);
|
||||||
)}
|
})()}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import Account from './Account.jsx';
|
|||||||
import TavernGame from './TavernGame.jsx';
|
import TavernGame from './TavernGame.jsx';
|
||||||
import { api } from './api.js';
|
import { api } from './api.js';
|
||||||
|
|
||||||
const RELEASE = '0.54.0-discover';
|
const RELEASE = '0.55.0-broker';
|
||||||
|
|
||||||
const NAV = [
|
const NAV = [
|
||||||
{ id: 'home', label: 'Tavern' },
|
{ id: 'home', label: 'Tavern' },
|
||||||
|
|||||||
@ -1393,3 +1393,12 @@ button {
|
|||||||
.px-ver:hover { color: var(--cyan); }
|
.px-ver:hover { color: var(--cyan); }
|
||||||
.ft-status { font-family: inherit; cursor: pointer; transition: border-color .15s, transform .15s; }
|
.ft-status { font-family: inherit; cursor: pointer; transition: border-color .15s, transform .15s; }
|
||||||
.ft-status:hover { transform: translateY(-1px); border-color: rgba(54,240,176,0.6); }
|
.ft-status:hover { transform: translateY(-1px); border-color: rgba(54,240,176,0.6); }
|
||||||
|
|
||||||
|
/* booth "bring it online" instance modal (0.55) */
|
||||||
|
.ap-steps { margin: 4px 0 14px; padding-left: 20px; display: flex; flex-direction: column; gap: 13px; }
|
||||||
|
.ap-steps li { color: #d6ccec; font-size: 13px; line-height: 1.6; }
|
||||||
|
.ap-steps li b { color: #fff; }
|
||||||
|
.ap-steps li > code { background: #07060c; color: #7fe9ff; padding: 1px 5px; border-radius: 4px; font-size: 11.5px; }
|
||||||
|
.ap-codeblock { display: flex; align-items: center; gap: 8px; margin-top: 7px; background: #07060c; border: 1px solid #241a36; border-radius: 8px; padding: 8px 10px; }
|
||||||
|
.ap-codeblock code { flex: 1; color: #7fe9ff; font-family: ui-monospace, monospace; font-size: 11px; line-height: 1.5; word-break: break-all; white-space: pre-wrap; background: none; padding: 0; }
|
||||||
|
.ap-codeblock .px-action { flex: 0 0 auto; }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user