feat(shell): manage herdr agent integrations
This commit is contained in:
@@ -105,3 +105,8 @@
|
|||||||
Different game installs can contain compiled scripts with the same internal path.
|
Different game installs can contain compiled scripts with the same internal path.
|
||||||
- Clew owns Ren'Py extraction, preparation, and compiled-script AST export. Ariadne owns analysis over Clew-produced data.
|
- Clew owns Ren'Py extraction, preparation, and compiled-script AST export. Ariadne owns analysis over Clew-produced data.
|
||||||
- Bazel Python targets require `PYTHON_TOOLCHAIN_ROOT` to point at a Python installation root.
|
- Bazel Python targets require `PYTHON_TOOLCHAIN_ROOT` to point at a Python installation root.
|
||||||
|
- When checking whether a package exists in nixpkgs, check both this repository's pinned nixpkgs inputs
|
||||||
|
and the relevant current upstream channel. A package can exist on current `nixos-unstable` while being
|
||||||
|
absent from the pinned revision or from a different branch such as `nixpkgs-unstable`.
|
||||||
|
- OMP does not discover project skills from `.pi/skills`.
|
||||||
|
Put skills shared by Pi and OMP under `.agents/skills`, or configure OMP's `skills.customDirectories`.
|
||||||
|
|||||||
@@ -10,38 +10,68 @@ let
|
|||||||
user = config.user.name;
|
user = config.user.name;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.shell.herdr.enable = lib.mkEnableOption "Herdr, a terminal multiplexer for coding agents";
|
options.modules.shell.herdr = {
|
||||||
|
enable = lib.mkEnableOption "Herdr, a terminal multiplexer for coding agents";
|
||||||
|
|
||||||
|
integrations = {
|
||||||
|
pi.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = config.modules.shell.pi.enable;
|
||||||
|
description = "Whether to install Herdr's Pi agent-state integration.";
|
||||||
|
};
|
||||||
|
|
||||||
|
omp.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = config.modules.shell.omp.enable;
|
||||||
|
description = "Whether to install Herdr's OMP agent-state integration.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
registry.shell-shortcut.${config.networking.hostName}.hs = "herdr --session";
|
registry.shell-shortcut.${config.networking.hostName}.hs = "herdr --session";
|
||||||
|
|
||||||
home-manager.users.${user} = {
|
home-manager.users.${user} = lib.mkMerge [
|
||||||
home.packages = [ pkgs.herdr ];
|
{
|
||||||
|
home.packages = [ pkgs.herdr ];
|
||||||
|
|
||||||
xdg.configFile."herdr/config.toml".text = ''
|
xdg.configFile."herdr/config.toml".text = ''
|
||||||
[keys]
|
[keys]
|
||||||
prefix = "ctrl+space"
|
prefix = "ctrl+space"
|
||||||
detach = "prefix+d"
|
detach = "prefix+d"
|
||||||
reload_config = "prefix+r"
|
reload_config = "prefix+r"
|
||||||
new_workspace = "prefix+c"
|
new_workspace = "prefix+c"
|
||||||
new_tab = "prefix+shift+c"
|
new_tab = "prefix+shift+c"
|
||||||
rename_workspace = "prefix+comma"
|
rename_workspace = "prefix+comma"
|
||||||
rename_tab = "prefix+<"
|
rename_tab = "prefix+<"
|
||||||
split_vertical = "prefix+backslash"
|
split_vertical = "prefix+backslash"
|
||||||
split_horizontal = "prefix+minus"
|
split_horizontal = "prefix+minus"
|
||||||
switch_workspace = "prefix+1..9"
|
switch_workspace = "prefix+1..9"
|
||||||
switch_tab = "prefix+shift+1..9"
|
switch_tab = "prefix+shift+1..9"
|
||||||
focus_pane_left = "prefix+h"
|
focus_pane_left = "prefix+h"
|
||||||
focus_pane_down = "prefix+j"
|
focus_pane_down = "prefix+j"
|
||||||
focus_pane_up = "prefix+k"
|
focus_pane_up = "prefix+k"
|
||||||
focus_pane_right = "prefix+l"
|
focus_pane_right = "prefix+l"
|
||||||
|
|
||||||
[ui]
|
[ui]
|
||||||
prompt_new_tab_name = false
|
prompt_new_tab_name = false
|
||||||
|
|
||||||
[experimental]
|
[experimental]
|
||||||
kitty_graphics = true
|
kitty_graphics = true
|
||||||
'';
|
'';
|
||||||
};
|
}
|
||||||
|
(lib.mkIf cfg.integrations.pi.enable {
|
||||||
|
home.file.".pi/agent/extensions/herdr-agent-state.ts" = {
|
||||||
|
source = "${pkgs.herdr.src}/src/integration/assets/pi/herdr-agent-state.ts";
|
||||||
|
force = true;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
(lib.mkIf cfg.integrations.omp.enable {
|
||||||
|
home.file.".omp/agent/extensions/herdr-omp-agent-state.ts" = {
|
||||||
|
source = "${pkgs.herdr.src}/src/integration/assets/omp/herdr-agent-state.ts";
|
||||||
|
force = true;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user