From 7056685370acf8661c03071e74eccd91f18b48a8 Mon Sep 17 00:00:00 2001 From: Alexander Miroshnichenko Date: Mon, 2 Nov 2026 01:53:57 +0300 Subject: [PATCH] feat(memdoor): add memdoor 1.769.0 Add guregodevo/memdoor, a Go coding/automation agent, built from source: - the binary embeds the React UI through web/embed.go (`//go:embed all:dist`), and upstream gitignores web/dist, so the bundle is built with buildNpmPackage and copied into web/dist before the Go build - CGO stays off: the SQLite driver is modernc.org/sqlite, so FTS5 needs no C flags and the binary is static - upstream's whole Go suite runs (buildGoModule would trim checks to subPackages, where cmd/cli has no tests); it needs git on PATH and separate scratch dirs for HOME and the Go temp root, because one test writes ~/.memdoor and ProjectRoot walks up looking for that marker Track the package in beads as nix-overlay-yxj. --- .beads/issues.jsonl | 1 + README.md | 1 + packages/memdoor/default.nix | 2 + packages/memdoor/package.nix | 108 +++++++++++++++++++++++++++++++++++ 4 files changed, 112 insertions(+) create mode 100644 packages/memdoor/default.nix create mode 100644 packages/memdoor/package.nix diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index 45afc63..4a4b0b0 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -32,3 +32,4 @@ {"id":"nix-overlay-qcg","title":"freetoken: bump 0.1.3 -> 0.2.0 once nixpkgs has torch 2.14 / transformers 5.18","description":"FreeToken 0.2.0 requires torch>=2.14,<2.15, torchvision>=0.29,<0.30, transformers>=5.18,<5.19, triton 3.8 and flashlib==0.4.0 (currently packaged: 0.3.0). nixos-unstable ships torch 2.11 and transformers 5.5.4, so the pin in flake.nix (nixpkgs-torch211) and packages/freetoken/package.nix must be reworked once a newer torch lands in nixpkgs.","status":"open","priority":3,"issue_type":"task","created_at":"2026-10-24T09:01:39.154532688Z","created_by":"minder","updated_at":"2026-10-24T09:01:39.154532688Z","source_repo":"nix-overlay","compaction_level":0,"original_size":0} {"_type":"issue","id":"nix-overlay-vhq","title":"Note missing Dolt remote in AGENTS.md","description":"## Why\\nAgents running bd dolt push see 'No remote is configured - skipping' and may mistake it for a failure (blocking session close). Document that this is expected: no Dolt remote is set up, beads state is versioned locally in .beads/ and committed via git.\\n\\n## What\\nAdd a short note in the Beads Issue Tracker / Session Completion section of AGENTS.md.\\n\\n## Acceptance\\n- AGENTS.md explains the expected bd dolt push output and that git push is the actual sync mechanism","status":"closed","priority":3,"issue_type":"task","assignee":"Alexander Miroshnichenko","owner":"alex@millerson.name","created_at":"2026-08-07T13:18:33Z","created_by":"Alexander Miroshnichenko","updated_at":"2026-08-07T13:19:26Z","started_at":"2026-08-07T13:18:51Z","closed_at":"2026-08-07T13:19:26Z","close_reason":"AGENTS.md updated and pushed","dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"nix-overlay-ylf","title":"Add open-code-review package","description":"Package alibaba/open-code-review (AI code review CLI, npm @alibaba-group/open-code-review) into the overlay","status":"closed","priority":2,"issue_type":"feature","assignee":"Alexander Miroshnichenko","owner":"alex@millerson.name","created_at":"2026-09-26T07:18:05Z","created_by":"Alexander Miroshnichenko","updated_at":"2026-09-26T07:24:49Z","started_at":"2026-09-26T07:18:48Z","closed_at":"2026-09-26T07:24:49Z","close_reason":"Closed","dependency_count":0,"dependent_count":0,"comment_count":0} +{"id":"nix-overlay-yxj","title":"Add memdoor package","description":"Add https://github.com/guregodevo/memdoor (Go CLI coding/automation agent) to packages/","status":"closed","priority":2,"issue_type":"task","assignee":"minder","created_at":"2026-11-01T18:25:31.524424793Z","created_by":"minder","updated_at":"2026-11-01T22:53:37.479304645Z","closed_at":"2026-11-01T22:53:37.477846036Z","close_reason":"Added packages/memdoor (v1.769.0), builds with upstream Go suite enabled","source_repo":"nix-overlay","compaction_level":0,"original_size":0} diff --git a/README.md b/README.md index 883feb4..002b23d 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ A custom Nix overlay and flake providing additional packages not found in upstre | `hipengine` | ROCm-native local LLM inference engine with torch-free runtime for AMD RDNA GPUs | AI Inference | | `marmel` | Autonomous agentic coding assistant with Manager + specialist subagent orchestration over any OpenAI-compatible LLM backend | AI Coding Agents | | `mcp-gateway` | Universal Model Context Protocol gateway that sits between AI client and MCP tools/servers | MCP Servers | +| `memdoor` | Coding and automation agent in one CLI binary: runs locally or over SSH, with YAML workflows and a decision model in front of the chat model | AI Coding Agents | | `nftables-analyzer` | Analyze nftables firewall rules and evaluate traffic queries | Networking | | `nftablesbuilder` | Web interface to manage nftables rules with drag-and-drop rule creation | Networking | | `shardr` | Decentralized LLM repository: content-addressed model store, BitTorrent-based sync, OpenAI-compatible serving via llama-server | AI Inference | diff --git a/packages/memdoor/default.nix b/packages/memdoor/default.nix new file mode 100644 index 0000000..69b1a07 --- /dev/null +++ b/packages/memdoor/default.nix @@ -0,0 +1,2 @@ +{ pkgs, ... }: +pkgs.callPackage ./package.nix { } diff --git a/packages/memdoor/package.nix b/packages/memdoor/package.nix new file mode 100644 index 0000000..f524ed7 --- /dev/null +++ b/packages/memdoor/package.nix @@ -0,0 +1,108 @@ +{ + lib, + buildGoModule, + buildNpmPackage, + fetchFromGitHub, + git, +}: + +let + version = "1.769.0"; + + src = fetchFromGitHub { + owner = "guregodevo"; + repo = "memdoor"; + rev = "v${version}"; + hash = "sha256-ksQEPBlU4y3Y+NhvicBHnqa6ZpQ9k0YlByTZcqWsjXY="; + }; + + # web/embed.go does `//go:embed all:dist`, so the binary ships the React UI. + # Upstream builds that bundle with `make web-build` (vite) and web/dist is + # gitignored, so the source archive carries none and the Go build fails + # without this step. + frontend = buildNpmPackage { + pname = "memdoor-web"; + inherit version src; + sourceRoot = "source/web"; + + npmDepsHash = "sha256-NiIw1yXV1eamajcLOP+zEHt/yviihXjgv2aqdJs6ztc="; + makeCacheWritable = true; + + # `npm run build` also runs the upstream prebuild hook, which copies + # docs/reference/*.md over the served copies in web/public/docs/. + installPhase = '' + runHook preInstall + mkdir -p $out + cp -r dist/* $out/ + runHook postInstall + ''; + }; +in + +buildGoModule rec { + pname = "memdoor"; + inherit version src; + + vendorHash = "sha256-MuvQkzGBJXTj5JufNWZuQiHTOHpqX73XanV0OdLPWgY="; + + # cmd/cli is the only shipped command; eval/editbench is a dev benchmark. + subPackages = [ "cmd/cli" ]; + + # The SQLite driver is modernc.org/sqlite (SQLite translated to Go), so the + # binary stays static and FTS5 needs no C flags: upstream's + # CGO_CFLAGS=-DSQLITE_ENABLE_FTS5 is left over from the mattn driver. + env.CGO_ENABLED = 0; + + ldflags = [ + "-s" + "-w" + "-X memdoor/cmd/cli/cmd.Version=v${version}" + "-X memdoor/cmd/cli/cmd.Commit=${src.rev}" + "-X memdoor/cmd/cli/cmd.BuildDate=1970-01-01T00:00:00Z" + ]; + + preBuild = '' + mkdir -p web/dist + cp -r ${frontend}/* web/dist/ + ''; + + # Upstream's whole suite. buildGoModule would trim checks to `subPackages`, + # and cmd/cli has no tests of its own. The suite needs git: tests run + # `git init`, and the skill loader only calls a skill eligible when a + # `requires:` binary is on PATH. HOME and the Go temp root get separate + # scratch dirs, because one test writes ~/.memdoor and ProjectRoot walks up + # from the temp dir looking for that marker. + doCheck = true; + nativeCheckInputs = [ git ]; + checkPhase = '' + runHook preCheck + mkdir -p "$TMPDIR/scratch/home" "$TMPDIR/scratch/tmp" + export TMPDIR="$TMPDIR/scratch/tmp" + export HOME="$TMPDIR/scratch/home" + go test ./... + runHook postCheck + ''; + + # `go install ./cmd/cli` names the binary after the directory. + postInstall = '' + mv $out/bin/cli $out/bin/memdoor + ''; + + passthru = { + category = "AI Coding Agents"; + updateScript = [ + "nix-update" + "--flake" + ".#memdoor" + ]; + }; + + meta = with lib; { + description = "Coding and automation agent in one CLI binary: local or over SSH, with YAML workflows and a decision model in front of the chat model"; + homepage = "https://github.com/guregodevo/memdoor"; + changelog = "https://github.com/guregodevo/memdoor/blob/v${version}/CHANGELOG.md"; + license = licenses.asl20; + mainProgram = "memdoor"; + platforms = platforms.linux ++ platforms.darwin; + }; +}