Page: SageFs.Demos

Job: generated chapter

Level: F#

Source lines:

  • SageFs.Demos/Domain.fs:1

SageFs.Demos

F#39 source file(s)5173 line(s) of code

grug measure this project from its own files. nobody write this page, so it cannot go stale. why the code is shaped so is for the topics.

what this repository says it is

`sagefs-demos` CLI entry point (demo-gif-plan.md §8): `doctor | list | storyboard | record | check | measure | compose`, plus the hidden `cell-agent` verb this same binary runs AS when it is executed inside a sealed cell (§4.1: one… SageFs.Demos/Program.fs:1

where it start

a program start in

  • SageFs.Demos/Program.fs

where the code sits

the code of this project sit in 3 folder(s) below its own. the folder with most lines of code come first.

folderfileslines of code
the project folder itself283276
Actors61653
spike5244

the files, in the order to read them

the project file lists these in compile order, and in F# a file can use only what came before it. read from the top and each file stand on the ones above. lines count code only, with comments and blanks left out.

#filelineswhat the file say about itself
1SageFs.Demos/Domain.fs531The pure domain model for `sagefs-demos` (demo-gif-plan.md §5, §6.1). SageFs.Demos/Domain.fs:1
2SageFs.Demos/Motion.fs47Pure cursor-motion planning (demo-gif-plan.md §4.3, §5). Property tests to write in Wave 2: monotone time, starts/ends exactly on the endpoints, never leaves the screen, deterministic by seed. SageFs.Demos/Motion.fs:1
3SageFs.Demos/Cadence.fs40Pure per-character typing cadence (demo-gif-plan.md §4.3, §5). Seeded log-normal delays (median 55 ms, longer after `.`/`,`/newline, a 120 ms "think" before an identifier), deterministic by seed. SageFs.Demos/Cadence.fs:1
4SageFs.Demos/Keymap.fs52Pure key → keysym → keycode resolution (demo-gif-plan.md §4.3, §5), against a `KeyboardMapping` fetched live from the cell's X server — resolution never hard-codes a layout. Chords expand to ordered press/release sequences. Wave 2 tests:… SageFs.Demos/Keymap.fs:1
5SageFs.Demos/Layout.fs31Pure per-actor rect layout for a `LayoutTemplate` on a given `Screen` (demo-gif-plan.md §5, §9). Wave 2 property tests: rects are multiples of 8, tile without overlap, respect the 8 px gutter / 1 px separator rule. SageFs.Demos/Layout.fs:1
6SageFs.Demos/Schedule.fs23Pure cost-classed, memory-bound scheduling (demo-gif-plan.md §4.2, §5). Packs cells greedily by longest duration first, never exceeding either `cores - 1` or `memory - 2 GB`, whichever binds first. SageFs.Demos/Schedule.fs:1
7SageFs.Demos/Input.fs48Pure translation of one `Action`, already resolved to a `ScreenRect`, into the ordered `X11Request` list that delivers it (demo-gif-plan.md §4.3, §5). The interpreter of this list is the libXtst P/Invoke edge in `DemoRuntime.XTest` — this… SageFs.Demos/Input.fs:1
8SageFs.Demos/Ffmpeg.fs258Pure ffmpeg planning (demo-gif-plan.md §4.6, §5). `render` turns a `ComposePlan` into one `FilterGraph` value: a real multi-input `-filter_complex` graph — per-step cursor+ripple overlay, caption band, step counter, progress dots, and… SageFs.Demos/Ffmpeg.fs:1
9SageFs.Demos/Compose.fs16Pure composition planning (demo-gif-plan.md §4.6, §5): turns a returned `StepLog` plus the resolved layout and style into the `ComposePlan` `Ffmpeg.render` consumes. SageFs.Demos/Compose.fs:1
10SageFs.Demos/Storyboard.fs100Pure storyboard rendering (demo-gif-plan.md §4.8, §5): draws the layout rects, actor placement, cursor path (over the *expected* target rects) and captions for a scenario, with no launch and no sandbox — the review step before a scenario… SageFs.Demos/Storyboard.fs:1
11SageFs.Demos/Fingerprint.fs41Pure content fingerprinting and freshness (demo-gif-plan.md §4.10, §1). The same module runs in the recorder and in CI's `check`, so a Wave-2 test must pin that CI's digest equals the recorder's for a fixed tree. SageFs.Demos/Fingerprint.fs:1
12SageFs.Demos/Wire.fs66The one JSON contract that crosses the sandbox namespace wall (demo-gif- plan.md §4.1): the runner writes a `ScenarioPlan` line to a cell-agent's stdin, the cell-agent writes a `StepLog` line back on its stdout. These types are… SageFs.Demos/Wire.fs:1
13SageFs.Demos/Sandbox.fs72The bwrap sandbox edge (demo-gif-plan.md §4.1, §4.12). Building the argument list is pure data — the exact recipe the Phase-0 spike proved necessary on this machine (§4.12: "codify these exact flags, they are not optional extras") — so it… SageFs.Demos/Sandbox.fs:1
14SageFs.Demos/Actors/Actor.fs8The actor-dispatch seam (Island F, demo-actors-plan.md §1.2, §1.3). Today the cell-agent hard-calls exactly one actor by name — `Dashboard.launch` (`CellAgent.fs`, pre-seam) — which means every new actor (VS Code, Neovim, the App co-actor,… SageFs.Demos/Actors/Actor.fs:1
15SageFs.Demos/Actors/Dashboard.fs111The Dashboard actor (demo-gif-plan.md §4.4): launches the bundled Playwright Chromium in `--app=` kiosk mode (§4.12 — required so page pixel coordinates equal screen coordinates, since libXtst clicks a screen point) against the daemon's… SageFs.Demos/Actors/Dashboard.fs:1
16SageFs.Demos/Actors/VsCode.fs197The VS Code actor (demo-actors-plan.md §2.1, roast H5 — "the riskiest actor"). Drives a real VS Code instance via its extension host — `executeCommand`/the `sagefs.debug.rectFor` loopback control channel… SageFs.Demos/Actors/VsCode.fs:1
17SageFs.Demos/Actors/Neovim.fs419The Neovim actor (demo-actors-plan.md §2.2): a REAL Neovim inside a REAL kitty terminal on the cell's own Xvfb display, driven two ways — RPC (`nvim --server <sock> --remote-expr <vimscript>`, nvim's own remote- client CLI, never a… SageFs.Demos/Actors/Neovim.fs:1
18SageFs.Demos/Actors/App.fs287The App co-actor (demo-actors-plan.md §2.3): captures the SECOND window a session launches when hot-reload runs the app under test. Unlike every other actor, App authors no scenarios of its own — it is a passenger placed at `ActorId.App`… SageFs.Demos/Actors/App.fs:1
19SageFs.Demos/Actors/Agent.fs631The Agent/MCP actor (demo-actors-plan.md §2.4): drives SageFs over its REAL Model Context Protocol surface — the exact tool vocabulary an AI agent sees (`create_project_session`, `get_session_status`, `send_fsharp_code`, ...) — against the… SageFs.Demos/Actors/Agent.fs:1
20SageFs.Demos/Recorder.fs51Per-step ffmpeg x11grab capture (demo-gif-plan.md §4.5, §4.11): recording runs only while a step's input plan executes or its `Expectation` is being awaited — `start`/`stop` bracket exactly one step, never a cell's whole lifetime, per… SageFs.Demos/Recorder.fs:1
21SageFs.Demos/CellAgent.fs306The in-sandbox executor (demo-gif-plan.md §4.1), translated from the Phase-0 spike's `spike/cell-agent/Program.fs`: the ONE process bwrap runs as a cell's pid 1. It reads exactly one line of `Wire.ScenarioPlan` JSON from stdin, assembles… SageFs.Demos/CellAgent.fs:1
22SageFs.Demos/Scenarios.fs159The Phase-1 smoke scenario (demo-gif-plan.md §10 Phase 1): dashboard only — open a REAL sample project (not a bare Quick Start temp session, which has nothing to auto-open and nothing to eval against), watch it warm up to Ready with the… SageFs.Demos/Scenarios.fs:1
23SageFs.Demos/Scenarios.VsCode.fs104The VS Code client's scenarios (demo-actors-plan.md §1.3/§2.1: `lt- vscode`, `repl-vscode`, `hr-dashboard-vscode-{web,raylib,console}`). `Scenarios.All.fs` already references `scenarios` below (Island F left it an empty list) — this island… SageFs.Demos/Scenarios.VsCode.fs:1
24SageFs.Demos/Scenarios.Neovim.fs145The Neovim client's scenarios (demo-actors-plan.md §1.3/§2.2): `repl- neovim` (hero), `lt-neovim`, and `hr-neovim-neovim-{web,raylib,console}` (joint with the App co-actor). Built the same way the Dashboard scenarios are — a plain… SageFs.Demos/Scenarios.Neovim.fs:1
25SageFs.Demos/Scenarios.Agent.fs28`agent-mcp` (demo-actors-plan.md §2.4, matrix #17): a real, three-tool MCP exchange against the cell's own daemon — `create_project_session` opens the SAME real `WebappDatastar` sample every other scenario proves against (never a bare… SageFs.Demos/Scenarios.Agent.fs:1
26SageFs.Demos/Scenarios.Cohort.fs97`cohort-landing` (cohort-demo-scenario-plan.md, phase C): a real, checked, 8-beat cohort-coordination demo — TWO real MCP-driven agents (alice, bob) join the daemon's cohort, claim disjoint files, hit a genuine claim CONFLICT, configure… SageFs.Demos/Scenarios.Cohort.fs:1
27SageFs.Demos/Scenarios.All.fs7The scenario registry (Island F, demo-actors-plan.md §1.3): aggregates every client's scenario list into the one `all` value `Program.fs` resolves `record <scenario-id>` against. Each actor island owns and fills only its own… SageFs.Demos/Scenarios.All.fs:1
28SageFs.Demos/Runtime.VsCode.fs32The VS Code actor's runtime extension (demo-actors-plan.md §1.2/§2.1): resolves the VS Code build + extension directory this actor needs and exposes the cell binds/`Wire.VsCodeConfig` `Runtime.fs`'s `record` function will consume once its… SageFs.Demos/Runtime.VsCode.fs:1
29SageFs.Demos/Runtime.Neovim.fs79The Neovim actor's runtime extension (demo-actors-plan.md §1.2/§2.2): resolves the real `kitty`/`nvim` binaries and a CLEAN, pinned sagefs.nvim checkout, and shapes the cell binds/`Wire.NvimConfig` `Actors/Neovim.fs` needs — through… SageFs.Demos/Runtime.Neovim.fs:1
30SageFs.Demos/Runtime.App.fs19The App co-actor's runtime extension (demo-actors-plan.md §1.2/§2.3): the pure translation between the rich `Domain.AppKind` and the primitive `Wire.AppConfig`/cell-extension values `Runtime.fs`'s extension points (`cellSpec`'s… SageFs.Demos/Runtime.App.fs:1
31SageFs.Demos/Runtime.Agent.fs3The Agent/MCP actor's runtime extension (demo-actors-plan.md §1.2/§2.4). Every other actor island needs this file for extra cell binds (a second browser/runtime, an editor build, a plugin checkout) — the Agent actor needs none: it drives… SageFs.Demos/Runtime.Agent.fs:1
32SageFs.Demos/Runtime.Cohort.fs213The cohort demo's HOST-SIDE fixture builder (cohort-demo-scenario-plan.md §"The genuine work", item 1-2): the cohort's git operations run against `Environment.CurrentDirectory` (`SageFs.Core/Mcp.fs`'s `mainRepoDir`), so filming the… SageFs.Demos/Runtime.Cohort.fs:1
33SageFs.Demos/Runtime.fs604The `DemoRuntime` edge (demo-gif-plan.md §5, §4.1, §4.12): the runner side of one recording. It never reaches into a sealed cell directly — it builds the SageFs daemon FROM THIS WORKTREE'S SOURCE (§4.12: never the globally-installed tool,… SageFs.Demos/Runtime.fs:1
34SageFs.Demos/Program.fs104`sagefs-demos` CLI entry point (demo-gif-plan.md §8): `doctor | list | storyboard | record | check | measure | compose`, plus the hidden `cell-agent` verb this same binary runs AS when it is executed inside a sealed cell (§4.1: one… SageFs.Demos/Program.fs:1
35SageFs.Demos/spike/spike-common.fsx106SageFs.Demos/spike/spike-common.fsx -- #load'ed by the stage scripts; not run on its own. SageFs.Demos/spike/spike-common.fsx:1
36SageFs.Demos/spike/stage1-sandbox-capture.fsx22SageFs.Demos/spike/stage1-sandbox-capture.fsx [out-dir] Run with: dotnet fsi SageFs.Demos/spike/stage1-sandbox-capture.fsx -- [out-dir] SageFs.Demos/spike/stage1-sandbox-capture.fsx:1
37SageFs.Demos/spike/stage2-gui-capture.fsx36SageFs.Demos/spike/stage2-gui-capture.fsx [out-dir] Run with: dotnet fsi SageFs.Demos/spike/stage2-gui-capture.fsx -- [out-dir] SageFs.Demos/spike/stage2-gui-capture.fsx:1
38SageFs.Demos/spike/stage3-xtest-input.fsx33SageFs.Demos/spike/stage3-xtest-input.fsx [out-dir] Run with: dotnet fsi SageFs.Demos/spike/stage3-xtest-input.fsx -- [out-dir] SageFs.Demos/spike/stage3-xtest-input.fsx:1
39SageFs.Demos/spike/stage4-real-thing.fsx47SageFs.Demos/spike/stage4-real-thing.fsx [out-dir] Run with: dotnet fsi SageFs.Demos/spike/stage4-real-thing.fsx -- [out-dir] SageFs.Demos/spike/stage4-real-thing.fsx:1

what it use and who use it

2 package(s) named in SageFs.Demos.fsproj: FSharp.Core, Microsoft.Playwright.

it reference no other project of this repo.

these projects of this repo reference it:

  • SageFs.Demos.Tests

what test it

1 test file(s) and 98 line(s) of tests sit inside this project.

these test projects reference it:

  • SageFs.Demos.Tests, 22 test file(s), 2208 line(s)

where to look for trouble

demon watch: complexity spirit demon may lurk here
  • SageFs.Demos/Actors/Neovim.fs: module-level mutable in 1 place(s) (line 112): module-level mutable state is shared by everything that reaches the module
  • SageFs.Demos/Actors/App.fs: module-level mutable in 1 place(s) (line 106): module-level mutable state is shared by everything that reaches the module

this sign only tells grug where to look. open the file and look before grug says the demon is there.