From 9b962ad4a43f338a3441de602f8577eabc7ab487 Mon Sep 17 00:00:00 2001 From: Andy Bunce Date: Tue, 17 Mar 2026 15:32:37 +0000 Subject: [PATCH] mod: volume for config --- docker-images/Dockerfile.agent | 47 ++------------------------------ opencode.cfg/oh-my-opencode.json | 10 +++++++ zsh.add | 1 + 3 files changed, 14 insertions(+), 44 deletions(-) create mode 100644 opencode.cfg/oh-my-opencode.json diff --git a/docker-images/Dockerfile.agent b/docker-images/Dockerfile.agent index 232a78c..c983255 100644 --- a/docker-images/Dockerfile.agent +++ b/docker-images/Dockerfile.agent @@ -28,9 +28,10 @@ ENV PATH="$BUN_INSTALL/bin:$PATH" RUN curl -fsSL https://bun.sh/install | bash # use bun for node, npx -RUN cd /usr/local/bin && \ +RUN pushd /usr/local/bin && \ echo '#!/bin/sh' %3E npx && echo 'exec bunx "$@"' >> npx && chmod +x npx && \ - echo '#!/bin/sh' %3E node && echo 'exec bun "$@"' >> node && chmod +x node + echo '#!/bin/sh' %3E node && echo 'exec bun "$@"' >> node && chmod +x node && \ + popd # --- NEW SECTION: RUST SETUP --- @@ -73,49 +74,7 @@ ENV PATH="/root/.opencode/bin:$PATH" # 9. CONFIG PART 1: Hardware/Providers (opencode.json) # Maps your local ports to providers. -RUN mkdir -p /root/.config/opencode && \ -cat < /root/.config/opencode/opencode.json -{ - "plugin": [], - "theme": "system", - "model": "halo/qwen3-coder-next:latest", - "small_model": "halo/gemma3:4b", - "provider": { - "halo": { - "npm": "@ai-sdk/openai-compatible", - "name": "(local)", - "options": { "baseURL": "http://host.docker.internal:11434/v1" }, - "models": { "hf.co/unsloth/GLM-4.7-Flash-GGUF:Q6_K": { "name": "glm4.7" }, - "hf.co/LiquidAI/LFM2-24B-A2B-GGUF:Q8_0": { "name": "lfm2" }, - "qwen3-coder-next:latest": { "name": "qwen3" }, - "gemma3:4b": {"name": "Gemma"} - } - } - - }, - "server": { - "port": 4096, - "hostname": "0.0.0.0", - "mdns": true, - "cors": ["https://example.com"] - } -} -EOF -# 10. CONFIG PART 2: Agent Brains (oh-my-opencode.json) -# Maps Agent Roles to Providers. -RUN cat < /root/.config/opencode/oh-my-opencode.json -{ - "agents": { - "Sisyphus": { "model": "halo/glm47" }, - "Oracle": { "model": "halo/lfm2" }, - "Librarian": { "model": "halo/glm47" }, - "Hephaestus": { "model": "halo/qwen3" } - }, - "disabled_agents": ["multimodal-looker"], - "confirm_dangerous_actions": false -} -EOF #USER 1000:1000 WORKDIR /workspace diff --git a/opencode.cfg/oh-my-opencode.json b/opencode.cfg/oh-my-opencode.json new file mode 100644 index 0000000..3cb06c8 --- /dev/null +++ b/opencode.cfg/oh-my-opencode.json @@ -0,0 +1,10 @@ +{ + "agents": { + "Sisyphus": { "model": "halo/glm47" }, + "Oracle": { "model": "halo/lfm2" }, + "Librarian": { "model": "halo/glm47" }, + "Hephaestus": { "model": "halo/qwen3" } + }, + "disabled_agents": ["multimodal-looker"], + "confirm_dangerous_actions": false +} \ No newline at end of file diff --git a/zsh.add b/zsh.add index 2edf07c..08f53e3 100644 --- a/zsh.add +++ b/zsh.add @@ -14,6 +14,7 @@ function agent() { --name "$CONTAINER_NAME" \ --add-host=host.docker.internal:host-gateway \ -v "$TARGET_DIR:/workspace" \ + -v "$HOME/dev/ai/opencode.cfg:/root/.config/opencode" \ -v "$HOME/dev/ai/docker-images/starship.toml:/root/.config/starship.toml" \ -v opencode-cargo-cache:/root/.cargo \ -v opencode-go-cache:/root/go \