File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9898 enable = true ;
9999 playwright. enable = true ;
100100 garmin. enable = true ;
101+ ponytail. enable = true ;
102+
101103 # To get the full list of skills:
102104 # nix eval --json --file modules/common/opencode/skills-catalog.nix | jaq .
103105 skills. enabled = [ "social" ] ;
Original file line number Diff line number Diff line change 2323 enableSnip = cfg . snip. enable ;
2424 enableCopilotAutoModel = cfg . copilotAutoModel. enable ;
2525 copilotAutoModelAutos = cfg . copilotAutoModel. autos ;
26+ enablePonytail = cfg . ponytail. enable ;
2627 } ;
2728
2829 skillsConfig = import ./skills.nix {
Original file line number Diff line number Diff line change 9090 enable = mkEnableOption "snip shell-command recording plugin for opencode" ;
9191 } ;
9292
93+ ponytail = {
94+ enable = mkEnableOption "ponytail lazy-senior-dev plugin for opencode" ;
95+ } ;
96+
9397 playwright = {
9498 enable = mkEnableOption "Playwright browser-automation MCP server (for LinkedIn profile editing and similar tasks)" ;
9599 } ;
Original file line number Diff line number Diff line change 1+ {
2+ lib ,
3+ stdenvNoCC ,
4+ fetchFromGitHub ,
5+ } :
6+
7+ stdenvNoCC . mkDerivation rec {
8+ pname = "ponytail" ;
9+ version = "5.3.2" ;
10+ src = fetchFromGitHub {
11+ owner = "DietrichGebert" ;
12+ repo = "ponytail" ;
13+ rev = "v${ version } " ;
14+ hash = "sha256-IJlhfkdXI6pMZZCZO7XBRg88LBiNfzc5Gnm4ofGybL8=" ;
15+ } ;
16+
17+ dontBuild = true ;
18+
19+ # Keep whole tree: ponytail.mjs resolves ../../hooks and ../../skills.
20+ installPhase = ''
21+ runHook preInstall
22+ mkdir -p $out
23+ cp -r . $out/
24+ workaroundForOpencodePluginProbe
25+ runHook postInstall
26+ '' ;
27+
28+ # HACK: opencode's plugin loader probes server/tui/rpc entrypoints and treats
29+ # Bun's ResolveMessage (not instanceof Error) for a missing file as fatal,
30+ # breaking the whole config bootstrap.
31+ # https://github.com/anomalyco/opencode/issues/48122
32+ # TODO: remove once a released opencode includes the fix.
33+ # server.mjs must re-export the real entry (an empty stub would shadow it);
34+ # tui/rpc only need valid no-op plugins.
35+ preInstall = ''
36+ workaroundForOpencodePluginProbe() {
37+ echo "export { default } from './index.js'" > $out/.opencode/plugins/server.mjs
38+ for entrypoint in tui rpc; do
39+ echo 'export default { id: "ponytail", setup: async () => {} }' \
40+ > "$out/.opencode/plugins/$entrypoint.mjs"
41+ done
42+ }
43+ '' ;
44+
45+ meta = {
46+ description = "Lazy senior dev mode for AI agents, with OpenCode 2 plugin-loader workaround" ;
47+ homepage = "https://github.com/DietrichGebert/ponytail" ;
48+ license = lib . licenses. mit ;
49+ platforms = lib . platforms. all ;
50+ } ;
51+ }
Original file line number Diff line number Diff line change 44 enableSnip ? false ,
55 enableCopilotAutoModel ? false ,
66 copilotAutoModelAutos ? [ ] ,
7+ enablePonytail ? false ,
78} :
89let
910 inherit ( pkgs ) callPackage ;
1011 opencode-snip = callPackage ./packages/opencode-snip { } ;
12+ ponytail = callPackage ./packages/ponytail { } ;
1113 opencode-github-copilot-auto-model = callPackage ./packages/opencode-github-copilot-auto-model { } ;
1214 copilotAutoModelEntry =
1315 if copilotAutoModelAutos != [ ] then
2931 ]
3032 ++ lib . optionals enableCopilotAutoModel [
3133 copilotAutoModelEntry
34+ ]
35+ ++ lib . optionals enablePonytail [
36+ "${ ponytail } /.opencode/plugins"
3237 ] ;
3338}
You can’t perform that action at this time.
0 commit comments