memfork 0.3.0

Git for agent memory, shared by every AI tool on your machine: fork, merge, rewind and hand off work between agents over MCP.
Documentation
/* The Brain. Pitch black, structure from space, type and colour: no cards,
   no borders, no dividers. Every colour-coded state also has a word. */
:root {
  --bg: #000;
  --panel: #070b14;
  --sheet: #04070e;
  --txt: #e6edf3;
  --sub: #9eb3c2;
  --dim: #1c7293;
  --ac: #3ddc97;
  --am: #f2b866;
  --bl: #7fd1e8;
  --vi: #b39dff;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
/* The light theme is an accessibility toggle, never a default. */
:root[data-theme="light"] {
  --bg: #ffffff;
  --panel: #f1f4f8;
  --sheet: #f6f8fb;
  --txt: #0b1420;
  --sub: #3f5566;
  --dim: #2b6f8a;
  --ac: #0f8f5c;
  --am: #9a5f00;
  --bl: #0f6e8c;
  --vi: #5a44c4;
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--txt);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}
body { padding: 0 clamp(16px, 3vw, 48px) 40px; overflow-x: hidden; }
.mono, code { font-family: ui-monospace, Consolas, "Cascadia Mono", Menlo, monospace; }
code { font-size: .92em; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.icon { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dim { color: var(--dim); }
.sub { color: var(--sub); }
.fresh, .ac { color: var(--ac); }
.stale, .am { color: var(--am); }
.cl { color: var(--bl); }
.vi { color: var(--vi); }

/* Header */
header { display: flex; align-items: center; gap: 18px; min-height: 68px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 21px; }
.brand b { color: var(--ac); font-weight: 600; }
.brand-sub { color: var(--dim); font-weight: 400; font-size: 15px; margin-left: 6px; }
.mark-frame { fill: none; stroke: var(--txt); stroke-width: 14; stroke-linecap: round; }
.mark-fork { fill: none; stroke: var(--ac); stroke-width: 14; stroke-linecap: round; }
.mark-dots { fill: var(--ac); }
.search { flex: 1; min-width: 220px; max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 10px; color: var(--sub); }
.search input { flex: 1; min-width: 0; background: var(--panel); border: 0; color: var(--txt); font: inherit; padding: 9px 14px; border-radius: 22px; outline: 0; }
.search input:focus { box-shadow: 0 0 0 2px var(--dim); }
.status { display: flex; align-items: center; gap: 8px; color: var(--txt); white-space: nowrap; }
.pick select { background: var(--bg); color: var(--sub); border: 0; font: inherit; padding: 4px 2px; cursor: pointer; max-width: 160px; }
.pick.dim select { color: var(--dim); }
.pick select:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; border-radius: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ac); }
.dot.off { background: var(--dim); }
.dot.wait { background: var(--am); }

/* The stopped and no-token notices */
.stopped { background: var(--panel); color: var(--sub); padding: 12px 16px; border-radius: 12px; margin-top: 12px; font-size: 14px; }
.stopped b { color: var(--am); }
.stopped code { color: var(--txt); }

/* Headline */
.hero { display: flex; align-items: baseline; gap: 28px; flex-wrap: wrap; margin-top: 10px; }
.hero h1 { font-size: clamp(22px, 3.4vw, 40px); font-weight: 600; font-variant-numeric: tabular-nums; }
.hero .kpi { display: flex; gap: 26px; color: var(--sub); font-size: 15px; flex-wrap: wrap; }
.kpi b { color: var(--txt); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Lenses */
.lens { display: flex; gap: 22px; margin-top: 22px; color: var(--sub); font-size: 14px; align-items: center; flex-wrap: wrap; }
.lens button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0 0 8px; position: relative; }
.lens button.on { color: var(--txt); font-weight: 600; }
.lens button.on::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 5px; height: 5px; border-radius: 50%; background: var(--ac); transform: translateX(-50%); }
.lens .r { margin-left: auto; font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }

/* The graph */
#stage { position: relative; height: min(54vh, 500px); margin-top: 6px; outline: 0; }
#stage:focus-visible { box-shadow: 0 0 0 2px var(--dim); border-radius: 10px; }
#stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tip { position: absolute; pointer-events: none; background: var(--panel); padding: 8px 12px; border-radius: 10px; font-size: 13px; opacity: 0; transition: opacity 120ms; max-width: 320px; z-index: 3; }
.tip.on { opacity: 1; }
.tip .k { color: var(--sub); font-size: 12px; }
.tip b { display: block; color: var(--txt); font-weight: 500; overflow-wrap: anywhere; }
.narrow-note { position: absolute; left: 0; bottom: 0; font-size: 12px; color: var(--dim); }

/* Time travel */
.tl { display: flex; align-items: center; gap: 12px; margin-top: 6px; color: var(--dim); font-size: 13px; }
.tl .icon { width: 15px; height: 15px; }
.tl input { flex: 1; min-width: 0; appearance: none; height: 2px; background: linear-gradient(to right, var(--ac) var(--p, 100%), var(--dim) var(--p, 100%)); outline: 0; }
.tl input::-webkit-slider-thumb { appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--ac); cursor: pointer; }
.tl input::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--ac); cursor: pointer; }
.tl input:focus-visible { box-shadow: 0 0 0 2px var(--dim); }
.tl .past { color: var(--ac); min-width: 230px; text-align: center; font-variant-numeric: tabular-nums; }

/* Panels */
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(20px, 3vw, 52px); margin-top: 26px; }
h2 { font-size: 13.5px; font-weight: 500; color: var(--sub); display: flex; align-items: center; gap: 8px; margin-bottom: 12px; letter-spacing: .2px; }
.row { display: flex; gap: 11px; align-items: flex-start; padding: 7px 0; border-radius: 8px; transition: background 150ms; }
.row:hover { background: var(--panel); }
.row.enter { animation: in 220ms var(--ease); }
.row.open { cursor: pointer; }
.row .icon { margin-top: 2px; }
@keyframes in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.row .body { min-width: 0; flex: 1; }
.row .k { font-size: 12.5px; overflow-wrap: anywhere; }
.row .v { font-size: 14.5px; color: var(--txt); overflow-wrap: anywhere; }
.row .s { color: var(--sub); font-size: 12.5px; margin-top: 1px; overflow-wrap: anywhere; }
.row .st { margin-left: auto; font-size: 12.5px; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.st .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.empty { color: var(--dim); font-size: 13.5px; }
.arrow { color: var(--sub); }
.wait { color: var(--am); }

/* Tools and footer */
.tools { display: flex; gap: 18px; margin-top: 26px; flex-wrap: wrap; }
.quiet { background: none; border: 0; color: var(--sub); font: inherit; font-size: 13.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; padding: 4px 0; }
.quiet:hover { color: var(--txt); }
.quiet[aria-pressed="true"] { color: var(--ac); }
.foot { display: flex; gap: 22px; color: var(--dim); font-size: 12.5px; margin-top: 18px; flex-wrap: wrap; }
.foot .r { margin-left: auto; }

/* The side sheet */
.sheet { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--sheet); padding: 26px; transform: translateX(100%); transition: transform 260ms var(--ease); z-index: 6; overflow: auto; }
.sheet.on { transform: none; }
.sheet h3 { font-size: 18px; font-weight: 600; margin-bottom: 4px; overflow-wrap: anywhere; padding-right: 30px; }
.sheet .k { color: var(--sub); font-size: 13px; }
.sheet .val { margin: 14px 0; font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.sheet h4 { color: var(--sub); font-size: 13px; font-weight: 500; margin: 18px 0 8px; }
.sheet .h { display: flex; gap: 10px; padding: 6px 0; font-size: 13.5px; color: var(--sub); flex-wrap: wrap; }
.sheet .h b { color: var(--txt); font-weight: 500; overflow-wrap: anywhere; }
.sheet .close { position: absolute; top: 14px; right: 16px; background: none; border: 0; color: var(--sub); cursor: pointer; padding: 4px; }
.sheet .close .icon { width: 22px; height: 22px; }
.sheet .link { background: none; border: 0; color: var(--txt); font: inherit; cursor: pointer; padding: 0; text-align: left; overflow-wrap: anywhere; }
.sheet .link:hover { color: var(--ac); }
.sheet table { border-collapse: collapse; width: 100%; font-size: 13px; }
.sheet td { padding: 4px 8px 4px 0; vertical-align: top; overflow-wrap: anywhere; }
.sheet .pre { white-space: pre-wrap; font-size: 12.5px; color: var(--sub); max-height: 40vh; overflow: auto; }
.sheet .primary { background: var(--panel); color: var(--ac); border: 0; font: inherit; padding: 8px 14px; border-radius: 10px; cursor: pointer; }

.sheet label { color: var(--sub); display: inline-flex; gap: 6px; align-items: center; }
.sheet select { background: var(--panel); color: var(--txt); border: 0; font: inherit; padding: 6px 8px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

/* Narrow screens: the graph shows the current lens, the panels stack. */
@media (max-width: 720px) {
  header { gap: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .status { margin-left: auto; }
  .hero .kpi { gap: 14px; font-size: 14px; }
  #stage { height: 46vh; }
  .lens { gap: 14px; }
  .lens .r { flex-basis: 100%; margin-left: 0; }
  .tl .past { min-width: 0; text-align: right; }
  .panels { grid-template-columns: 1fr; }
  .sheet { padding: 20px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}