Skip to content

Commit efe4a49

Browse files
committed
v1.0.4
1 parent 4bd7506 commit efe4a49

5 files changed

Lines changed: 57 additions & 6 deletions

File tree

.env.example

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,14 @@ ANTHROPIC_API_KEY=
3434
# ENABLE_CLAUDE_AUTH=true
3535
# ENABLE_OH_MY_OPENAGENT=true
3636

37+
# === Plugin Updates ===
38+
# HOLYCODE_PLUGIN_UPDATE=manual # manual: install enabled plugins only if missing
39+
# HOLYCODE_PLUGIN_UPDATE=auto # auto: install if missing AND update enabled plugins on boot
40+
3741
# === OpenCode Behavior ===
3842
# OPENCODE_MODEL=claude-sonnet-4-6
3943
# OPENCODE_PERMISSION=auto
40-
# OPENCODE_DISABLE_AUTOUPDATE=true
44+
# OPENCODE_DISABLE_AUTOUPDATE=true # Only affects OpenCode itself, not plugins
4145
# OPENCODE_DISABLE_TERMINAL_TITLE=true
4246
# OPENCODE_DISABLE_LSP_DOWNLOAD=true
4347
# OPENCODE_DISABLE_AUTOCOMPACT=true

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ services:
356356
| `AZURE_OPENAI_ENDPOINT` | (none) | Azure OpenAI - set all three Azure vars |
357357
| `AZURE_OPENAI_API_KEY` | (none) | Azure OpenAI |
358358
| `AZURE_OPENAI_API_VERSION` | (none) | Azure OpenAI API version |
359-
| `OPENCODE_DISABLE_AUTOUPDATE` | `true` | Prevent OpenCode from self-updating inside the container |
359+
| `OPENCODE_DISABLE_AUTOUPDATE` | `true` | Prevent OpenCode from self-updating inside the container (does not affect plugins) |
360360
| `OPENCODE_DISABLE_TERMINAL_TITLE` | `true` | Prevent OpenCode from changing the terminal title |
361361
| `OPENCODE_MODEL` | (none) | Override the default model |
362362
| `OPENCODE_PERMISSION` | (none) | Set to `auto` to skip permission prompts |
@@ -367,12 +367,15 @@ services:
367367
| `OPENCODE_SERVER_USERNAME` | `opencode` | Username for web UI basic auth |
368368
| `ENABLE_CLAUDE_AUTH` | (none) | Set to `true` to use Claude subscription instead of API key |
369369
| `ENABLE_OH_MY_OPENAGENT` | (none) | Set to `true` to enable multi-agent orchestration plugin |
370+
| `HOLYCODE_PLUGIN_UPDATE` | `manual` | Plugin update mode: `manual` (install if missing) or `auto` (install and update on boot) |
370371

371372
> Plugin toggles (`ENABLE_CLAUDE_AUTH`, `ENABLE_OH_MY_OPENAGENT`) take effect on container restart. Set the env var and run `docker compose down && up -d`.
372373

374+
> `HOLYCODE_PLUGIN_UPDATE` controls plugin package updates. `manual` (default) installs enabled plugins only if they are missing. `auto` installs missing plugins and updates enabled plugins on every boot. This is separate from `OPENCODE_DISABLE_AUTOUPDATE`, which only affects OpenCode itself.
375+
373376
> `ENABLE_OH_MY_OPENAGENT=true` enables the plugin through the main OpenCode config at `/home/opencode/.config/opencode/opencode.json`. On the host, that file appears under whatever host path you bind to `/home/opencode`. On boot, HolyCode also checks whether the plugin package is missing and installs it if needed.
374377

375-
> `ENABLE_OH_MY_OPENAGENT=true` enables the plugin. The built-in `/oh-my-openagent-setup` skill is the supported way to create or update the plugin-specific config file at `~/.config/opencode/oh-my-openagent.jsonc`.
378+
> `ENABLE_OH_MY_OPENAGENT=true` enables the plugin and exposes the built-in `/oh-my-openagent-setup` skill. The skill only appears when the plugin is enabled. Use it to create or update the plugin-specific config file at `~/.config/opencode/oh-my-openagent.jsonc`.
376379

377380
> `GIT_USER_NAME` and `GIT_USER_EMAIL` are only applied on first boot. To re-apply, delete the sentinel file and restart: `docker exec holycode rm /home/opencode/.config/opencode/.holycode-bootstrapped` then `docker compose restart`.
378381

@@ -543,7 +546,7 @@ docker exec -it holycode bash -c "opencode providers login"
543546

544547
### oh-my-openagent setup and reconfiguration
545548

546-
If you enabled `ENABLE_OH_MY_OPENAGENT=true`, use the shipped setup skill to create or refresh the plugin-specific config:
549+
If you enabled `ENABLE_OH_MY_OPENAGENT=true`, the `/oh-my-openagent-setup` skill becomes available. Use it to create or refresh the plugin-specific config:
547550

548551
```text
549552
/oh-my-openagent-setup

docker-compose.full.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ services:
4949
# - AZURE_OPENAI_API_VERSION=
5050

5151
# --- OpenCode behavior (set by default in image, override if needed) ---
52+
# OPENCODE_DISABLE_AUTOUPDATE only affects OpenCode itself, not plugins
5253
# - OPENCODE_DISABLE_AUTOUPDATE=true
5354
# - OPENCODE_DISABLE_TERMINAL_TITLE=true
5455
# - OPENCODE_MODEL=claude-sonnet-4-6
@@ -71,3 +72,8 @@ services:
7172
# Installs automatically on first boot when enabled
7273
# Toggle on/off with docker compose down && up -d
7374
# - ENABLE_OH_MY_OPENAGENT=true
75+
76+
# --- Plugin Updates ---
77+
# manual: install enabled plugins only if missing (default)
78+
# auto: install if missing AND update enabled plugins on boot
79+
# - HOLYCODE_PLUGIN_UPDATE=manual

docs/CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,21 @@ All notable changes to HolyCode will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/), and this project adheres to [Semantic Versioning](https://semver.org/).
66

7-
## [1.0.3] - 04/04/2026
7+
## [1.0.4] - 04/04/2026
88

99
### Added
1010

11-
- Ship a built-in `/oh-my-openagent-setup` skill for first-time setup and reruns after provider changes
11+
- Ship a built-in `/oh-my-openagent-setup` skill for first-time setup and reruns after provider changes (only visible when `ENABLE_OH_MY_OPENAGENT=true`)
1212
- Copy HolyCode-managed OpenCode skills into `~/.config/opencode/skills` on boot without overwriting existing user skill folders
1313
- Ensure enabled plugin packages are installed on boot if they are missing from the OpenCode cache
14+
- Add `HOLYCODE_PLUGIN_UPDATE` environment variable with two modes: `manual` (install if missing only) and `auto` (install if missing and update on boot)
1415

1516
### Changed
1617

1718
- Document `/oh-my-openagent-setup` as the supported path for writing `oh-my-openagent.jsonc`
1819
- Document the default picker policy so only Sisyphus, Hephaestus, Prometheus, and Atlas are visible by default
20+
- Clarify that `OPENCODE_DISABLE_AUTOUPDATE` only affects OpenCode itself, not plugins
21+
- Clarify that `/oh-my-openagent-setup` skill only appears when the plugin is enabled
1922

2023
### Fixed
2124

scripts/entrypoint.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,41 @@ WORKSPACE_DIR="/workspace"
1414
sync_shipped_skills() {
1515
local source_skills_dir="/usr/local/share/holycode/skills"
1616
local target_skills_dir="$OC_HOME/.config/opencode/skills"
17+
local oh_my_openagent_skill="oh-my-openagent-setup"
1718

1819
[ -d "$source_skills_dir" ] || return 0
1920

2021
mkdir -p "$target_skills_dir"
2122
chown "$PUID:$PGID" "$target_skills_dir"
2223

24+
local oh_skill_target="$target_skills_dir/$oh_my_openagent_skill"
25+
local oh_skill_marker="$oh_skill_target/.holycode-managed"
26+
27+
if [ "${ENABLE_OH_MY_OPENAGENT}" = "true" ]; then
28+
if [ ! -e "$oh_skill_target" ]; then
29+
if [ -d "$source_skills_dir/$oh_my_openagent_skill" ]; then
30+
cp -R "$source_skills_dir/$oh_my_openagent_skill" "$oh_skill_target"
31+
touch "$oh_skill_marker"
32+
chown -R "$PUID:$PGID" "$oh_skill_target"
33+
echo "[entrypoint] Installed built-in skill '$oh_my_openagent_skill'"
34+
fi
35+
elif [ ! -f "$oh_skill_marker" ]; then
36+
echo "[entrypoint] Skill '$oh_my_openagent_skill' exists (not HolyCode-managed), skipping"
37+
fi
38+
else
39+
if [ -f "$oh_skill_marker" ]; then
40+
rm -rf "$oh_skill_target"
41+
echo "[entrypoint] Removed HolyCode-managed skill '$oh_my_openagent_skill'"
42+
fi
43+
fi
44+
2345
find "$source_skills_dir" -mindepth 1 -maxdepth 1 -type d | while read -r skill_dir; do
2446
local skill_name target_dir
2547
skill_name=$(basename "$skill_dir")
2648
target_dir="$target_skills_dir/$skill_name"
2749

50+
[ "$skill_name" = "$oh_my_openagent_skill" ] && continue
51+
2852
if [ -e "$target_dir" ]; then
2953
continue
3054
fi
@@ -38,8 +62,19 @@ sync_shipped_skills() {
3862
ensure_plugin_installed() {
3963
local plugin_name="$1"
4064
local plugin_dir="$OC_HOME/.cache/opencode/node_modules/$plugin_name"
65+
local update_mode="${HOLYCODE_PLUGIN_UPDATE:-manual}"
66+
67+
if [ "$update_mode" != "auto" ]; then
68+
update_mode="manual"
69+
fi
4170

4271
if [ -f "$plugin_dir/package.json" ]; then
72+
if [ "$update_mode" = "auto" ]; then
73+
echo "[entrypoint] Plugin '$plugin_name' updating (auto mode)"
74+
if ! runuser -u "$OC_USER" -- opencode plugin "$plugin_name" -g; then
75+
echo "[entrypoint] WARNING: Failed to update plugin '$plugin_name'"
76+
fi
77+
fi
4378
return 0
4479
fi
4580

0 commit comments

Comments
 (0)