motif64

m64_7796c3cb05e5 / human/index.html

56 lines, 3.7 KBraw
1<!doctype html>2<html lang="en">3<meta charset="utf-8">4<meta name="viewport" content="width=device-width, initial-scale=1">5<title>opencode terminal · DeepSeek V4.1 Flash</title>6<style>7  :root { color-scheme: light dark; --fg: #1d1d1f; --bg: #f6f5f2; --muted: #6b6b70; --line: #d8d6d0; --accent: #0f766e; --code: #efede8; }8  @media (prefers-color-scheme: dark) { :root { --fg: #ecebe8; --bg: #161616; --muted: #9a9a9f; --line: #333; --accent: #2dd4bf; --code: #262626; } }9  * { box-sizing: border-box; }10  body { margin: 0; padding: 24px 16px; font: 15px/1.45 system-ui, sans-serif; color: var(--fg); background: var(--bg); }11  main { max-width: 720px; margin: 0 auto; }12  h1 { font-size: 20px; margin: 0 0 4px; }13  .sub { color: var(--muted); margin: 0 0 16px; font-size: 13px; }14  a { color: var(--accent); }15  code { background: var(--code); border-radius: 4px; padding: 0 4px; font-size: 13px; }16  .open { display: block; margin: 8px 0 20px; padding: 22px 18px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 20px; font-weight: 600; text-decoration: none; text-align: center; }17  @media (prefers-color-scheme: dark) { .open { color: #0b1f1d; } }18  .open small { display: block; font-weight: 400; font-size: 12px; opacity: .85; margin-top: 4px; overflow-wrap: anywhere; }19  ul { padding-left: 20px; margin: 8px 0; }20  li { margin: 4px 0; }21  .note { color: var(--muted); font-size: 13px; margin: 14px 0 0; border-top: 1px solid var(--line); padding-top: 10px; }22</style>23<main>24  <h1>opencode, in a terminal tab</h1>25  <p class="sub">opencode 1.18.23 on DeepSeek V4.1 Flash via OpenRouter, running in this capsule's sandbox. <span id="phase">checking…</span> · API: <a href="../agent">/agent</a></p>2627  <a id="open" class="open" href="#">Open the opencode terminal<small id="open-url">finding the app port…</small></a>2829  <ul>30    <li>The terminal is opencode's own TUI inside a tmux session. Closing the tab doesn't end it: open the link again (from any device) and you are back where you left off. Quitting opencode (<code>ctrl+c</code> twice, or <code>/exit</code>) ends it; the next visit starts a fresh one.</li>31    <li>Everything runs in the sandbox: opencode, its files (in <code>/scratch/work</code>) and every command it runs. It reaches the public internet (it needs openrouter.ai, so it is served with <code>--allow-external-network</code>), never your LAN or tailnet, and the OpenRouter key stays in the m64 gate; the container never holds it.</li>32    <li>There is no token on the tailnet: anyone on your tailnet can open this terminal.</li>33  </ul>3435  <p class="note">Other ways to use opencode with this model: the web UI capsule <code>opencode-dsflash-openrouter-gb10</code>, which you can also drive from your own terminal with <code>opencode attach</code>; or <code>deepseek-flash-openrouter-gb10</code>, a model-only endpoint for opencode running on your own machine with your own files.</p>36</main>37<script>38const $ = (id) => document.getElementById(id);39// The app port's URL: its port from /status (app_url), on the host this page was opened40// with (an IP or a MagicDNS name alike); without app_url, this port + 1.41async function appUrl() {42  let port = null;43  try {44    const s = await (await fetch("../status")).json();45    $("phase").textContent = s.phase === "ready" ? "ready" : s.phase + (s.detail ? " (" + s.detail + ")" : "");46    if (s.app_url) port = new URL(s.app_url).port;47  } catch (e) { $("phase").textContent = "status unavailable"; }48  if (!port) port = String(Number(location.port || (location.protocol === "https:" ? 443 : 80)) + 1);49  return location.protocol + "//" + location.hostname.replace(/^([^\[].*:.*)$/, "[$1]") + ":" + port + "/";50}51appUrl().then((url) => {52  $("open").href = url;53  $("open-url").textContent = url;54});55</script>56</html>