feat(agents): switch to opencode2, drop oh-my-openagent, add paperclip

- opencode.nix: configure programs.opencode directly for OpenCode 2
  (package llm-agents.opencode2, v2.0.16). v2 reads opencode.json and
  normalizes the v1 config format internally, so provider/permission/
  formatter keys stay valid. The m3ta-nixpkgs coding.opencode wrapper
  (v1-only, hardcodes oh-my-openagent) is no longer used.
- remove oh-my-openagent plugin and ohMyOpencodeSettings model matrix
- drop programs.opencode.tui: v2 owns cli.json at runtime and would
  re-import a managed tui.json into it on every start, clobbering
  runtime prefs
- agents.nix: opencode-desktop -> llm-agents.opencode2-desktop (2.0.16),
  add llm-agents.paperclip (control plane for AI agent teams)
- rofi: terminalCommand opencode2 %a
This commit is contained in:
m3tam3re committed 2026-09-25 07:43:36 +02:00
1 parent 5e90261036
commit 4ef99db31d
3 files changed
+23 -44

No files matched your search

+1 -1
View File
@@ -201,7 +201,7 @@ in {
}; };
}; };
terminal = pkgs.ghostty; terminal = pkgs.ghostty;
terminalCommand = "opencode %a"; terminalCommand = "opencode2 %a";
}; };
}; };
} }
+2 -1
View File
@@ -80,10 +80,11 @@
vulkanSupport = videoDrivers == ["amdgpu"]; vulkanSupport = videoDrivers == ["amdgpu"];
cudaSupport = videoDrivers == ["nvidia"]; cudaSupport = videoDrivers == ["nvidia"];
}) })
opencode-desktop llm-agents.opencode2-desktop
openshell openshell
llm-agents.openspec llm-agents.openspec
openwork openwork
llm-agents.paperclip
talk talk
]; ];
} }
+20 -42
View File
@@ -1,47 +1,24 @@
{lib, ...}: { # OpenCode 2 (TUI) configuration.
coding.opencode = { #
# v2 (pkgs.llm-agents.opencode2) reads ~/.config/opencode/opencode.json and
# normalizes the v1 config format internally: provider/permission/formatter
# keys written below are migrated on load, so the v1-style schema stays valid.
#
# TUI preferences live in cli.json, which v2 owns at runtime:
# - do NOT manage cli.json here (home-manager symlinks would break v2's
# runtime writes), and
# - do NOT set programs.opencode.tui (tui.json is a legacy source that v2
# re-imports into cli.json on every start, clobbering runtime prefs).
#
# The m3ta-nixpkgs `coding.opencode` wrapper is intentionally NOT used: it is
# v1-only (hardcodes the oh-my-openagent plugin and oh-my-openagent.json).
{pkgs, ...}: {
programs.opencode = {
enable = true; enable = true;
enableMcpIntegration = true;
package = pkgs.llm-agents.opencode2;
ohMyOpencodeSettings = { settings = {
agents = {
# Primary worker: GLM-5.3 (1M ctx, beats Opus 4.8 on token efficiency).
sisyphus.model = "zai-coding-plan/glm-5.3";
# Planning + deep analysis: strongest reasoning tier.
prometheus.model = "litellm/claude-opus-4-8";
metis.model = "litellm/claude-opus-4-8";
# Verification + docs research: best tool-use quality.
oracle.model = "litellm/claude-sonnet-5";
librarian.model = "litellm/claude-sonnet-5";
# High-volume parallel codebase scans: speed-tuned GLM on flat rate.
explore.model = "zai-coding-plan/glm-5-turbo";
# Vision: GLM-5.3 is text-only -> cheap capable Claude Haiku.
multimodal-looker.model = "litellm/claude-haiku-4-5";
# Critic + navigator: flagship GLM on flat rate.
momus.model = "zai-coding-plan/glm-5.3";
atlas.model = "zai-coding-plan/glm-5.3";
};
categories = {
# Volume categories -> flat-rate GLM-5.3 (1M ctx).
visual-engineering.model = "zai-coding-plan/glm-5.3";
artistry.model = "zai-coding-plan/glm-5.3";
writing.model = "zai-coding-plan/glm-5.3";
# Long deep-work sessions -> GLM-5.3 1M ctx beats Sonnet 200k.
deep.model = "zai-coding-plan/glm-5.3";
# Deliberately pay-per-token for top quality:
ultrabrain.model = "litellm/claude-opus-4-8";
unspecified-high.model = "litellm/claude-opus-4-8";
unspecified-low.model = "litellm/claude-sonnet-5";
quick.model = "litellm/claude-haiku-4-5";
};
};
};
# Keep TUI settings in programs.opencode.tui to satisfy OpenCode v1.2.15+.
programs.opencode.tui.theme = "opencode";
# Override legacy default settings to avoid deprecated TUI keys in settings.
programs.opencode.settings = lib.mkForce {
plugin = ["oh-my-openagent"];
formatter = { formatter = {
alejandra = { alejandra = {
command = ["alejandra" "-q" "-"]; command = ["alejandra" "-q" "-"];
@@ -258,4 +235,5 @@
}; };
}; };
}; };
};
} }