Computer use CLI for AI agents
Rust accessibilityaccessibility-apiai-agentsautomationclicomputer-usecomputer-use-agentcomputer-use-agentsdesktop-automationmacosmcprust
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>A re-drill replaces one region's refs</title>
<script>
var t = new URLSearchParams(location.search).get("theme");
if (t === "light" || t === "dark") document.documentElement.setAttribute("data-theme", t);
if (window.self === window.top) document.documentElement.setAttribute("data-top", "");
</script>
<style>
:root {
color-scheme: dark;
--bg: #000; --panel: #0a0a0a; --node: #111; --border: #5c5c5c;
--fg: #ededed; --muted: #8f8f8f; --line: #8f8f8f; --line-strong: #ededed;
--hl-fill: #0a2a5e; --hl-ring: #1e5fd6; --hl-icon: #cfe0ff;
}
@media (prefers-color-scheme: light) {
:root:not([data-theme]) {
color-scheme: light;
--bg: #fff; --panel: #fafafa; --node: #fff; --border: #b8b8b8;
--fg: #171717; --muted: #666; --line: #7a7a7a; --line-strong: #171717;
--hl-fill: #dbe8ff; --hl-ring: #2563eb; --hl-icon: #1d4ed8;
}
}
:root[data-theme="light"] {
color-scheme: light;
--bg: #fff; --panel: #fafafa; --node: #fff; --border: #b8b8b8;
--fg: #171717; --muted: #666; --line: #7a7a7a; --line-strong: #171717;
--hl-fill: #dbe8ff; --hl-ring: #2563eb; --hl-icon: #1d4ed8;
}
html, body { margin: 0; background: transparent; }
:root[data-top], :root[data-top] body { background: var(--bg); }
svg { display: block; width: 100%; height: auto; font-family: Geist, "Geist Sans", system-ui, -apple-system, "Segoe UI", sans-serif; }
.box { fill: var(--panel); stroke: var(--border); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.node { fill: var(--node); }
.label.dim { fill: var(--muted); }
.label { fill: var(--fg); font-size: 15px; text-anchor: middle; }
.sub { fill: var(--muted); font-size: 11.5px; text-anchor: middle; }
.head { fill: var(--fg); font-size: 16px; font-weight: 500; }
.tag { fill: var(--muted); font-size: 12.5px; text-anchor: middle; }
.wire { fill: none; stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; marker-end: url(#arrow); }
.wire.strong { stroke: var(--line-strong); }
.icon { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.icon.fg { stroke: var(--fg); }
.hl { fill: var(--hl-fill); stroke: var(--hl-ring); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hl-icon { fill: none; stroke: var(--hl-icon); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
#arrow path { fill: none; stroke: var(--line); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.ico { fill: var(--muted); }
.ico.fg { fill: var(--fg); }
.hl-ico { fill: var(--hl-icon); }
</style>
</head>
<body>
<svg viewBox="0 0 720 400" role="img" aria-labelledby="t d">
<title id="t">A re-drill replaces one region's refs</title>
<desc id="d">One RefMap belongs to snapshot s2txcl95uvubmn. It holds the skeleton refs e1 and e2, the refs e3 to e33 from a drill of e1, and refs from drills of other roots. Running snapshot --root on e1 again calls remove_by_root_ref, which removes e3 to e33, then allocates e34 to e64 from the same counter. The skeleton refs, including e1 itself, and the refs of other regions stay valid. The old e3 to e33 now return STALE_REF.</desc>
<defs>
<marker id="arrow" viewBox="0 0 8 8" refX="6" refY="4" markerWidth="8" markerHeight="8" markerUnits="userSpaceOnUse" orient="auto">
<path d="M1.5 1.5 L5.5 4 L1.5 6.5"/>
</marker>
</defs>
<path class="wire strong" d="M360 70V126"/>
<circle class="hl" cx="360" cy="38" r="30"/>
<svg class="hl-ico" x="349" y="27" width="22" height="22" viewBox="0 0 16 16"><path d="M2.73 6.42A5.5 5.5 0 0 1 12.84 5.4l.36.66 1.32-.72-.36-.66A7 7 0 0 0 1.5 5.4V3H0v4.17c0 .42.34.75.75.75h4.18v-1.5h-2.2m10.54 3.16h-2.2v-1.5h4.18c.41 0 .75.33.75.75V13h-1.5v-2.39a7 7 0 0 1-12.64.75l-.36-.66 1.31-.72.36.66a5.5 5.5 0 0 0 10.1-1.06" fill-rule="evenodd" clip-rule="evenodd"/></svg>
<text class="label" style="text-anchor:start" x="402" y="34">snapshot --root @s2txcl95uvubmn:e1</text>
<text class="sub" style="text-anchor:start" x="402" y="51">re-drill after an action</text>
<rect class="box" x="8" y="84" width="704" height="308" rx="8" style="fill:none"/>
<svg class="ico fg" x="28" y="99" width="20" height="20" viewBox="0 0 16 16"><path d="M1.5 3.5h13v2h-13zM1 7H0V2h16v5h-1v5.5a2.5 2.5 0 0 1-2.5 2.5h-9A2.5 2.5 0 0 1 1 12.5zm1.5 0v5.5a1 1 0 0 0 1 1h9a1 1 0 0 0 1-1V7zM6 9.5h4V11H6z" fill-rule="evenodd" clip-rule="evenodd"/></svg>
<text class="head" x="58" y="114">RefMap for snapshot s2txcl95uvubmn</text>
<rect class="box" x="28" y="132" width="200" height="240" rx="8"/>
<svg class="ico" x="44" y="147" width="18" height="18" viewBox="0 0 16 16"><path d="M9 2h6v1.5H9zm0 10h6v1.5H9zm.75-5H9v1.5h6V7H9.75M1 12h2v1.5H1zm.75-10H1v1.5h2V2H1.75M1 7h2v1.5H1zm4.75 5H5v1.5h2V12H5.75M5 2h2v1.5H5zm.75 5H5v1.5h2V7H5.75" fill-rule="evenodd" clip-rule="evenodd"/></svg>
<text class="head" x="70" y="160">skeleton</text>
<text class="sub" style="text-anchor:start" x="70" y="178">no root_ref</text>
<rect class="box node" x="44" y="246" width="168" height="60" rx="6"/>
<text class="label" x="128" y="270">@e1, @e2</text>
<text class="sub" x="128" y="287">kept, e1 included</text>
<rect class="box" x="260" y="132" width="200" height="240" rx="8"/>
<svg class="ico" x="276" y="147" width="18" height="18" viewBox="0 0 16 16"><path d="M13.5 4v2h-11V2.5H6l1.33 1q.68.49 1.5.5zM1 6V1h5.17a1 1 0 0 1 .6.2l1.46 1.1a1 1 0 0 0 .6.2H15V6h1l-.17 1.5-.58 5.28A2.5 2.5 0 0 1 12.76 15H3.24a2.5 2.5 0 0 1-2.49-2.22L.17 7.5 0 6zm13 1.5H1.68l.56 5.11a1 1 0 0 0 1 .89h9.52a1 1 0 0 0 1-.89l.56-5.11z" fill-rule="evenodd" clip-rule="evenodd"/></svg>
<text class="head" x="302" y="160">drill of @e1</text>
<text class="sub" style="text-anchor:start" x="302" y="178">root_ref: @e1</text>
<rect class="box node" x="276" y="192" width="168" height="60" rx="6"/>
<text class="label dim" x="360" y="216">@e3 … @e33</text>
<text class="sub" x="360" y="233">removed: STALE_REF</text>
<path class="wire strong" d="M300 258V290"/>
<text class="tag" style="text-anchor:start" x="310" y="279">remove_by_root_ref</text>
<rect class="box node" x="276" y="296" width="168" height="60" rx="6"/>
<text class="label" x="360" y="320">@e34 … @e64</text>
<text class="sub" x="360" y="337">new ids, counter continues</text>
<rect class="box" x="492" y="132" width="200" height="240" rx="8"/>
<svg class="ico" x="508" y="147" width="18" height="18" viewBox="0 0 16 16"><path d="m8.35.34 6.25 3.25.4.2v8.42l-.4.2-6.25 3.26-.35.18-.35-.18-6.25-3.25-.4-.21V3.8l.4-.21L7.65.34 8 .15zM2.5 11.3l4.75 2.46V7.81L2.5 5.44zM8.75 7.8v5.95l4.75-2.46V5.44zM3.42 4.22 8 6.52l4.58-2.3L8 1.85z"/></svg>
<text class="head" x="534" y="160">other regions</text>
<text class="sub" style="text-anchor:start" x="534" y="178">root_ref: another ref</text>
<rect class="box node" x="508" y="246" width="168" height="60" rx="6"/>
<text class="label" x="592" y="270">their refs</text>
<text class="sub" x="592" y="287">kept, still valid</text>
</svg>
</body>
</html>