Files
plugins/packages/layerfs/page/index.html
T
mola e7f65641df Add layerfs: LayerFS workspaces as tools for every agent (#318)
New community tools package @magpie-community/tools-layerfs 0.7.1 (Mola-maker): LayerFS workspaces as tools for every agent. It imports a source folder into a versioned workspace under MAGPIE_LAYERFS_HOME (default ~/.magpie-layerfs), with checkpoints, history and diffs. Running commands (exec) is off unless the user turns it on. No network access. registry.json gains its one entry.

Run at the reviewed head 4795df0 (merges cleanly onto origin/main 1ae89aa):
- bun scripts/check.mjs layerfs: ok
- bun test in the package under a temp HOME: 48 of 48 pass, worktree clean after
- the seven points from the last review, each re-run:
  1. source guard: ~/.Config/Magpie, a symlink to ~/.config/magpie, ~/.AWS, ~/.CONFIG and a symlinked parent are all refused
  2. names: project a / branch b--c and project a--b / branch c no longer share a workspace; Main and main are apart
  3. layerfs_history {limit:1} at 200 checkpoints: 0.1 ms (151 ms before), no trajectory.json written
  4. native backend and its SDK path removed; asking for it throws a clear error
  5. repository points at this repo; README images pinned
  6. runShell: cat returns in 32 ms (2005 before), a backgrounded sleep doesn't hold the call, a timeout kills the process
  7. storedBytes equals stored content plus checkpoint records; the description says so
- read every line changed since 1c9e4c1: no path escape, no writes outside its home

Not tried: a real agent using the tools through magpie.
Known: something exec starts in the background keeps running after a successful call, like a normal shell, and can land in the next checkpoint.
2026-10-23 08:16:30 +08:00

62 lines
2.8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>LayerFS trajectory</title>
<link rel="stylesheet" href="style.css">
<script src="_magpie/bridge.js"></script>
<script src="trajectory.js"></script>
<script src="view.js"></script>
<script src="app.js" defer></script>
</head>
<body>
<header>
<div class="hist">
<h1 id="histLine">HISTORY</h1>
<p class="hist-meta" id="histMeta"></p>
</div>
<div class="menu" id="projectMenu" hidden>
<button type="button" id="projBtn" aria-haspopup="listbox" aria-expanded="false"></button>
<div class="menu-list" id="projList" role="listbox" aria-label="project" hidden></div>
</div>
<p class="stamp" id="stamp"></p>
</header>
<section class="stats" id="stats">
<div class="tiles">
<div class="tile"><span class="k" data-t="checkpointsK">Checkpoints</span><span class="v" id="nCommits">0 / 0</span></div>
<div class="tile"><span class="k" data-t="branchesK">Branches</span><span class="v" id="tBranches">0</span></div>
<div class="tile"><span class="k" data-t="asCopies">as copies</span><span class="v" id="vCopies">0 B</span></div>
<div class="tile"><span class="k" data-t="stored">stored</span><span class="v" id="vStored">0 B</span></div>
<div class="tile"><span class="k" data-t="dedupe">dedupe</span><span class="v" id="tDedup">–</span><span class="s saved" id="vSaved"></span></div>
</div>
<div class="bar-row"><span class="bar-label" data-t="asCopies">as copies</span><div class="bar"><i id="barCopies" class="copies"></i></div></div>
<div class="bar-row"><span class="bar-label" data-t="stored">stored</span><div class="bar"><i id="barStored" class="stored"></i></div></div>
<p class="stats-line" id="statsLine"></p>
</section>
<div class="stage" id="stage"><svg id="graph" role="img" aria-label="worktree trajectory"></svg></div>
<div class="legend" id="legend" hidden></div>
<section class="controls" id="controls">
<button type="button" id="play" class="primary">Replay</button>
<input type="range" id="scrub" min="0" max="1000" value="0" step="1" aria-label="replay position">
<div class="seg" id="speed" role="group" aria-label="speed">
<button type="button" data-speed="0.5">0.5×</button>
<button type="button" data-speed="1" aria-selected="true">1×</button>
<button type="button" data-speed="2">2×</button>
<button type="button" data-speed="4">4×</button>
</div>
</section>
<section class="detail" id="detail">
<div class="d-head"><span class="d-branch"><i id="dDot" class="d-dot"></i><span id="dBranch"></span></span><span class="d-time" id="dTime"></span></div>
<p class="d-msg" id="dMsg"></p>
<p class="d-meta"><span id="dMeta"></span> <span id="dDelta" class="delta"></span></p>
</section>
<p class="empty" id="empty" hidden></p>
</body>
</html>