From 6511a9884f6f48fd7bda57c520d3ce12a7dfcc9a Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Tue, 3 Nov 2026 03:08:44 -0600 Subject: [PATCH] mcpx: regenerate ops.gen.ts as a treefmt formatter (#4814) --- treefmt.toml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/treefmt.toml b/treefmt.toml index 6a330db2de..0bd62b5c0a 100755 --- a/treefmt.toml +++ b/treefmt.toml @@ -89,6 +89,18 @@ command = "gofmt" options = ["-w"] includes = ["*.go"] +# Regenerates pkgs/mcpx/plugin/opencode/mcpx/ops.gen.ts from the /v1 +# route table whenever the API package changes (#4814): generated +# files refresh with formatting, like just-recipes.json in `just fix`. +# The command ignores the file list treefmt passes it — the generator +# rewrites the one output file. The nix build independently +# regenerates in preCheck (#4807); this keeps the TREE fresh for +# raw-source consumers of the plugin. Idempotent. +[formatter.mcpx-ops] +command = "bash" +options = ["-c", "cd pkgs/mcpx && go test ./internal/api -run '^TestPluginOpsAreGenerated$' -update", "_"] +includes = ["pkgs/mcpx/internal/api/*.go"] + [formatter.haskell] command = "ormolu" options = [