v2.1.0: symlink OMOS bundled skills from image, bump opencode 1.17.4->1.17.5
Validate / base-change-warning (push) Successful in 7s
Validate / docs-check (push) Successful in 13s
Publish Docker Image / base-decide (push) Successful in 8s
Publish Docker Image / resolve-versions (push) Successful in 10s
Validate / validate-omos (push) Successful in 4m15s
Validate / validate-base (push) Successful in 5m2s
Publish Docker Image / build-base (push) Successful in 30m33s
Publish Docker Image / smoke-base (push) Successful in 3m20s
Publish Docker Image / smoke-omos (push) Successful in 4m24s
Publish Docker Image / build-variant-base (push) Successful in 13m37s
Publish Docker Image / build-variant-omos (push) Successful in 30m18s
Publish Docker Image / update-description (push) Successful in 6s
Publish Docker Image / promote-base-latest (push) Successful in 14s
Validate / base-change-warning (push) Successful in 7s
Validate / docs-check (push) Successful in 13s
Publish Docker Image / base-decide (push) Successful in 8s
Publish Docker Image / resolve-versions (push) Successful in 10s
Validate / validate-omos (push) Successful in 4m15s
Validate / validate-base (push) Successful in 5m2s
Publish Docker Image / build-base (push) Successful in 30m33s
Publish Docker Image / smoke-base (push) Successful in 3m20s
Publish Docker Image / smoke-omos (push) Successful in 4m24s
Publish Docker Image / build-variant-base (push) Successful in 13m37s
Publish Docker Image / build-variant-omos (push) Successful in 30m18s
Publish Docker Image / update-description (push) Successful in 6s
Publish Docker Image / promote-base-latest (push) Successful in 14s
Deploy the five oh-my-opencode-slim bundled skills (clonedeps, codemap, deepwork, oh-my-opencode-slim, simplify) by symlinking them from the image path into ~/.agents/skills/ on every container start, instead of the installer copying them into the persistent config volume on first run only. Image-sourced links mean 'docker compose pull' + recreate refreshes the skills with no installer run and no config reset; the old copy-on-first-run froze them in the volume forever. - entrypoint-user.sh: new non-fatal OMOS bundled-skills reconcile block (runs after skillset deploy so OMOS wins the simplify collision; absolute symlinks; gated by OMOS_SKILLS, now independent of ENABLE_OMOS). Both installer calls now pass --skills=no. One-time migration backs up (never deletes) frozen real copies in ~/.config/opencode/skills/ to .bak.<epoch>. - scripts/smoke-test.sh: assert the bundled-skills source path on omos. - Bump OPENCODE_VERSION 1.17.4 -> 1.17.5. - Versioning: document the move to independent image semver (v2.0.0 was the decouple point), mirroring pi-devbox. README/AGENTS/.env.example/CHANGELOG updated; new docs/omos-skills.md.
This commit is contained in:
+66
-9
@@ -118,6 +118,66 @@ if [ -n "$SKILLSET_DEPLOY" ]; then
|
||||
"$SKILLSET_DEPLOY" --bootstrap --prune-stale >/dev/null 2>&1 || true
|
||||
fi
|
||||
|
||||
# ── OMOS bundled skills: symlink from the image into the flat skills dir ──
|
||||
# The oh-my-opencode-slim package bundles its skills at a fixed, image-internal
|
||||
# path (npm global prefix /usr — see Dockerfile.variant). Historically the omos
|
||||
# *installer* COPIED them into ~/.config/opencode/skills/ on first run only,
|
||||
# freezing them in the persistent `devbox-opencode-config` named volume: pulling
|
||||
# a newer image never refreshed them, and the only update path was
|
||||
# `OMOS_RESET=true` (which also clobbers the user's hand-tuned opencode config).
|
||||
#
|
||||
# Instead we symlink them from the IMAGE into ~/.agents/skills/ — the same flat
|
||||
# dir skillset uses, which opencode scans (directly and via the ~/.claude/skills
|
||||
# pointer). Because the link targets live in the image, `docker compose pull` +
|
||||
# recreate updates the skills for free: no installer run, no config reset.
|
||||
#
|
||||
# ~/.agents/skills/ is authoritative. The legacy ~/.config/opencode/skills/ real
|
||||
# dir is intentionally bypassed; a one-time migration backs up (never destroys)
|
||||
# the frozen copies it holds so they stop shadowing the fresh image-sourced
|
||||
# skills. The migration marker lives in the parent config dir, not inside
|
||||
# skills/, so it never interferes with that directory's contents.
|
||||
#
|
||||
# Absolute symlink (not relative like skillset): the target is always inside the
|
||||
# container at a fixed /usr path, and ~/.agents/skills/ is an ephemeral
|
||||
# container-layer dir rebuilt each start — there is no host/container path
|
||||
# divergence to guard against. The whole block is non-fatal (`{ … } || true`):
|
||||
# a transient ln/mv failure must never brick container startup, mirroring the
|
||||
# skillset deploy above. Runs AFTER skillset deploy so OMOS wins any name
|
||||
# collision (e.g. `simplify`) via `ln -sfn`. Gated by OMOS_SKILLS (default true)
|
||||
# and the presence of the bundled skills (omos-variant images only).
|
||||
if [ "${OMOS_SKILLS:-true}" = "true" ]; then
|
||||
OMOS_SKILLS_SRC=""
|
||||
for cand in \
|
||||
/usr/lib/node_modules/oh-my-opencode-slim/src/skills \
|
||||
/usr/local/lib/node_modules/oh-my-opencode-slim/src/skills; do
|
||||
if [ -d "$cand" ]; then OMOS_SKILLS_SRC="$cand"; break; fi
|
||||
done
|
||||
if [ -n "$OMOS_SKILLS_SRC" ]; then
|
||||
{
|
||||
AGENTS_SKILLS_DIR="$HOME/.agents/skills"
|
||||
OPENCODE_SKILLS_DIR="$HOME/.config/opencode/skills"
|
||||
OMOS_SKILLS_MARKER="$HOME/.config/opencode/.omos-skills-migrated"
|
||||
mkdir -p "$AGENTS_SKILLS_DIR"
|
||||
for skill_path in "$OMOS_SKILLS_SRC"/*/; do
|
||||
[ -d "$skill_path" ] || continue
|
||||
name="$(basename "$skill_path")"
|
||||
# OMOS wins collisions: -f replaces an existing symlink (e.g. skillset's).
|
||||
ln -sfn "${skill_path%/}" "$AGENTS_SKILLS_DIR/$name"
|
||||
# One-time unshadow: back up — never destroy — the frozen real copy the
|
||||
# old installer left in the persistent config volume. `! -L` ensures we
|
||||
# only ever touch a real dir, never a symlink a user/skillset created.
|
||||
if [ ! -f "$OMOS_SKILLS_MARKER" ] \
|
||||
&& [ -d "$OPENCODE_SKILLS_DIR/$name" ] \
|
||||
&& [ ! -L "$OPENCODE_SKILLS_DIR/$name" ]; then
|
||||
mv "${OPENCODE_SKILLS_DIR:?}/$name" \
|
||||
"${OPENCODE_SKILLS_DIR}/${name}.bak.$(date +%s)"
|
||||
fi
|
||||
done
|
||||
touch "$OMOS_SKILLS_MARKER" 2>/dev/null || true
|
||||
} || true
|
||||
fi
|
||||
fi
|
||||
|
||||
CONFIG_DIR="$HOME/.config/opencode"
|
||||
OMOS_CONFIG="$CONFIG_DIR/oh-my-opencode-slim.json"
|
||||
|
||||
@@ -139,15 +199,14 @@ if [ "${ENABLE_OMOS:-false}" = "true" ]; then
|
||||
OMOS_TMUX_FLAG="yes"
|
||||
fi
|
||||
|
||||
OMOS_SKILLS_FLAG="yes"
|
||||
if [ "${OMOS_SKILLS:-true}" = "false" ]; then
|
||||
OMOS_SKILLS_FLAG="no"
|
||||
fi
|
||||
|
||||
# Skills are NOT installer-managed any more — they are symlinked from the
|
||||
# image into ~/.agents/skills/ by the OMOS bundled-skills block above
|
||||
# (gated by OMOS_SKILLS). Always pass --skills=no so the installer never
|
||||
# writes frozen copies into the persistent config volume.
|
||||
bun x oh-my-opencode-slim@latest install \
|
||||
--no-tui \
|
||||
--tmux="${OMOS_TMUX_FLAG}" \
|
||||
--skills="${OMOS_SKILLS_FLAG}"
|
||||
--skills=no
|
||||
|
||||
echo "oh-my-opencode-slim configured successfully."
|
||||
else
|
||||
@@ -158,13 +217,11 @@ if [ "${ENABLE_OMOS:-false}" = "true" ]; then
|
||||
echo "OMOS_RESET=true — regenerating oh-my-opencode-slim config..."
|
||||
OMOS_TMUX_FLAG="no"
|
||||
[ "${OMOS_TMUX:-false}" = "true" ] && OMOS_TMUX_FLAG="yes"
|
||||
OMOS_SKILLS_FLAG="yes"
|
||||
[ "${OMOS_SKILLS:-true}" = "false" ] && OMOS_SKILLS_FLAG="no"
|
||||
|
||||
bun x oh-my-opencode-slim@latest install \
|
||||
--no-tui \
|
||||
--tmux="${OMOS_TMUX_FLAG}" \
|
||||
--skills="${OMOS_SKILLS_FLAG}" \
|
||||
--skills=no \
|
||||
--reset
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user