📦 Mini Me
08483f7 parent: 0614934 added
00-prepare-release.sh +75 -0 | new file mode 100755 | ||
| @@ -0,0 +1,75 @@ | ||
| 1 | +#!/bin/bash | |
| 2 | +: <<'COMMENT' | |
| 3 | +Update the versions written in the kit descriptors and sbxenv.yaml from release.env. | |
| 4 | + | |
| 5 | +1. Update MINI_ME_VERSION, PREVIOUS_TAG and TAG in release.env | |
| 6 | +2. Run this script: ./01-prepare-release.sh | |
| 7 | + - DOCKER_HUB_NAMESPACE=foo ./01-prepare-release.sh if the kits are pushed under another namespace | |
| 8 | +3. Check the diff, then ./01-release.tag.sh | |
| 9 | + | |
| 10 | +What it changes: | |
| 11 | + - every kit descriptor (a yaml starting with `# syntax=docker/sandbox-kit`): | |
| 12 | + provides: ["mini-me@<MINI_ME_VERSION>", ...] | |
| 13 | + args.mm_version.default: "v<MINI_ME_VERSION>" | |
| 14 | + version: "<PREVIOUS_TAG>" -> "<TAG>" (without the leading "v") | |
| 15 | + - every yaml (kit descriptors and sbxenv.yaml): | |
| 16 | + docker.io/<NAMESPACE>/<kit>:<PREVIOUS_TAG> -> :<TAG> (without the leading "v") | |
| 17 | + | |
| 18 | +A `version:` that is neither PREVIOUS_TAG nor TAG is left alone and reported: | |
| 19 | +it may be versioned on purpose, independently of the release. | |
| 20 | +COMMENT | |
| 21 | + | |
| 22 | +set -euo pipefail | |
| 23 | + | |
| 24 | +set -o allexport | |
| 25 | +source release.env | |
| 26 | +set +o allexport | |
| 27 | + | |
| 28 | +NAMESPACE="${DOCKER_HUB_NAMESPACE:-k33g}" | |
| 29 | +# Docker Hub tags are usually written without the leading "v": v0.0.2 -> 0.0.2 | |
| 30 | +VERSION="${TAG#v}" | |
| 31 | +PREVIOUS_VERSION="${PREVIOUS_TAG#v}" | |
| 32 | +MINI_ME_VERSION="${MINI_ME_VERSION#v}" | |
| 33 | + | |
| 34 | +if [ "${VERSION}" = "${PREVIOUS_VERSION}" ]; then | |
| 35 | + echo "❌ TAG and PREVIOUS_TAG are the same (${TAG}): bump TAG in release.env" | |
| 36 | + exit 1 | |
| 37 | +fi | |
| 38 | + | |
| 39 | +echo "Preparing release ${PREVIOUS_TAG} -> ${TAG} (mini-me ${MINI_ME_VERSION})" | |
| 40 | + | |
| 41 | +# perl rather than sed: `sed -i` takes different arguments on macOS and Linux. | |
| 42 | +export VERSION PREVIOUS_VERSION MINI_ME_VERSION NAMESPACE | |
| 43 | + | |
| 44 | +# Kit descriptors are found by their syntax line, so a new kit needs no change here. | |
| 45 | +KITS=() | |
| 46 | +while IFS= read -r f; do | |
| 47 | + KITS+=("$f") | |
| 48 | +done < <(find . -path ./.git -prune -o -name '*.yaml' -type f -print | sort | while IFS= read -r f; do | |
| 49 | + head -n 1 "$f" | grep -q '^# syntax=docker/sandbox-kit' && echo "$f" | |
| 50 | +done) | |
| 51 | + | |
| 52 | +for f in "${KITS[@]}"; do | |
| 53 | + perl -0pi -e ' | |
| 54 | + s/"mini-me@[^"]*"/"mini-me\@$ENV{MINI_ME_VERSION}"/g; | |
| 55 | + # the first `default:` of the mm_version arg, comments in between allowed | |
| 56 | + s/(^[ \t]*mm_version:[ \t]*\n(?:[ \t]*#.*\n)*[ \t]*default:[ \t]*")v?[^"]*(")/$1v$ENV{MINI_ME_VERSION}$2/m; | |
| 57 | + s/^version:[ \t]*"\Q$ENV{PREVIOUS_VERSION}\E"/version: "$ENV{VERSION}"/m; | |
| 58 | + ' "$f" | |
| 59 | + | |
| 60 | + current="$(sed -n 's/^version:[[:space:]]*"\{0,1\}\([^"]*\)"\{0,1\}[[:space:]]*$/\1/p' "$f")" | |
| 61 | + if [ -n "${current}" ] && [ "${current}" != "${VERSION}" ]; then | |
| 62 | + echo "⚠️ ${f}: version \"${current}\" left as is (neither ${PREVIOUS_VERSION} nor ${VERSION})" | |
| 63 | + fi | |
| 64 | +done | |
| 65 | + | |
| 66 | +for f in "${KITS[@]}" ./sbxenv.yaml; do | |
| 67 | + [ -f "$f" ] || continue | |
| 68 | + perl -pi -e ' | |
| 69 | + s{(docker\.io/\Q$ENV{NAMESPACE}\E/[\w.-]+):\Q$ENV{PREVIOUS_VERSION}\E(?![\w.-])}{$1:$ENV{VERSION}}g; | |
| 70 | + ' "$f" | |
| 71 | +done | |
| 72 | + | |
| 73 | +echo "✅ Versions updated" | |
| 74 | +git --no-pager diff --stat -- "${KITS[@]}" ./sbxenv.yaml 2>/dev/null || true | |
| 75 | +echo "💡 Check the diff, then: ./01-release.tag.sh" | |
| new file mode 100755 | |||
| @@ -0,0 +1,75 @@ | |||
| 1 | +#!/bin/bash | ||
| 2 | +: <<'COMMENT' | ||
| 3 | +Update the versions written in the kit descriptors and sbxenv.yaml from release.env. | ||
| 4 | + | ||
| 5 | +1. Update MINI_ME_VERSION, PREVIOUS_TAG and TAG in release.env | ||
| 6 | +2. Run this script: ./01-prepare-release.sh | ||
| 7 | + - DOCKER_HUB_NAMESPACE=foo ./01-prepare-release.sh if the kits are pushed under another namespace | ||
| 8 | +3. Check the diff, then ./01-release.tag.sh | ||
| 9 | + | ||
| 10 | +What it changes: | ||
| 11 | + - every kit descriptor (a yaml starting with `# syntax=docker/sandbox-kit`): | ||
| 12 | + provides: ["mini-me@<MINI_ME_VERSION>", ...] | ||
| 13 | + args.mm_version.default: "v<MINI_ME_VERSION>" | ||
| 14 | + version: "<PREVIOUS_TAG>" -> "<TAG>" (without the leading "v") | ||
| 15 | + - every yaml (kit descriptors and sbxenv.yaml): | ||
| 16 | + docker.io/<NAMESPACE>/<kit>:<PREVIOUS_TAG> -> :<TAG> (without the leading "v") | ||
| 17 | + | ||
| 18 | +A `version:` that is neither PREVIOUS_TAG nor TAG is left alone and reported: | ||
| 19 | +it may be versioned on purpose, independently of the release. | ||
| 20 | +COMMENT | ||
| 21 | + | ||
| 22 | +set -euo pipefail | ||
| 23 | + | ||
| 24 | +set -o allexport | ||
| 25 | +source release.env | ||
| 26 | +set +o allexport | ||
| 27 | + | ||
| 28 | +NAMESPACE="${DOCKER_HUB_NAMESPACE:-k33g}" | ||
| 29 | +# Docker Hub tags are usually written without the leading "v": v0.0.2 -> 0.0.2 | ||
| 30 | +VERSION="${TAG#v}" | ||
| 31 | +PREVIOUS_VERSION="${PREVIOUS_TAG#v}" | ||
| 32 | +MINI_ME_VERSION="${MINI_ME_VERSION#v}" | ||
| 33 | + | ||
| 34 | +if [ "${VERSION}" = "${PREVIOUS_VERSION}" ]; then | ||
| 35 | + echo "❌ TAG and PREVIOUS_TAG are the same (${TAG}): bump TAG in release.env" | ||
| 36 | + exit 1 | ||
| 37 | +fi | ||
| 38 | + | ||
| 39 | +echo "Preparing release ${PREVIOUS_TAG} -> ${TAG} (mini-me ${MINI_ME_VERSION})" | ||
| 40 | + | ||
| 41 | +# perl rather than sed: `sed -i` takes different arguments on macOS and Linux. | ||
| 42 | +export VERSION PREVIOUS_VERSION MINI_ME_VERSION NAMESPACE | ||
| 43 | + | ||
| 44 | +# Kit descriptors are found by their syntax line, so a new kit needs no change here. | ||
| 45 | +KITS=() | ||
| 46 | +while IFS= read -r f; do | ||
| 47 | + KITS+=("$f") | ||
| 48 | +done < <(find . -path ./.git -prune -o -name '*.yaml' -type f -print | sort | while IFS= read -r f; do | ||
| 49 | + head -n 1 "$f" | grep -q '^# syntax=docker/sandbox-kit' && echo "$f" | ||
| 50 | +done) | ||
| 51 | + | ||
| 52 | +for f in "${KITS[@]}"; do | ||
| 53 | + perl -0pi -e ' | ||
| 54 | + s/"mini-me@[^"]*"/"mini-me\@$ENV{MINI_ME_VERSION}"/g; | ||
| 55 | + # the first `default:` of the mm_version arg, comments in between allowed | ||
| 56 | + s/(^[ \t]*mm_version:[ \t]*\n(?:[ \t]*#.*\n)*[ \t]*default:[ \t]*")v?[^"]*(")/$1v$ENV{MINI_ME_VERSION}$2/m; | ||
| 57 | + s/^version:[ \t]*"\Q$ENV{PREVIOUS_VERSION}\E"/version: "$ENV{VERSION}"/m; | ||
| 58 | + ' "$f" | ||
| 59 | + | ||
| 60 | + current="$(sed -n 's/^version:[[:space:]]*"\{0,1\}\([^"]*\)"\{0,1\}[[:space:]]*$/\1/p' "$f")" | ||
| 61 | + if [ -n "${current}" ] && [ "${current}" != "${VERSION}" ]; then | ||
| 62 | + echo "⚠️ ${f}: version \"${current}\" left as is (neither ${PREVIOUS_VERSION} nor ${VERSION})" | ||
| 63 | + fi | ||
| 64 | +done | ||
| 65 | + | ||
| 66 | +for f in "${KITS[@]}" ./sbxenv.yaml; do | ||
| 67 | + [ -f "$f" ] || continue | ||
| 68 | + perl -pi -e ' | ||
| 69 | + s{(docker\.io/\Q$ENV{NAMESPACE}\E/[\w.-]+):\Q$ENV{PREVIOUS_VERSION}\E(?![\w.-])}{$1:$ENV{VERSION}}g; | ||
| 70 | + ' "$f" | ||
| 71 | +done | ||
| 72 | + | ||
| 73 | +echo "✅ Versions updated" | ||
| 74 | +git --no-pager diff --stat -- "${KITS[@]}" ./sbxenv.yaml 2>/dev/null || true | ||
| 75 | +echo "💡 Check the diff, then: ./01-release.tag.sh" | ||
modified
01-release.tag.sh +0 -0 | old mode 100644 | ||
| new mode 100755 |
| old mode 100644 | |||
| new mode 100755 |
modified
04-publish-rust-toolchain-kit.sh +0 -0 | old mode 100644 | ||
| new mode 100755 |
| old mode 100644 | |||
| new mode 100755 |
renamed
06-publish-nushell-kit.sh +11 -11 | similarity index 66% | ||
| rename from 06-publish-nushell-toolchain-kit.sh | ||
| rename to 06-publish-nushell-kit.sh | ||
| @@ -1,18 +1,18 @@ | ||
| 1 | 1 | #!/bin/bash |
| 2 | 2 | : <<'COMMENT' |
| 3 | -Publish the nushell-toolchain kit (a mixin) to Docker Hub as an OCI image. | |
| 3 | +Publish the nushell kit (a mixin) to Docker Hub as an OCI image. | |
| 4 | 4 | Doc: https://docs.docker.com/ai/sandboxes/customize/author/distribute/ |
| 5 | 5 | |
| 6 | 6 | 1. docker login (once, with the Docker Hub account) |
| 7 | 7 | 2. Update TAG in release.env (shared with 01-release.tag.sh) |
| 8 | -3. Run this script: ./06-publish-nushell-toolchain-kit.sh | |
| 9 | - - DOCKER_HUB_NAMESPACE=foo ./06-publish-nushell-toolchain-kit.sh to push under another namespace | |
| 10 | - - SIGN=1 ./06-publish-nushell-toolchain-kit.sh to sign the kit after the push | |
| 11 | - (keyless, `sbx kit sign`) | |
| 8 | +3. Run this script: ./06-publish-nushell-kit.sh | |
| 9 | + - DOCKER_HUB_NAMESPACE=foo ./06-publish-nushell-kit.sh to push under another namespace | |
| 10 | + - SIGN=1 ./06-publish-nushell-kit.sh to sign the kit after the push | |
| 11 | + (keyless, `sbx kit sign`) | |
| 12 | 12 | |
| 13 | 13 | Then anyone can add it to a sandbox: |
| 14 | 14 | sbx run --name mm-demo docker.io/<NAMESPACE>/mini-me-kit:<TAG> \ |
| 15 | - --kit docker.io/<NAMESPACE>/nushell-toolchain-kit:<TAG> | |
| 15 | + --kit docker.io/<NAMESPACE>/nushell-kit:<TAG> | |
| 16 | 16 | COMMENT |
| 17 | 17 | |
| 18 | 18 | set -euo pipefail |
| @@ -22,11 +22,11 @@ source release.env | ||
| 22 | 22 | set +o allexport |
| 23 | 23 | |
| 24 | 24 | NAMESPACE="${DOCKER_HUB_NAMESPACE:-k33g}" |
| 25 | -KIT_DIR="./kits/nushell-toolchain" | |
| 26 | -KIT_FILE="${KIT_DIR}/nushell-toolchain.yaml" | |
| 25 | +KIT_DIR="./kits/nushell" | |
| 26 | +KIT_FILE="${KIT_DIR}/nushell.yaml" | |
| 27 | 27 | # Docker Hub tags are usually written without the leading "v": v0.0.2 -> 0.0.2 |
| 28 | 28 | VERSION="${TAG#v}" |
| 29 | -IMAGE="docker.io/${NAMESPACE}/nushell-toolchain-kit" | |
| 29 | +IMAGE="docker.io/${NAMESPACE}/nushell-kit" | |
| 30 | 30 | PLATFORMS="linux/amd64,linux/arm64" |
| 31 | 31 | |
| 32 | 32 | echo "Publishing ${IMAGE}:${VERSION} (and :latest) for ${PLATFORMS}" |
| @@ -39,9 +39,9 @@ if ! docker buildx inspect "${BUILDER}" >/dev/null 2>&1; then | ||
| 39 | 39 | docker buildx create --name "${BUILDER}" --driver docker-container >/dev/null |
| 40 | 40 | fi |
| 41 | 41 | |
| 42 | -# The descriptor (nushell-toolchain.yaml) is passed as the "Dockerfile": its | |
| 42 | +# The descriptor (nushell.yaml) is passed as the "Dockerfile": its | |
| 43 | 43 | # `# syntax=docker/sandbox-kit:3` line selects the kit frontend, which builds |
| 44 | -# the overlay from nushell-toolchain.dockerfile and packs the kit metadata with it. | |
| 44 | +# the overlay from nushell.dockerfile and packs the kit metadata with it. | |
| 45 | 45 | docker buildx build "${KIT_DIR}" -f "${KIT_FILE}" \ |
| 46 | 46 | --builder "${BUILDER}" \ |
| 47 | 47 | --platform "${PLATFORMS}" \ |
| similarity index 66% | |||
| rename from 06-publish-nushell-toolchain-kit.sh | |||
| rename to 06-publish-nushell-kit.sh | |||
| @@ -1,18 +1,18 @@ | |||
| 1 | #!/bin/bash | 1 | #!/bin/bash |
| 2 | : <<'COMMENT' | 2 | : <<'COMMENT' |
| 3 | -Publish the nushell-toolchain kit (a mixin) to Docker Hub as an OCI image. | 3 | +Publish the nushell kit (a mixin) to Docker Hub as an OCI image. |
| 4 | Doc: https://docs.docker.com/ai/sandboxes/customize/author/distribute/ | 4 | Doc: https://docs.docker.com/ai/sandboxes/customize/author/distribute/ |
| 5 | 5 | ||
| 6 | 1. docker login (once, with the Docker Hub account) | 6 | 1. docker login (once, with the Docker Hub account) |
| 7 | 2. Update TAG in release.env (shared with 01-release.tag.sh) | 7 | 2. Update TAG in release.env (shared with 01-release.tag.sh) |
| 8 | -3. Run this script: ./06-publish-nushell-toolchain-kit.sh | 8 | +3. Run this script: ./06-publish-nushell-kit.sh |
| 9 | - - DOCKER_HUB_NAMESPACE=foo ./06-publish-nushell-toolchain-kit.sh to push under another namespace | 9 | + - DOCKER_HUB_NAMESPACE=foo ./06-publish-nushell-kit.sh to push under another namespace |
| 10 | - - SIGN=1 ./06-publish-nushell-toolchain-kit.sh to sign the kit after the push | 10 | + - SIGN=1 ./06-publish-nushell-kit.sh to sign the kit after the push |
| 11 | - (keyless, `sbx kit sign`) | 11 | + (keyless, `sbx kit sign`) |
| 12 | 12 | ||
| 13 | Then anyone can add it to a sandbox: | 13 | Then anyone can add it to a sandbox: |
| 14 | sbx run --name mm-demo docker.io/<NAMESPACE>/mini-me-kit:<TAG> \ | 14 | sbx run --name mm-demo docker.io/<NAMESPACE>/mini-me-kit:<TAG> \ |
| 15 | - --kit docker.io/<NAMESPACE>/nushell-toolchain-kit:<TAG> | 15 | + --kit docker.io/<NAMESPACE>/nushell-kit:<TAG> |
| 16 | COMMENT | 16 | COMMENT |
| 17 | 17 | ||
| 18 | set -euo pipefail | 18 | set -euo pipefail |
| @@ -22,11 +22,11 @@ source release.env | |||
| 22 | set +o allexport | 22 | set +o allexport |
| 23 | 23 | ||
| 24 | NAMESPACE="${DOCKER_HUB_NAMESPACE:-k33g}" | 24 | NAMESPACE="${DOCKER_HUB_NAMESPACE:-k33g}" |
| 25 | -KIT_DIR="./kits/nushell-toolchain" | 25 | +KIT_DIR="./kits/nushell" |
| 26 | -KIT_FILE="${KIT_DIR}/nushell-toolchain.yaml" | 26 | +KIT_FILE="${KIT_DIR}/nushell.yaml" |
| 27 | # Docker Hub tags are usually written without the leading "v": v0.0.2 -> 0.0.2 | 27 | # Docker Hub tags are usually written without the leading "v": v0.0.2 -> 0.0.2 |
| 28 | VERSION="${TAG#v}" | 28 | VERSION="${TAG#v}" |
| 29 | -IMAGE="docker.io/${NAMESPACE}/nushell-toolchain-kit" | 29 | +IMAGE="docker.io/${NAMESPACE}/nushell-kit" |
| 30 | PLATFORMS="linux/amd64,linux/arm64" | 30 | PLATFORMS="linux/amd64,linux/arm64" |
| 31 | 31 | ||
| 32 | echo "Publishing ${IMAGE}:${VERSION} (and :latest) for ${PLATFORMS}" | 32 | echo "Publishing ${IMAGE}:${VERSION} (and :latest) for ${PLATFORMS}" |
| @@ -39,9 +39,9 @@ if ! docker buildx inspect "${BUILDER}" >/dev/null 2>&1; then | |||
| 39 | docker buildx create --name "${BUILDER}" --driver docker-container >/dev/null | 39 | docker buildx create --name "${BUILDER}" --driver docker-container >/dev/null |
| 40 | fi | 40 | fi |
| 41 | 41 | ||
| 42 | -# The descriptor (nushell-toolchain.yaml) is passed as the "Dockerfile": its | 42 | +# The descriptor (nushell.yaml) is passed as the "Dockerfile": its |
| 43 | # `# syntax=docker/sandbox-kit:3` line selects the kit frontend, which builds | 43 | # `# syntax=docker/sandbox-kit:3` line selects the kit frontend, which builds |
| 44 | -# the overlay from nushell-toolchain.dockerfile and packs the kit metadata with it. | 44 | +# the overlay from nushell.dockerfile and packs the kit metadata with it. |
| 45 | docker buildx build "${KIT_DIR}" -f "${KIT_FILE}" \ | 45 | docker buildx build "${KIT_DIR}" -f "${KIT_FILE}" \ |
| 46 | --builder "${BUILDER}" \ | 46 | --builder "${BUILDER}" \ |
| 47 | --platform "${PLATFORMS}" \ | 47 | --platform "${PLATFORMS}" \ |
added
07-publish-mini-me-agent-kit.sh +57 -0 | new file mode 100755 | ||
| @@ -0,0 +1,57 @@ | ||
| 1 | +#!/bin/bash | |
| 2 | +: <<'COMMENT' | |
| 3 | +Publish the mini-me-agent kit (a mixin: mm on top of any agent) to Docker Hub as an OCI image. | |
| 4 | +Doc: https://docs.docker.com/ai/sandboxes/customize/author/distribute/ | |
| 5 | + | |
| 6 | +1. docker login (once, with the Docker Hub account) | |
| 7 | +2. Update TAG in release.env (shared with 01-release.tag.sh) | |
| 8 | +3. Run this script: ./07-publish-mini-me-agent-kit.sh | |
| 9 | + - DOCKER_HUB_NAMESPACE=foo ./07-publish-mini-me-agent-kit.sh to push under another namespace | |
| 10 | + - SIGN=1 ./07-publish-mini-me-agent-kit.sh to sign the kit after the push | |
| 11 | + (keyless, `sbx kit sign`) | |
| 12 | + | |
| 13 | +Then anyone can add mm to a sandbox running another agent: | |
| 14 | + sbx run --name mm-agent <agent> \ | |
| 15 | + --kit docker.io/<NAMESPACE>/mini-me-agent-kit:<TAG> | |
| 16 | +COMMENT | |
| 17 | + | |
| 18 | +set -euo pipefail | |
| 19 | + | |
| 20 | +set -o allexport | |
| 21 | +source release.env | |
| 22 | +set +o allexport | |
| 23 | + | |
| 24 | +NAMESPACE="${DOCKER_HUB_NAMESPACE:-k33g}" | |
| 25 | +KIT_DIR="./mini-me-agent" | |
| 26 | +KIT_FILE="${KIT_DIR}/mini-me-agent.yaml" | |
| 27 | +# Docker Hub tags are usually written without the leading "v": v0.0.2 -> 0.0.2 | |
| 28 | +VERSION="${TAG#v}" | |
| 29 | +IMAGE="docker.io/${NAMESPACE}/mini-me-agent-kit" | |
| 30 | +PLATFORMS="linux/amd64,linux/arm64" | |
| 31 | + | |
| 32 | +echo "Publishing ${IMAGE}:${VERSION} (and :latest) for ${PLATFORMS}" | |
| 33 | + | |
| 34 | +# A multi-platform push needs a builder that can do it: the default "docker" | |
| 35 | +# driver cannot (unless the containerd image store is on), so use a | |
| 36 | +# docker-container builder, created once and reused afterwards. | |
| 37 | +BUILDER="sandbox-kit-builder" | |
| 38 | +if ! docker buildx inspect "${BUILDER}" >/dev/null 2>&1; then | |
| 39 | + docker buildx create --name "${BUILDER}" --driver docker-container >/dev/null | |
| 40 | +fi | |
| 41 | + | |
| 42 | +# The descriptor (mini-me-agent.yaml) is passed as the "Dockerfile": its | |
| 43 | +# `# syntax=docker/sandbox-kit:3` line selects the kit frontend, which builds | |
| 44 | +# the overlay from mini-me-agent.dockerfile and packs the kit metadata with it. | |
| 45 | +docker buildx build "${KIT_DIR}" -f "${KIT_FILE}" \ | |
| 46 | + --builder "${BUILDER}" \ | |
| 47 | + --platform "${PLATFORMS}" \ | |
| 48 | + -t "${IMAGE}:${VERSION}" \ | |
| 49 | + -t "${IMAGE}:latest" \ | |
| 50 | + --push | |
| 51 | + | |
| 52 | +if [ "${SIGN:-0}" = "1" ]; then | |
| 53 | + sbx kit sign "${IMAGE}:${VERSION}" | |
| 54 | +fi | |
| 55 | + | |
| 56 | +echo "✅ Published ${IMAGE}:${VERSION}" | |
| 57 | +echo "💡 Try it: sbx run --name mm-agent <agent> --kit ${IMAGE}:${VERSION}" | |
| new file mode 100755 | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | +#!/bin/bash | ||
| 2 | +: <<'COMMENT' | ||
| 3 | +Publish the mini-me-agent kit (a mixin: mm on top of any agent) to Docker Hub as an OCI image. | ||
| 4 | +Doc: https://docs.docker.com/ai/sandboxes/customize/author/distribute/ | ||
| 5 | + | ||
| 6 | +1. docker login (once, with the Docker Hub account) | ||
| 7 | +2. Update TAG in release.env (shared with 01-release.tag.sh) | ||
| 8 | +3. Run this script: ./07-publish-mini-me-agent-kit.sh | ||
| 9 | + - DOCKER_HUB_NAMESPACE=foo ./07-publish-mini-me-agent-kit.sh to push under another namespace | ||
| 10 | + - SIGN=1 ./07-publish-mini-me-agent-kit.sh to sign the kit after the push | ||
| 11 | + (keyless, `sbx kit sign`) | ||
| 12 | + | ||
| 13 | +Then anyone can add mm to a sandbox running another agent: | ||
| 14 | + sbx run --name mm-agent <agent> \ | ||
| 15 | + --kit docker.io/<NAMESPACE>/mini-me-agent-kit:<TAG> | ||
| 16 | +COMMENT | ||
| 17 | + | ||
| 18 | +set -euo pipefail | ||
| 19 | + | ||
| 20 | +set -o allexport | ||
| 21 | +source release.env | ||
| 22 | +set +o allexport | ||
| 23 | + | ||
| 24 | +NAMESPACE="${DOCKER_HUB_NAMESPACE:-k33g}" | ||
| 25 | +KIT_DIR="./mini-me-agent" | ||
| 26 | +KIT_FILE="${KIT_DIR}/mini-me-agent.yaml" | ||
| 27 | +# Docker Hub tags are usually written without the leading "v": v0.0.2 -> 0.0.2 | ||
| 28 | +VERSION="${TAG#v}" | ||
| 29 | +IMAGE="docker.io/${NAMESPACE}/mini-me-agent-kit" | ||
| 30 | +PLATFORMS="linux/amd64,linux/arm64" | ||
| 31 | + | ||
| 32 | +echo "Publishing ${IMAGE}:${VERSION} (and :latest) for ${PLATFORMS}" | ||
| 33 | + | ||
| 34 | +# A multi-platform push needs a builder that can do it: the default "docker" | ||
| 35 | +# driver cannot (unless the containerd image store is on), so use a | ||
| 36 | +# docker-container builder, created once and reused afterwards. | ||
| 37 | +BUILDER="sandbox-kit-builder" | ||
| 38 | +if ! docker buildx inspect "${BUILDER}" >/dev/null 2>&1; then | ||
| 39 | + docker buildx create --name "${BUILDER}" --driver docker-container >/dev/null | ||
| 40 | +fi | ||
| 41 | + | ||
| 42 | +# The descriptor (mini-me-agent.yaml) is passed as the "Dockerfile": its | ||
| 43 | +# `# syntax=docker/sandbox-kit:3` line selects the kit frontend, which builds | ||
| 44 | +# the overlay from mini-me-agent.dockerfile and packs the kit metadata with it. | ||
| 45 | +docker buildx build "${KIT_DIR}" -f "${KIT_FILE}" \ | ||
| 46 | + --builder "${BUILDER}" \ | ||
| 47 | + --platform "${PLATFORMS}" \ | ||
| 48 | + -t "${IMAGE}:${VERSION}" \ | ||
| 49 | + -t "${IMAGE}:latest" \ | ||
| 50 | + --push | ||
| 51 | + | ||
| 52 | +if [ "${SIGN:-0}" = "1" ]; then | ||
| 53 | + sbx kit sign "${IMAGE}:${VERSION}" | ||
| 54 | +fi | ||
| 55 | + | ||
| 56 | +echo "✅ Published ${IMAGE}:${VERSION}" | ||
| 57 | +echo "💡 Try it: sbx run --name mm-agent <agent> --kit ${IMAGE}:${VERSION}" | ||
added
08-publish-vscode-ssh-kit.sh +58 -0 | new file mode 100755 | ||
| @@ -0,0 +1,58 @@ | ||
| 1 | +#!/bin/bash | |
| 2 | +: <<'COMMENT' | |
| 3 | +Publish the vscode-ssh kit (shell sandbox driven from the host's VS Code over Remote-SSH) to Docker Hub as an OCI image. | |
| 4 | +Doc: https://docs.docker.com/ai/sandboxes/customize/author/distribute/ | |
| 5 | + | |
| 6 | +1. docker login (once, with the Docker Hub account) | |
| 7 | +2. Update TAG in release.env (shared with 01-release.tag.sh) | |
| 8 | +3. Run this script: ./08-publish-vscode-ssh-kit.sh | |
| 9 | + - DOCKER_HUB_NAMESPACE=foo ./08-publish-vscode-ssh-kit.sh to push under another namespace | |
| 10 | + - SIGN=1 ./08-publish-vscode-ssh-kit.sh to sign the kit after the push | |
| 11 | + (keyless, `sbx kit sign`) | |
| 12 | + | |
| 13 | +Then anyone can use it: | |
| 14 | + sbx setup ssh | |
| 15 | + sbx create --name my-box docker.io/<NAMESPACE>/vscode-ssh-kit:<TAG> /path/to/workspace | |
| 16 | + code --remote ssh-remote+my-box.sbx /path/to/workspace | |
| 17 | +COMMENT | |
| 18 | + | |
| 19 | +set -euo pipefail | |
| 20 | + | |
| 21 | +set -o allexport | |
| 22 | +source release.env | |
| 23 | +set +o allexport | |
| 24 | + | |
| 25 | +NAMESPACE="${DOCKER_HUB_NAMESPACE:-k33g}" | |
| 26 | +KIT_DIR="./kits/vscode-ssh" | |
| 27 | +KIT_FILE="${KIT_DIR}/kit.yaml" | |
| 28 | +# Docker Hub tags are usually written without the leading "v": v0.0.2 -> 0.0.2 | |
| 29 | +VERSION="${TAG#v}" | |
| 30 | +IMAGE="docker.io/${NAMESPACE}/vscode-ssh-kit" | |
| 31 | +PLATFORMS="linux/amd64,linux/arm64" | |
| 32 | + | |
| 33 | +echo "Publishing ${IMAGE}:${VERSION} (and :latest) for ${PLATFORMS}" | |
| 34 | + | |
| 35 | +# A multi-platform push needs a builder that can do it: the default "docker" | |
| 36 | +# driver cannot (unless the containerd image store is on), so use a | |
| 37 | +# docker-container builder, created once and reused afterwards. | |
| 38 | +BUILDER="sandbox-kit-builder" | |
| 39 | +if ! docker buildx inspect "${BUILDER}" >/dev/null 2>&1; then | |
| 40 | + docker buildx create --name "${BUILDER}" --driver docker-container >/dev/null | |
| 41 | +fi | |
| 42 | + | |
| 43 | +# The descriptor (kit.yaml) is passed as the "Dockerfile": its | |
| 44 | +# `# syntax=docker/sandbox-kit:3` line selects the kit frontend, which builds | |
| 45 | +# the workload from kit.dockerfile and packs the kit metadata with it. | |
| 46 | +docker buildx build "${KIT_DIR}" -f "${KIT_FILE}" \ | |
| 47 | + --builder "${BUILDER}" \ | |
| 48 | + --platform "${PLATFORMS}" \ | |
| 49 | + -t "${IMAGE}:${VERSION}" \ | |
| 50 | + -t "${IMAGE}:latest" \ | |
| 51 | + --push | |
| 52 | + | |
| 53 | +if [ "${SIGN:-0}" = "1" ]; then | |
| 54 | + sbx kit sign "${IMAGE}:${VERSION}" | |
| 55 | +fi | |
| 56 | + | |
| 57 | +echo "✅ Published ${IMAGE}:${VERSION}" | |
| 58 | +echo "💡 Try it: sbx create --name my-box ${IMAGE}:${VERSION} /path/to/workspace && code --remote ssh-remote+my-box.sbx /path/to/workspace" | |
| new file mode 100755 | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | +#!/bin/bash | ||
| 2 | +: <<'COMMENT' | ||
| 3 | +Publish the vscode-ssh kit (shell sandbox driven from the host's VS Code over Remote-SSH) to Docker Hub as an OCI image. | ||
| 4 | +Doc: https://docs.docker.com/ai/sandboxes/customize/author/distribute/ | ||
| 5 | + | ||
| 6 | +1. docker login (once, with the Docker Hub account) | ||
| 7 | +2. Update TAG in release.env (shared with 01-release.tag.sh) | ||
| 8 | +3. Run this script: ./08-publish-vscode-ssh-kit.sh | ||
| 9 | + - DOCKER_HUB_NAMESPACE=foo ./08-publish-vscode-ssh-kit.sh to push under another namespace | ||
| 10 | + - SIGN=1 ./08-publish-vscode-ssh-kit.sh to sign the kit after the push | ||
| 11 | + (keyless, `sbx kit sign`) | ||
| 12 | + | ||
| 13 | +Then anyone can use it: | ||
| 14 | + sbx setup ssh | ||
| 15 | + sbx create --name my-box docker.io/<NAMESPACE>/vscode-ssh-kit:<TAG> /path/to/workspace | ||
| 16 | + code --remote ssh-remote+my-box.sbx /path/to/workspace | ||
| 17 | +COMMENT | ||
| 18 | + | ||
| 19 | +set -euo pipefail | ||
| 20 | + | ||
| 21 | +set -o allexport | ||
| 22 | +source release.env | ||
| 23 | +set +o allexport | ||
| 24 | + | ||
| 25 | +NAMESPACE="${DOCKER_HUB_NAMESPACE:-k33g}" | ||
| 26 | +KIT_DIR="./kits/vscode-ssh" | ||
| 27 | +KIT_FILE="${KIT_DIR}/kit.yaml" | ||
| 28 | +# Docker Hub tags are usually written without the leading "v": v0.0.2 -> 0.0.2 | ||
| 29 | +VERSION="${TAG#v}" | ||
| 30 | +IMAGE="docker.io/${NAMESPACE}/vscode-ssh-kit" | ||
| 31 | +PLATFORMS="linux/amd64,linux/arm64" | ||
| 32 | + | ||
| 33 | +echo "Publishing ${IMAGE}:${VERSION} (and :latest) for ${PLATFORMS}" | ||
| 34 | + | ||
| 35 | +# A multi-platform push needs a builder that can do it: the default "docker" | ||
| 36 | +# driver cannot (unless the containerd image store is on), so use a | ||
| 37 | +# docker-container builder, created once and reused afterwards. | ||
| 38 | +BUILDER="sandbox-kit-builder" | ||
| 39 | +if ! docker buildx inspect "${BUILDER}" >/dev/null 2>&1; then | ||
| 40 | + docker buildx create --name "${BUILDER}" --driver docker-container >/dev/null | ||
| 41 | +fi | ||
| 42 | + | ||
| 43 | +# The descriptor (kit.yaml) is passed as the "Dockerfile": its | ||
| 44 | +# `# syntax=docker/sandbox-kit:3` line selects the kit frontend, which builds | ||
| 45 | +# the workload from kit.dockerfile and packs the kit metadata with it. | ||
| 46 | +docker buildx build "${KIT_DIR}" -f "${KIT_FILE}" \ | ||
| 47 | + --builder "${BUILDER}" \ | ||
| 48 | + --platform "${PLATFORMS}" \ | ||
| 49 | + -t "${IMAGE}:${VERSION}" \ | ||
| 50 | + -t "${IMAGE}:latest" \ | ||
| 51 | + --push | ||
| 52 | + | ||
| 53 | +if [ "${SIGN:-0}" = "1" ]; then | ||
| 54 | + sbx kit sign "${IMAGE}:${VERSION}" | ||
| 55 | +fi | ||
| 56 | + | ||
| 57 | +echo "✅ Published ${IMAGE}:${VERSION}" | ||
| 58 | +echo "💡 Try it: sbx create --name my-box ${IMAGE}:${VERSION} /path/to/workspace && code --remote ssh-remote+my-box.sbx /path/to/workspace" | ||
added
09-publish-zed-ssh-kit.sh +58 -0 | new file mode 100755 | ||
| @@ -0,0 +1,58 @@ | ||
| 1 | +#!/bin/bash | |
| 2 | +: <<'COMMENT' | |
| 3 | +Publish the zed-ssh kit (shell sandbox driven from the host's Zed, remote development over SSH) to Docker Hub as an OCI image. | |
| 4 | +Doc: https://docs.docker.com/ai/sandboxes/customize/author/distribute/ | |
| 5 | + | |
| 6 | +1. docker login (once, with the Docker Hub account) | |
| 7 | +2. Update TAG in release.env (shared with 01-release.tag.sh) | |
| 8 | +3. Run this script: ./09-publish-zed-ssh-kit.sh | |
| 9 | + - DOCKER_HUB_NAMESPACE=foo ./09-publish-zed-ssh-kit.sh to push under another namespace | |
| 10 | + - SIGN=1 ./09-publish-zed-ssh-kit.sh to sign the kit after the push | |
| 11 | + (keyless, `sbx kit sign`) | |
| 12 | + | |
| 13 | +Then anyone can use it: | |
| 14 | + sbx setup ssh | |
| 15 | + sbx create --name my-box docker.io/<NAMESPACE>/zed-ssh-kit:<TAG> /path/to/workspace | |
| 16 | + zed --new ssh://my-box.sbx/path/to/workspace | |
| 17 | +COMMENT | |
| 18 | + | |
| 19 | +set -euo pipefail | |
| 20 | + | |
| 21 | +set -o allexport | |
| 22 | +source release.env | |
| 23 | +set +o allexport | |
| 24 | + | |
| 25 | +NAMESPACE="${DOCKER_HUB_NAMESPACE:-k33g}" | |
| 26 | +KIT_DIR="./kits/zed-ssh" | |
| 27 | +KIT_FILE="${KIT_DIR}/kit.yaml" | |
| 28 | +# Docker Hub tags are usually written without the leading "v": v0.0.2 -> 0.0.2 | |
| 29 | +VERSION="${TAG#v}" | |
| 30 | +IMAGE="docker.io/${NAMESPACE}/zed-ssh-kit" | |
| 31 | +PLATFORMS="linux/amd64,linux/arm64" | |
| 32 | + | |
| 33 | +echo "Publishing ${IMAGE}:${VERSION} (and :latest) for ${PLATFORMS}" | |
| 34 | + | |
| 35 | +# A multi-platform push needs a builder that can do it: the default "docker" | |
| 36 | +# driver cannot (unless the containerd image store is on), so use a | |
| 37 | +# docker-container builder, created once and reused afterwards. | |
| 38 | +BUILDER="sandbox-kit-builder" | |
| 39 | +if ! docker buildx inspect "${BUILDER}" >/dev/null 2>&1; then | |
| 40 | + docker buildx create --name "${BUILDER}" --driver docker-container >/dev/null | |
| 41 | +fi | |
| 42 | + | |
| 43 | +# The descriptor (kit.yaml) is passed as the "Dockerfile": its | |
| 44 | +# `# syntax=docker/sandbox-kit:3` line selects the kit frontend, which builds | |
| 45 | +# the workload from kit.dockerfile and packs the kit metadata with it. | |
| 46 | +docker buildx build "${KIT_DIR}" -f "${KIT_FILE}" \ | |
| 47 | + --builder "${BUILDER}" \ | |
| 48 | + --platform "${PLATFORMS}" \ | |
| 49 | + -t "${IMAGE}:${VERSION}" \ | |
| 50 | + -t "${IMAGE}:latest" \ | |
| 51 | + --push | |
| 52 | + | |
| 53 | +if [ "${SIGN:-0}" = "1" ]; then | |
| 54 | + sbx kit sign "${IMAGE}:${VERSION}" | |
| 55 | +fi | |
| 56 | + | |
| 57 | +echo "✅ Published ${IMAGE}:${VERSION}" | |
| 58 | +echo "💡 Try it: sbx create --name my-box ${IMAGE}:${VERSION} /path/to/workspace && zed --new ssh://my-box.sbx/path/to/workspace" | |
| new file mode 100755 | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | +#!/bin/bash | ||
| 2 | +: <<'COMMENT' | ||
| 3 | +Publish the zed-ssh kit (shell sandbox driven from the host's Zed, remote development over SSH) to Docker Hub as an OCI image. | ||
| 4 | +Doc: https://docs.docker.com/ai/sandboxes/customize/author/distribute/ | ||
| 5 | + | ||
| 6 | +1. docker login (once, with the Docker Hub account) | ||
| 7 | +2. Update TAG in release.env (shared with 01-release.tag.sh) | ||
| 8 | +3. Run this script: ./09-publish-zed-ssh-kit.sh | ||
| 9 | + - DOCKER_HUB_NAMESPACE=foo ./09-publish-zed-ssh-kit.sh to push under another namespace | ||
| 10 | + - SIGN=1 ./09-publish-zed-ssh-kit.sh to sign the kit after the push | ||
| 11 | + (keyless, `sbx kit sign`) | ||
| 12 | + | ||
| 13 | +Then anyone can use it: | ||
| 14 | + sbx setup ssh | ||
| 15 | + sbx create --name my-box docker.io/<NAMESPACE>/zed-ssh-kit:<TAG> /path/to/workspace | ||
| 16 | + zed --new ssh://my-box.sbx/path/to/workspace | ||
| 17 | +COMMENT | ||
| 18 | + | ||
| 19 | +set -euo pipefail | ||
| 20 | + | ||
| 21 | +set -o allexport | ||
| 22 | +source release.env | ||
| 23 | +set +o allexport | ||
| 24 | + | ||
| 25 | +NAMESPACE="${DOCKER_HUB_NAMESPACE:-k33g}" | ||
| 26 | +KIT_DIR="./kits/zed-ssh" | ||
| 27 | +KIT_FILE="${KIT_DIR}/kit.yaml" | ||
| 28 | +# Docker Hub tags are usually written without the leading "v": v0.0.2 -> 0.0.2 | ||
| 29 | +VERSION="${TAG#v}" | ||
| 30 | +IMAGE="docker.io/${NAMESPACE}/zed-ssh-kit" | ||
| 31 | +PLATFORMS="linux/amd64,linux/arm64" | ||
| 32 | + | ||
| 33 | +echo "Publishing ${IMAGE}:${VERSION} (and :latest) for ${PLATFORMS}" | ||
| 34 | + | ||
| 35 | +# A multi-platform push needs a builder that can do it: the default "docker" | ||
| 36 | +# driver cannot (unless the containerd image store is on), so use a | ||
| 37 | +# docker-container builder, created once and reused afterwards. | ||
| 38 | +BUILDER="sandbox-kit-builder" | ||
| 39 | +if ! docker buildx inspect "${BUILDER}" >/dev/null 2>&1; then | ||
| 40 | + docker buildx create --name "${BUILDER}" --driver docker-container >/dev/null | ||
| 41 | +fi | ||
| 42 | + | ||
| 43 | +# The descriptor (kit.yaml) is passed as the "Dockerfile": its | ||
| 44 | +# `# syntax=docker/sandbox-kit:3` line selects the kit frontend, which builds | ||
| 45 | +# the workload from kit.dockerfile and packs the kit metadata with it. | ||
| 46 | +docker buildx build "${KIT_DIR}" -f "${KIT_FILE}" \ | ||
| 47 | + --builder "${BUILDER}" \ | ||
| 48 | + --platform "${PLATFORMS}" \ | ||
| 49 | + -t "${IMAGE}:${VERSION}" \ | ||
| 50 | + -t "${IMAGE}:latest" \ | ||
| 51 | + --push | ||
| 52 | + | ||
| 53 | +if [ "${SIGN:-0}" = "1" ]; then | ||
| 54 | + sbx kit sign "${IMAGE}:${VERSION}" | ||
| 55 | +fi | ||
| 56 | + | ||
| 57 | +echo "✅ Published ${IMAGE}:${VERSION}" | ||
| 58 | +echo "💡 Try it: sbx create --name my-box ${IMAGE}:${VERSION} /path/to/workspace && zed --new ssh://my-box.sbx/path/to/workspace" | ||
modified
README.md +13 -6 | @@ -118,29 +118,36 @@ Add them to any of the kits above with `--kit`: | ||
| 118 | 118 | |---|---|---| |
| 119 | 119 | | `./kits/go-toolchain` | `go`, `gofmt`, `gopls` | `go_version` | |
| 120 | 120 | | `./kits/rust-toolchain` | `cargo`, `rustc`, `rustfmt`, `clippy`, `rust-analyzer`, plus `gcc` (linker, C build scripts) | `rust_version` | |
| 121 | -| `./kits/nushell-toolchain` | `nu` (static binary) | `nushell_version` | | |
| 121 | +| `./kits/nushell` | `nu` (static binary) | `nushell_version` | | |
| 122 | 122 | |
| 123 | 123 | ```bash |
| 124 | 124 | cd demo |
| 125 | 125 | sbx run -d --name mm-editor -p 8080:3000 ../mini-me-editor \ |
| 126 | ---kit ../kits/go-toolchain --kit ../kits/rust-toolchain --kit ../kits/nushell-toolchain | |
| 126 | +--kit ../kits/go-toolchain --kit ../kits/rust-toolchain --kit ../kits/nushell | |
| 127 | 127 | ``` |
| 128 | 128 | |
| 129 | 129 | ## Release & publish |
| 130 | 130 | |
| 131 | -1. Update `TAG` and `ABOUT` in `release.env` | |
| 132 | -2. Tag the release (commit, push, tag, push the tag): | |
| 131 | +1. Update `TAG`, `PREVIOUS_TAG`, `MINI_ME_VERSION` and `ABOUT` in `release.env` | |
| 132 | +2. Update the versions in the kit descriptors and `sbxenv.yaml`, then check the diff: | |
| 133 | + ```bash | |
| 134 | + ./01-prepare-release.sh | |
| 135 | + ``` | |
| 136 | +3. Tag the release (commit, push, tag, push the tag): | |
| 133 | 137 | ```bash |
| 134 | 138 | ./01-release.tag.sh |
| 135 | 139 | ``` |
| 136 | -3. Publish the kits to Docker Hub (`linux/amd64` + `linux/arm64`, tags `<TAG without v>` and `latest`): | |
| 140 | +4. Publish the kits to Docker Hub (`linux/amd64` + `linux/arm64`, tags `<TAG without v>` and `latest`): | |
| 137 | 141 | ```bash |
| 138 | 142 | docker login |
| 139 | 143 | ./02-publish-kit.sh # ./mini-me -> k33g/mini-me-kit |
| 140 | 144 | ./03-publish-go-toolchain-kit.sh # ./kits/go-toolchain -> k33g/go-toolchain-kit |
| 141 | 145 | ./04-publish-rust-toolchain-kit.sh # ./kits/rust-toolchain -> k33g/rust-toolchain-kit |
| 142 | 146 | ./05-publish-mini-me-editor-kit.sh # ./mini-me-editor -> k33g/mini-me-editor-kit |
| 143 | - ./06-publish-nushell-toolchain-kit.sh # ./kits/nushell-toolchain -> k33g/nushell-toolchain-kit | |
| 147 | + ./06-publish-nushell-kit.sh # ./kits/nushell -> k33g/nushell-kit | |
| 148 | + ./07-publish-mini-me-agent-kit.sh # ./mini-me-agent -> k33g/mini-me-agent-kit | |
| 149 | + ./08-publish-vscode-ssh-kit.sh # ./kits/vscode-ssh -> k33g/vscode-ssh-kit | |
| 150 | + ./09-publish-zed-ssh-kit.sh # ./kits/zed-ssh -> k33g/zed-ssh-kit | |
| 144 | 151 | ``` |
| 145 | 152 | - `DOCKER_HUB_NAMESPACE=<namespace>` to push under another namespace (default: `k33g`) |
| 146 | 153 | - `SIGN=1` to sign the kit after the push (`sbx kit sign`) |
| @@ -118,29 +118,36 @@ Add them to any of the kits above with `--kit`: | |||
| 118 | |---|---|---| | 118 | |---|---|---| |
| 119 | | `./kits/go-toolchain` | `go`, `gofmt`, `gopls` | `go_version` | | 119 | | `./kits/go-toolchain` | `go`, `gofmt`, `gopls` | `go_version` | |
| 120 | | `./kits/rust-toolchain` | `cargo`, `rustc`, `rustfmt`, `clippy`, `rust-analyzer`, plus `gcc` (linker, C build scripts) | `rust_version` | | 120 | | `./kits/rust-toolchain` | `cargo`, `rustc`, `rustfmt`, `clippy`, `rust-analyzer`, plus `gcc` (linker, C build scripts) | `rust_version` | |
| 121 | -| `./kits/nushell-toolchain` | `nu` (static binary) | `nushell_version` | | 121 | +| `./kits/nushell` | `nu` (static binary) | `nushell_version` | |
| 122 | 122 | ||
| 123 | ```bash | 123 | ```bash |
| 124 | cd demo | 124 | cd demo |
| 125 | sbx run -d --name mm-editor -p 8080:3000 ../mini-me-editor \ | 125 | sbx run -d --name mm-editor -p 8080:3000 ../mini-me-editor \ |
| 126 | ---kit ../kits/go-toolchain --kit ../kits/rust-toolchain --kit ../kits/nushell-toolchain | 126 | +--kit ../kits/go-toolchain --kit ../kits/rust-toolchain --kit ../kits/nushell |
| 127 | ``` | 127 | ``` |
| 128 | 128 | ||
| 129 | ## Release & publish | 129 | ## Release & publish |
| 130 | 130 | ||
| 131 | -1. Update `TAG` and `ABOUT` in `release.env` | 131 | +1. Update `TAG`, `PREVIOUS_TAG`, `MINI_ME_VERSION` and `ABOUT` in `release.env` |
| 132 | -2. Tag the release (commit, push, tag, push the tag): | 132 | +2. Update the versions in the kit descriptors and `sbxenv.yaml`, then check the diff: |
| 133 | + ```bash | ||
| 134 | + ./01-prepare-release.sh | ||
| 135 | + ``` | ||
| 136 | +3. Tag the release (commit, push, tag, push the tag): | ||
| 133 | ```bash | 137 | ```bash |
| 134 | ./01-release.tag.sh | 138 | ./01-release.tag.sh |
| 135 | ``` | 139 | ``` |
| 136 | -3. Publish the kits to Docker Hub (`linux/amd64` + `linux/arm64`, tags `<TAG without v>` and `latest`): | 140 | +4. Publish the kits to Docker Hub (`linux/amd64` + `linux/arm64`, tags `<TAG without v>` and `latest`): |
| 137 | ```bash | 141 | ```bash |
| 138 | docker login | 142 | docker login |
| 139 | ./02-publish-kit.sh # ./mini-me -> k33g/mini-me-kit | 143 | ./02-publish-kit.sh # ./mini-me -> k33g/mini-me-kit |
| 140 | ./03-publish-go-toolchain-kit.sh # ./kits/go-toolchain -> k33g/go-toolchain-kit | 144 | ./03-publish-go-toolchain-kit.sh # ./kits/go-toolchain -> k33g/go-toolchain-kit |
| 141 | ./04-publish-rust-toolchain-kit.sh # ./kits/rust-toolchain -> k33g/rust-toolchain-kit | 145 | ./04-publish-rust-toolchain-kit.sh # ./kits/rust-toolchain -> k33g/rust-toolchain-kit |
| 142 | ./05-publish-mini-me-editor-kit.sh # ./mini-me-editor -> k33g/mini-me-editor-kit | 146 | ./05-publish-mini-me-editor-kit.sh # ./mini-me-editor -> k33g/mini-me-editor-kit |
| 143 | - ./06-publish-nushell-toolchain-kit.sh # ./kits/nushell-toolchain -> k33g/nushell-toolchain-kit | 147 | + ./06-publish-nushell-kit.sh # ./kits/nushell -> k33g/nushell-kit |
| 148 | + ./07-publish-mini-me-agent-kit.sh # ./mini-me-agent -> k33g/mini-me-agent-kit | ||
| 149 | + ./08-publish-vscode-ssh-kit.sh # ./kits/vscode-ssh -> k33g/vscode-ssh-kit | ||
| 150 | + ./09-publish-zed-ssh-kit.sh # ./kits/zed-ssh -> k33g/zed-ssh-kit | ||
| 144 | ``` | 151 | ``` |
| 145 | - `DOCKER_HUB_NAMESPACE=<namespace>` to push under another namespace (default: `k33g`) | 152 | - `DOCKER_HUB_NAMESPACE=<namespace>` to push under another namespace (default: `k33g`) |
| 146 | - `SIGN=1` to sign the kit after the push (`sbx kit sign`) | 153 | - `SIGN=1` to sign the kit after the push (`sbx kit sign`) |
modified
demo/agent.yaml +8 -2 | @@ -9,8 +9,8 @@ | ||
| 9 | 9 | provider: llmman |
| 10 | 10 | |
| 11 | 11 | # The model id exactly as `llmman list` / GET /v1/models spells it. |
| 12 | -# model: hf.co/Menlo/Jan-nano-gguf:Q4_K_M | |
| 13 | -model: huggingface.co/jetbrains/mellum2-12b-a2.5b-instruct-gguf-q4_k_m:Q4_K_M | |
| 12 | +# model: hf.co/jetbrains/mellum2-12b-a2.5b-instruct-gguf-q4_k_m:Q4_K_M | |
| 13 | +model: hf.co/JetBrains/Mellum2-12B-A2.5B-Instruct-GGUF-Q8_0:Q8_0 | |
| 14 | 14 | |
| 15 | 15 | # `llmman serve`'s default bind; the OpenAI routes sit under /v1. |
| 16 | 16 | baseUrl: http://127.0.0.1:17434/v1 |
| @@ -180,6 +180,12 @@ sampling: | ||
| 180 | 180 | top_p: 0.9 |
| 181 | 181 | max_tokens: 4096 |
| 182 | 182 | |
| 183 | + #chat_template_kwargs: | |
| 184 | + #enable_thinking: false | |
| 185 | + # low | medium | xhigh — any other value makes every request fail. | |
| 186 | + #reasoning_effort: low | |
| 187 | + | |
| 188 | + | |
| 183 | 189 | # Silence allowed between two tokens once the answer has started. |
| 184 | 190 | watchdogTimeout: 30s |
| 185 | 191 | |
| @@ -9,8 +9,8 @@ | |||
| 9 | provider: llmman | 9 | provider: llmman |
| 10 | 10 | ||
| 11 | # The model id exactly as `llmman list` / GET /v1/models spells it. | 11 | # The model id exactly as `llmman list` / GET /v1/models spells it. |
| 12 | -# model: hf.co/Menlo/Jan-nano-gguf:Q4_K_M | 12 | +# model: hf.co/jetbrains/mellum2-12b-a2.5b-instruct-gguf-q4_k_m:Q4_K_M |
| 13 | -model: huggingface.co/jetbrains/mellum2-12b-a2.5b-instruct-gguf-q4_k_m:Q4_K_M | 13 | +model: hf.co/JetBrains/Mellum2-12B-A2.5B-Instruct-GGUF-Q8_0:Q8_0 |
| 14 | 14 | ||
| 15 | # `llmman serve`'s default bind; the OpenAI routes sit under /v1. | 15 | # `llmman serve`'s default bind; the OpenAI routes sit under /v1. |
| 16 | baseUrl: http://127.0.0.1:17434/v1 | 16 | baseUrl: http://127.0.0.1:17434/v1 |
| @@ -180,6 +180,12 @@ sampling: | |||
| 180 | top_p: 0.9 | 180 | top_p: 0.9 |
| 181 | max_tokens: 4096 | 181 | max_tokens: 4096 |
| 182 | 182 | ||
| 183 | + #chat_template_kwargs: | ||
| 184 | + #enable_thinking: false | ||
| 185 | + # low | medium | xhigh — any other value makes every request fail. | ||
| 186 | + #reasoning_effort: low | ||
| 187 | + | ||
| 188 | + | ||
| 183 | # Silence allowed between two tokens once the answer has started. | 189 | # Silence allowed between two tokens once the answer has started. |
| 184 | watchdogTimeout: 30s | 190 | watchdogTimeout: 30s |
| 185 | 191 | ||
modified
kits/go-toolchain/go-toolchain.yaml +2 -0 | @@ -3,6 +3,8 @@ schemaVersion: "3" | ||
| 3 | 3 | kind: mixin |
| 4 | 4 | displayName: Go toolchain |
| 5 | 5 | description: Go toolchain and gopls (language server) |
| 6 | +licenses: [MIT] | |
| 7 | +version: "0.3.0" | |
| 6 | 8 | |
| 7 | 9 | args: |
| 8 | 10 | go_version: |
| @@ -3,6 +3,8 @@ schemaVersion: "3" | |||
| 3 | kind: mixin | 3 | kind: mixin |
| 4 | displayName: Go toolchain | 4 | displayName: Go toolchain |
| 5 | description: Go toolchain and gopls (language server) | 5 | description: Go toolchain and gopls (language server) |
| 6 | +licenses: [MIT] | ||
| 7 | +version: "0.3.0" | ||
| 6 | 8 | ||
| 7 | args: | 9 | args: |
| 8 | go_version: | 10 | go_version: |
renamed
kits/nushell/nushell-context.md +0 -0 | similarity index 100% | ||
| rename from kits/nushell-toolchain/nushell-context.md | ||
| rename to kits/nushell/nushell-context.md |
| similarity index 100% | |||
| rename from kits/nushell-toolchain/nushell-context.md | |||
| rename to kits/nushell/nushell-context.md |
renamed
kits/nushell/nushell.dockerfile +0 -0 | similarity index 100% | ||
| rename from kits/nushell-toolchain/nushell-toolchain.dockerfile | ||
| rename to kits/nushell/nushell.dockerfile |
| similarity index 100% | |||
| rename from kits/nushell-toolchain/nushell-toolchain.dockerfile | |||
| rename to kits/nushell/nushell.dockerfile |
renamed
kits/nushell/nushell.yaml +3 -1 | similarity index 91% | ||
| rename from kits/nushell-toolchain/nushell-toolchain.yaml | ||
| rename to kits/nushell/nushell.yaml | ||
| @@ -1,8 +1,10 @@ | ||
| 1 | 1 | # syntax=docker/sandbox-kit:3 |
| 2 | 2 | schemaVersion: "3" |
| 3 | 3 | kind: mixin |
| 4 | -displayName: Nushell toolchain | |
| 4 | +displayName: Nushell | |
| 5 | 5 | description: Nushell (nu), a structured-data shell |
| 6 | +licenses: [MIT] | |
| 7 | +version: "0.3.0" | |
| 6 | 8 | |
| 7 | 9 | args: |
| 8 | 10 | nushell_version: |
| similarity index 91% | |||
| rename from kits/nushell-toolchain/nushell-toolchain.yaml | |||
| rename to kits/nushell/nushell.yaml | |||
| @@ -1,8 +1,10 @@ | |||
| 1 | # syntax=docker/sandbox-kit:3 | 1 | # syntax=docker/sandbox-kit:3 |
| 2 | schemaVersion: "3" | 2 | schemaVersion: "3" |
| 3 | kind: mixin | 3 | kind: mixin |
| 4 | -displayName: Nushell toolchain | 4 | +displayName: Nushell |
| 5 | description: Nushell (nu), a structured-data shell | 5 | description: Nushell (nu), a structured-data shell |
| 6 | +licenses: [MIT] | ||
| 7 | +version: "0.3.0" | ||
| 6 | 8 | ||
| 7 | args: | 9 | args: |
| 8 | nushell_version: | 10 | nushell_version: |
modified
kits/rust-toolchain/rust-toolchain.yaml +3 -0 | @@ -4,6 +4,9 @@ kind: mixin | ||
| 4 | 4 | displayName: Rust toolchain |
| 5 | 5 | description: Rust toolchain (cargo, rustc, rustfmt, clippy) and rust-analyzer (language server) |
| 6 | 6 | |
| 7 | +licenses: [MIT] | |
| 8 | +version: "0.3.0" | |
| 9 | + | |
| 7 | 10 | args: |
| 8 | 11 | rust_version: |
| 9 | 12 | # A Rust release (e.g. 1.99.0), or stable / beta / nightly (not reproducible). |
| @@ -4,6 +4,9 @@ kind: mixin | |||
| 4 | displayName: Rust toolchain | 4 | displayName: Rust toolchain |
| 5 | description: Rust toolchain (cargo, rustc, rustfmt, clippy) and rust-analyzer (language server) | 5 | description: Rust toolchain (cargo, rustc, rustfmt, clippy) and rust-analyzer (language server) |
| 6 | 6 | ||
| 7 | +licenses: [MIT] | ||
| 8 | +version: "0.3.0" | ||
| 9 | + | ||
| 7 | args: | 10 | args: |
| 8 | rust_version: | 11 | rust_version: |
| 9 | # A Rust release (e.g. 1.99.0), or stable / beta / nightly (not reproducible). | 12 | # A Rust release (e.g. 1.99.0), or stable / beta / nightly (not reproducible). |
added
kits/vscode-ssh/config/machine-settings.json +6 -0 | new file mode 100644 | ||
| @@ -0,0 +1,6 @@ | ||
| 1 | +{ | |
| 2 | + "telemetry.telemetryLevel": "off", | |
| 3 | + "update.mode": "none", | |
| 4 | + "extensions.autoUpdate": false, | |
| 5 | + "terminal.integrated.defaultProfile.linux": "bash" | |
| 6 | +} | |
| new file mode 100644 | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | +{ | ||
| 2 | + "telemetry.telemetryLevel": "off", | ||
| 3 | + "update.mode": "none", | ||
| 4 | + "extensions.autoUpdate": false, | ||
| 5 | + "terminal.integrated.defaultProfile.linux": "bash" | ||
| 6 | +} | ||
added
kits/vscode-ssh/kit.dockerfile +27 -0 | new file mode 100644 | ||
| @@ -0,0 +1,27 @@ | ||
| 1 | +# syntax=docker/dockerfile:1 | |
| 2 | +# vscode-ssh: the shell template, plus what the VS Code server expects on a | |
| 3 | +# Remote-SSH host. The template's entrypoint (bash) is kept: VS Code reaches the | |
| 4 | +# sandbox through the sbx SSH endpoint, not through the entrypoint. | |
| 5 | +FROM docker/sandbox-templates:shell | |
| 6 | + | |
| 7 | +USER root | |
| 8 | + | |
| 9 | +# The VS Code server is a glibc Node.js build: it needs libstdc++, and tar/gzip | |
| 10 | +# plus curl or wget to unpack (or fetch) itself. procps gives it `ps` for its | |
| 11 | +# process checks. Most are already in the template; listing them keeps the kit | |
| 12 | +# working if the template slims down. | |
| 13 | +RUN set -eux; \ | |
| 14 | + apt-get update; \ | |
| 15 | + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | |
| 16 | + libstdc++6 tar gzip curl wget ca-certificates procps git; \ | |
| 17 | + rm -rf /var/lib/apt/lists/* | |
| 18 | + | |
| 19 | +USER agent | |
| 20 | + | |
| 21 | +# Default machine settings for the VS Code server, applied to every Remote-SSH | |
| 22 | +# window on this sandbox (the user's host settings still win for UI options). | |
| 23 | +RUN --mount=type=bind,target=/tmp/kit set -eux; \ | |
| 24 | + install -D -m 0644 /tmp/kit/config/machine-settings.json \ | |
| 25 | + /home/agent/.vscode-server/data/Machine/settings.json | |
| 26 | + | |
| 27 | +WORKDIR /home/agent/workspace | |
| new file mode 100644 | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | +# syntax=docker/dockerfile:1 | ||
| 2 | +# vscode-ssh: the shell template, plus what the VS Code server expects on a | ||
| 3 | +# Remote-SSH host. The template's entrypoint (bash) is kept: VS Code reaches the | ||
| 4 | +# sandbox through the sbx SSH endpoint, not through the entrypoint. | ||
| 5 | +FROM docker/sandbox-templates:shell | ||
| 6 | + | ||
| 7 | +USER root | ||
| 8 | + | ||
| 9 | +# The VS Code server is a glibc Node.js build: it needs libstdc++, and tar/gzip | ||
| 10 | +# plus curl or wget to unpack (or fetch) itself. procps gives it `ps` for its | ||
| 11 | +# process checks. Most are already in the template; listing them keeps the kit | ||
| 12 | +# working if the template slims down. | ||
| 13 | +RUN set -eux; \ | ||
| 14 | + apt-get update; \ | ||
| 15 | + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | ||
| 16 | + libstdc++6 tar gzip curl wget ca-certificates procps git; \ | ||
| 17 | + rm -rf /var/lib/apt/lists/* | ||
| 18 | + | ||
| 19 | +USER agent | ||
| 20 | + | ||
| 21 | +# Default machine settings for the VS Code server, applied to every Remote-SSH | ||
| 22 | +# window on this sandbox (the user's host settings still win for UI options). | ||
| 23 | +RUN --mount=type=bind,target=/tmp/kit set -eux; \ | ||
| 24 | + install -D -m 0644 /tmp/kit/config/machine-settings.json \ | ||
| 25 | + /home/agent/.vscode-server/data/Machine/settings.json | ||
| 26 | + | ||
| 27 | +WORKDIR /home/agent/workspace | ||
added
kits/vscode-ssh/kit.yaml +43 -0 | new file mode 100644 | ||
| @@ -0,0 +1,43 @@ | ||
| 1 | +# syntax=docker/sandbox-kit:3 | |
| 2 | +# | |
| 3 | +# vscode-ssh: a shell sandbox meant to be driven from the host's VS Code over | |
| 4 | +# SSH (Remote-SSH extension). Nothing graphical runs in the sandbox: VS Code | |
| 5 | +# stays on the host and installs its server inside the sandbox through the | |
| 6 | +# sandbox SSH endpoint (`ssh <name>.sbx`). | |
| 7 | +# | |
| 8 | +# Run it with the host launcher: ../../sbx-vscode [WORKSPACE] | |
| 9 | +# or by hand: | |
| 10 | +# sbx setup ssh | |
| 11 | +# sbx create --name my-box ./kits/vscode-ssh /path/to/workspace | |
| 12 | +# code --remote ssh-remote+my-box.sbx /path/to/workspace | |
| 13 | +schemaVersion: "3" | |
| 14 | +kind: workload | |
| 15 | +displayName: vscode-ssh | |
| 16 | +description: >- | |
| 17 | + Shell sandbox for VS Code Remote-SSH: VS Code runs on the host and connects to the sandbox | |
| 18 | + through the sbx SSH endpoint, with the network policy the VS Code server needs. | |
| 19 | +sourceUrl: https://rickub.com/bots-garden/mini-me-kit | |
| 20 | +licenses: [MIT] | |
| 21 | +version: "0.3.0" | |
| 22 | +capabilities: | |
| 23 | + - type: com.docker.sandbox/sbx@1 | |
| 24 | + - type: com.docker.sandbox/network-policy@1 | |
| 25 | + config: | |
| 26 | + runtime: | |
| 27 | + allow: | |
| 28 | + # VS Code server: downloaded by the sandbox when Remote-SSH is | |
| 29 | + # not set to download it on the host and push it over SFTP. | |
| 30 | + - update.code.visualstudio.com | |
| 31 | + - vscode.download.prss.microsoft.com | |
| 32 | + - "*.vscode-cdn.net" | |
| 33 | + # Extensions installed on the remote side (the "SSH: <name>.sbx" | |
| 34 | + # section of the Extensions view). | |
| 35 | + - marketplace.visualstudio.com | |
| 36 | + - "*.gallery.vsassets.io" | |
| 37 | + - "*.gallerycdn.vsassets.io" | |
| 38 | + - open-vsx.org | |
| 39 | + - type: com.docker.sandbox/agent-context@1 | |
| 40 | + config: | |
| 41 | + # Path relative to this kit directory; the sandbox-kit frontend stages it | |
| 42 | + # into the image and rewrites this field to the in-image path. | |
| 43 | + contentFile: vscode-ssh-context.md | |
| new file mode 100644 | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | +# syntax=docker/sandbox-kit:3 | ||
| 2 | +# | ||
| 3 | +# vscode-ssh: a shell sandbox meant to be driven from the host's VS Code over | ||
| 4 | +# SSH (Remote-SSH extension). Nothing graphical runs in the sandbox: VS Code | ||
| 5 | +# stays on the host and installs its server inside the sandbox through the | ||
| 6 | +# sandbox SSH endpoint (`ssh <name>.sbx`). | ||
| 7 | +# | ||
| 8 | +# Run it with the host launcher: ../../sbx-vscode [WORKSPACE] | ||
| 9 | +# or by hand: | ||
| 10 | +# sbx setup ssh | ||
| 11 | +# sbx create --name my-box ./kits/vscode-ssh /path/to/workspace | ||
| 12 | +# code --remote ssh-remote+my-box.sbx /path/to/workspace | ||
| 13 | +schemaVersion: "3" | ||
| 14 | +kind: workload | ||
| 15 | +displayName: vscode-ssh | ||
| 16 | +description: >- | ||
| 17 | + Shell sandbox for VS Code Remote-SSH: VS Code runs on the host and connects to the sandbox | ||
| 18 | + through the sbx SSH endpoint, with the network policy the VS Code server needs. | ||
| 19 | +sourceUrl: https://rickub.com/bots-garden/mini-me-kit | ||
| 20 | +licenses: [MIT] | ||
| 21 | +version: "0.3.0" | ||
| 22 | +capabilities: | ||
| 23 | + - type: com.docker.sandbox/sbx@1 | ||
| 24 | + - type: com.docker.sandbox/network-policy@1 | ||
| 25 | + config: | ||
| 26 | + runtime: | ||
| 27 | + allow: | ||
| 28 | + # VS Code server: downloaded by the sandbox when Remote-SSH is | ||
| 29 | + # not set to download it on the host and push it over SFTP. | ||
| 30 | + - update.code.visualstudio.com | ||
| 31 | + - vscode.download.prss.microsoft.com | ||
| 32 | + - "*.vscode-cdn.net" | ||
| 33 | + # Extensions installed on the remote side (the "SSH: <name>.sbx" | ||
| 34 | + # section of the Extensions view). | ||
| 35 | + - marketplace.visualstudio.com | ||
| 36 | + - "*.gallery.vsassets.io" | ||
| 37 | + - "*.gallerycdn.vsassets.io" | ||
| 38 | + - open-vsx.org | ||
| 39 | + - type: com.docker.sandbox/agent-context@1 | ||
| 40 | + config: | ||
| 41 | + # Path relative to this kit directory; the sandbox-kit frontend stages it | ||
| 42 | + # into the image and rewrites this field to the in-image path. | ||
| 43 | + contentFile: vscode-ssh-context.md | ||
added
kits/vscode-ssh/vscode-ssh-context.md +7 -0 | new file mode 100644 | ||
| @@ -0,0 +1,7 @@ | ||
| 1 | +This sandbox is driven from VS Code running on the host, connected over SSH through the sbx | |
| 2 | +SSH endpoint (`<sandbox-name>.sbx`, VS Code Remote-SSH). Nothing graphical runs here. | |
| 3 | + | |
| 4 | +The VS Code server lives in `~/.vscode-server`. The host workspace is mounted at the same path | |
| 5 | +as on the host. Network access is limited by the sandbox policy: the VS Code server download | |
| 6 | +hosts and the extension marketplaces are allowed, other hosts must be allowed with | |
| 7 | +`sbx policy allow network <host>` on the host. | |
| new file mode 100644 | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | +This sandbox is driven from VS Code running on the host, connected over SSH through the sbx | ||
| 2 | +SSH endpoint (`<sandbox-name>.sbx`, VS Code Remote-SSH). Nothing graphical runs here. | ||
| 3 | + | ||
| 4 | +The VS Code server lives in `~/.vscode-server`. The host workspace is mounted at the same path | ||
| 5 | +as on the host. Network access is limited by the sandbox policy: the VS Code server download | ||
| 6 | +hosts and the extension marketplaces are allowed, other hosts must be allowed with | ||
| 7 | +`sbx policy allow network <host>` on the host. | ||
added
kits/zed-ssh/kit.dockerfile +21 -0 | new file mode 100644 | ||
| @@ -0,0 +1,21 @@ | ||
| 1 | +# syntax=docker/dockerfile:1 | |
| 2 | +# zed-ssh: the shell template, plus what the Zed remote server expects on an SSH | |
| 3 | +# host. The template's entrypoint (bash) is kept: Zed reaches the sandbox | |
| 4 | +# through the sbx SSH endpoint, not through the entrypoint. | |
| 5 | +FROM docker/sandbox-templates:shell | |
| 6 | + | |
| 7 | +USER root | |
| 8 | + | |
| 9 | +# The Zed remote server (~/.zed_server) is a Linux binary fetched as a .gz: it | |
| 10 | +# needs gzip plus curl or wget to download and unpack itself. git is used by the | |
| 11 | +# project panel and tasks. Most are already in the template; listing them keeps | |
| 12 | +# the kit working if the template slims down. | |
| 13 | +RUN set -eux; \ | |
| 14 | + apt-get update; \ | |
| 15 | + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | |
| 16 | + libstdc++6 tar gzip curl wget ca-certificates procps git; \ | |
| 17 | + rm -rf /var/lib/apt/lists/* | |
| 18 | + | |
| 19 | +USER agent | |
| 20 | + | |
| 21 | +WORKDIR /home/agent/workspace | |
| new file mode 100644 | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | +# syntax=docker/dockerfile:1 | ||
| 2 | +# zed-ssh: the shell template, plus what the Zed remote server expects on an SSH | ||
| 3 | +# host. The template's entrypoint (bash) is kept: Zed reaches the sandbox | ||
| 4 | +# through the sbx SSH endpoint, not through the entrypoint. | ||
| 5 | +FROM docker/sandbox-templates:shell | ||
| 6 | + | ||
| 7 | +USER root | ||
| 8 | + | ||
| 9 | +# The Zed remote server (~/.zed_server) is a Linux binary fetched as a .gz: it | ||
| 10 | +# needs gzip plus curl or wget to download and unpack itself. git is used by the | ||
| 11 | +# project panel and tasks. Most are already in the template; listing them keeps | ||
| 12 | +# the kit working if the template slims down. | ||
| 13 | +RUN set -eux; \ | ||
| 14 | + apt-get update; \ | ||
| 15 | + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | ||
| 16 | + libstdc++6 tar gzip curl wget ca-certificates procps git; \ | ||
| 17 | + rm -rf /var/lib/apt/lists/* | ||
| 18 | + | ||
| 19 | +USER agent | ||
| 20 | + | ||
| 21 | +WORKDIR /home/agent/workspace | ||
added
kits/zed-ssh/kit.yaml +37 -0 | new file mode 100644 | ||
| @@ -0,0 +1,37 @@ | ||
| 1 | +# syntax=docker/sandbox-kit:3 | |
| 2 | +# | |
| 3 | +# zed-ssh: a shell sandbox meant to be driven from the host's Zed editor over | |
| 4 | +# SSH (Zed remote development). Nothing graphical runs in the sandbox: Zed | |
| 5 | +# stays on the host and installs its remote server (~/.zed_server) inside the | |
| 6 | +# sandbox through the sandbox SSH endpoint (`ssh <name>.sbx`). | |
| 7 | +# | |
| 8 | +# Run it with the host launcher: ../../sbx-zed [WORKSPACE] | |
| 9 | +# or by hand: | |
| 10 | +# sbx setup ssh | |
| 11 | +# sbx create --name my-box ./kits/zed-ssh /path/to/workspace | |
| 12 | +# zed --new ssh://my-box.sbx/path/to/workspace | |
| 13 | +schemaVersion: "3" | |
| 14 | +kind: workload | |
| 15 | +displayName: zed-ssh | |
| 16 | +description: >- | |
| 17 | + Shell sandbox for Zed remote development: Zed runs on the host and connects to the sandbox | |
| 18 | + through the sbx SSH endpoint, with the network policy the Zed remote server needs. | |
| 19 | +sourceUrl: https://rickub.com/bots-garden/mini-me-kit | |
| 20 | +licenses: [MIT] | |
| 21 | +version: "0.3.0" | |
| 22 | +capabilities: | |
| 23 | + - type: com.docker.sandbox/sbx@1 | |
| 24 | + - type: com.docker.sandbox/network-policy@1 | |
| 25 | + config: | |
| 26 | + runtime: | |
| 27 | + allow: | |
| 28 | + # Zed remote server: downloaded by the sandbox unless the host | |
| 29 | + # settings use "upload_binary_over_ssh": true (the host then | |
| 30 | + # downloads it and pushes it over SSH). | |
| 31 | + - zed.dev | |
| 32 | + - "*.zed.dev" | |
| 33 | + - type: com.docker.sandbox/agent-context@1 | |
| 34 | + config: | |
| 35 | + # Path relative to this kit directory; the sandbox-kit frontend stages it | |
| 36 | + # into the image and rewrites this field to the in-image path. | |
| 37 | + contentFile: zed-ssh-context.md | |
| new file mode 100644 | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | +# syntax=docker/sandbox-kit:3 | ||
| 2 | +# | ||
| 3 | +# zed-ssh: a shell sandbox meant to be driven from the host's Zed editor over | ||
| 4 | +# SSH (Zed remote development). Nothing graphical runs in the sandbox: Zed | ||
| 5 | +# stays on the host and installs its remote server (~/.zed_server) inside the | ||
| 6 | +# sandbox through the sandbox SSH endpoint (`ssh <name>.sbx`). | ||
| 7 | +# | ||
| 8 | +# Run it with the host launcher: ../../sbx-zed [WORKSPACE] | ||
| 9 | +# or by hand: | ||
| 10 | +# sbx setup ssh | ||
| 11 | +# sbx create --name my-box ./kits/zed-ssh /path/to/workspace | ||
| 12 | +# zed --new ssh://my-box.sbx/path/to/workspace | ||
| 13 | +schemaVersion: "3" | ||
| 14 | +kind: workload | ||
| 15 | +displayName: zed-ssh | ||
| 16 | +description: >- | ||
| 17 | + Shell sandbox for Zed remote development: Zed runs on the host and connects to the sandbox | ||
| 18 | + through the sbx SSH endpoint, with the network policy the Zed remote server needs. | ||
| 19 | +sourceUrl: https://rickub.com/bots-garden/mini-me-kit | ||
| 20 | +licenses: [MIT] | ||
| 21 | +version: "0.3.0" | ||
| 22 | +capabilities: | ||
| 23 | + - type: com.docker.sandbox/sbx@1 | ||
| 24 | + - type: com.docker.sandbox/network-policy@1 | ||
| 25 | + config: | ||
| 26 | + runtime: | ||
| 27 | + allow: | ||
| 28 | + # Zed remote server: downloaded by the sandbox unless the host | ||
| 29 | + # settings use "upload_binary_over_ssh": true (the host then | ||
| 30 | + # downloads it and pushes it over SSH). | ||
| 31 | + - zed.dev | ||
| 32 | + - "*.zed.dev" | ||
| 33 | + - type: com.docker.sandbox/agent-context@1 | ||
| 34 | + config: | ||
| 35 | + # Path relative to this kit directory; the sandbox-kit frontend stages it | ||
| 36 | + # into the image and rewrites this field to the in-image path. | ||
| 37 | + contentFile: zed-ssh-context.md | ||
added
kits/zed-ssh/zed-ssh-context.md +6 -0 | new file mode 100644 | ||
| @@ -0,0 +1,6 @@ | ||
| 1 | +This sandbox is driven from the Zed editor running on the host, connected over SSH through the sbx | |
| 2 | +SSH endpoint (`<sandbox-name>.sbx`, Zed remote development). Nothing graphical runs here. | |
| 3 | + | |
| 4 | +The Zed remote server lives in `~/.zed_server`. The host workspace is mounted at the same path | |
| 5 | +as on the host. Network access is limited by the sandbox policy: the Zed server download hosts | |
| 6 | +are allowed, other hosts must be allowed with `sbx policy allow network <host>` on the host. | |
| new file mode 100644 | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | +This sandbox is driven from the Zed editor running on the host, connected over SSH through the sbx | ||
| 2 | +SSH endpoint (`<sandbox-name>.sbx`, Zed remote development). Nothing graphical runs here. | ||
| 3 | + | ||
| 4 | +The Zed remote server lives in `~/.zed_server`. The host workspace is mounted at the same path | ||
| 5 | +as on the host. Network access is limited by the sandbox policy: the Zed server download hosts | ||
| 6 | +are allowed, other hosts must be allowed with `sbx policy allow network <host>` on the host. | ||
added
mini-me-agent/mini-me-agent.dockerfile +26 -0 | new file mode 100644 | ||
| @@ -0,0 +1,26 @@ | ||
| 1 | +# syntax=docker/dockerfile:1 | |
| 2 | + | |
| 3 | +# --- build stage: download the mm binary ----------------------------------- | |
| 4 | +FROM debian:trixie-slim AS build | |
| 5 | +ARG TARGETARCH | |
| 6 | +ARG MM_VERSION | |
| 7 | + | |
| 8 | +RUN <<EOF | |
| 9 | +set -eu | |
| 10 | +apt-get update | |
| 11 | +apt-get install -y --no-install-recommends curl ca-certificates | |
| 12 | +rm -rf /var/lib/apt/lists/* | |
| 13 | +EOF | |
| 14 | + | |
| 15 | +RUN <<EOF | |
| 16 | +set -eu | |
| 17 | +mkdir -p /out/usr/local/bin | |
| 18 | +curl -fsSL "https://rickub.com/bots-garden/mini-me/releases/download/${MM_VERSION}/mm-${MM_VERSION#v}-linux-${TARGETARCH}" -o /out/usr/local/bin/mm | |
| 19 | +chmod 0755 /out/usr/local/bin/mm | |
| 20 | +EOF | |
| 21 | + | |
| 22 | +# --- overlay: only the mm binary lands on the workload ----------------------- | |
| 23 | +# A mixin's image config (USER, ENTRYPOINT, CMD) is never kept by the composed | |
| 24 | +# image, so there is nothing to declare here: start it with `mm -tui`. | |
| 25 | +FROM scratch | |
| 26 | +COPY --from=build /out/ / | |
| new file mode 100644 | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | +# syntax=docker/dockerfile:1 | ||
| 2 | + | ||
| 3 | +# --- build stage: download the mm binary ----------------------------------- | ||
| 4 | +FROM debian:trixie-slim AS build | ||
| 5 | +ARG TARGETARCH | ||
| 6 | +ARG MM_VERSION | ||
| 7 | + | ||
| 8 | +RUN <<EOF | ||
| 9 | +set -eu | ||
| 10 | +apt-get update | ||
| 11 | +apt-get install -y --no-install-recommends curl ca-certificates | ||
| 12 | +rm -rf /var/lib/apt/lists/* | ||
| 13 | +EOF | ||
| 14 | + | ||
| 15 | +RUN <<EOF | ||
| 16 | +set -eu | ||
| 17 | +mkdir -p /out/usr/local/bin | ||
| 18 | +curl -fsSL "https://rickub.com/bots-garden/mini-me/releases/download/${MM_VERSION}/mm-${MM_VERSION#v}-linux-${TARGETARCH}" -o /out/usr/local/bin/mm | ||
| 19 | +chmod 0755 /out/usr/local/bin/mm | ||
| 20 | +EOF | ||
| 21 | + | ||
| 22 | +# --- overlay: only the mm binary lands on the workload ----------------------- | ||
| 23 | +# A mixin's image config (USER, ENTRYPOINT, CMD) is never kept by the composed | ||
| 24 | +# image, so there is nothing to declare here: start it with `mm -tui`. | ||
| 25 | +FROM scratch | ||
| 26 | +COPY --from=build /out/ / | ||
added
mini-me-agent/mini-me-agent.yaml +30 -0 | new file mode 100644 | ||
| @@ -0,0 +1,30 @@ | ||
| 1 | +# syntax=docker/sandbox-kit:3 | |
| 2 | +schemaVersion: "3" | |
| 3 | +kind: mixin | |
| 4 | +displayName: Mini Me Agent | |
| 5 | +description: Mini Me (mm), a minimalist coding agent for local LLMs | |
| 6 | +sourceUrl: https://rickub.com/bots-garden/mini-me | |
| 7 | +licenses: [MIT] | |
| 8 | +version: "0.3.0" | |
| 9 | + | |
| 10 | +provides: ["mini-me@0.6.0"] | |
| 11 | + | |
| 12 | +dockerfile: ./mini-me-agent.dockerfile | |
| 13 | + | |
| 14 | +args: | |
| 15 | + mm_version: | |
| 16 | + # A release tag of https://rickub.com/bots-garden/mini-me/releases | |
| 17 | + default: "v0.6.0" | |
| 18 | + pattern: '^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$' | |
| 19 | + buildArg: MM_VERSION | |
| 20 | + | |
| 21 | +capabilities: | |
| 22 | + # Egress is deny-by-default. mm talks to a model server running on the host. | |
| 23 | + # Check the port/host for your setup, then `sbx policy log` if it is blocked. | |
| 24 | + - type: com.docker.sandbox/network-policy@1 | |
| 25 | + config: | |
| 26 | + runtime: | |
| 27 | + allow: | |
| 28 | + - host.docker.internal:12434 # Docker Model Runner | |
| 29 | + - host.docker.internal:11434 # Ollama | |
| 30 | + - host.docker.internal:17434 # Llmman | |
| new file mode 100644 | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | +# syntax=docker/sandbox-kit:3 | ||
| 2 | +schemaVersion: "3" | ||
| 3 | +kind: mixin | ||
| 4 | +displayName: Mini Me Agent | ||
| 5 | +description: Mini Me (mm), a minimalist coding agent for local LLMs | ||
| 6 | +sourceUrl: https://rickub.com/bots-garden/mini-me | ||
| 7 | +licenses: [MIT] | ||
| 8 | +version: "0.3.0" | ||
| 9 | + | ||
| 10 | +provides: ["mini-me@0.6.0"] | ||
| 11 | + | ||
| 12 | +dockerfile: ./mini-me-agent.dockerfile | ||
| 13 | + | ||
| 14 | +args: | ||
| 15 | + mm_version: | ||
| 16 | + # A release tag of https://rickub.com/bots-garden/mini-me/releases | ||
| 17 | + default: "v0.6.0" | ||
| 18 | + pattern: '^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$' | ||
| 19 | + buildArg: MM_VERSION | ||
| 20 | + | ||
| 21 | +capabilities: | ||
| 22 | + # Egress is deny-by-default. mm talks to a model server running on the host. | ||
| 23 | + # Check the port/host for your setup, then `sbx policy log` if it is blocked. | ||
| 24 | + - type: com.docker.sandbox/network-policy@1 | ||
| 25 | + config: | ||
| 26 | + runtime: | ||
| 27 | + allow: | ||
| 28 | + - host.docker.internal:12434 # Docker Model Runner | ||
| 29 | + - host.docker.internal:11434 # Ollama | ||
| 30 | + - host.docker.internal:17434 # Llmman | ||
modified
mini-me-editor/mini-me-editor.yaml +4 -2 | @@ -4,15 +4,17 @@ kind: workload | ||
| 4 | 4 | displayName: Mini Me Editor |
| 5 | 5 | description: Eclipse Theia web IDE on the workspace, with Mini Me (mm) installed (not launched) |
| 6 | 6 | sourceUrl: https://rickub.com/bots-garden/mini-me |
| 7 | +licenses: [MIT] | |
| 8 | +version: "0.3.0" | |
| 7 | 9 | |
| 8 | -provides: ["mini-me@0.4.0", "theia@${{ kit.args.theia_version }}"] | |
| 10 | +provides: ["mini-me@0.6.0", "theia@${{ kit.args.theia_version }}"] | |
| 9 | 11 | |
| 10 | 12 | dockerfile: ./mini-me-editor.dockerfile |
| 11 | 13 | |
| 12 | 14 | args: |
| 13 | 15 | mm_version: |
| 14 | 16 | # A release tag of https://rickub.com/bots-garden/mini-me/releases |
| 15 | - default: "v0.4.0" | |
| 17 | + default: "v0.6.0" | |
| 16 | 18 | pattern: '^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$' |
| 17 | 19 | buildArg: MM_VERSION |
| 18 | 20 | theia_version: |
| @@ -4,15 +4,17 @@ kind: workload | |||
| 4 | displayName: Mini Me Editor | 4 | displayName: Mini Me Editor |
| 5 | description: Eclipse Theia web IDE on the workspace, with Mini Me (mm) installed (not launched) | 5 | description: Eclipse Theia web IDE on the workspace, with Mini Me (mm) installed (not launched) |
| 6 | sourceUrl: https://rickub.com/bots-garden/mini-me | 6 | sourceUrl: https://rickub.com/bots-garden/mini-me |
| 7 | +licenses: [MIT] | ||
| 8 | +version: "0.3.0" | ||
| 7 | 9 | ||
| 8 | -provides: ["mini-me@0.4.0", "theia@${{ kit.args.theia_version }}"] | 10 | +provides: ["mini-me@0.6.0", "theia@${{ kit.args.theia_version }}"] |
| 9 | 11 | ||
| 10 | dockerfile: ./mini-me-editor.dockerfile | 12 | dockerfile: ./mini-me-editor.dockerfile |
| 11 | 13 | ||
| 12 | args: | 14 | args: |
| 13 | mm_version: | 15 | mm_version: |
| 14 | # A release tag of https://rickub.com/bots-garden/mini-me/releases | 16 | # A release tag of https://rickub.com/bots-garden/mini-me/releases |
| 15 | - default: "v0.4.0" | 17 | + default: "v0.6.0" |
| 16 | pattern: '^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$' | 18 | pattern: '^v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$' |
| 17 | buildArg: MM_VERSION | 19 | buildArg: MM_VERSION |
| 18 | theia_version: | 20 | theia_version: |
modified
mini-me/mini-me.yaml +3 -1 | @@ -4,8 +4,10 @@ kind: workload | ||
| 4 | 4 | displayName: Mini Me |
| 5 | 5 | description: Mini Me (mm), a minimalist coding agent for local LLMs |
| 6 | 6 | sourceUrl: https://rickub.com/bots-garden/mini-me |
| 7 | +licenses: [MIT] | |
| 8 | +version: "0.3.0" | |
| 7 | 9 | |
| 8 | -provides: ["mini-me@0.4.0"] | |
| 10 | +provides: ["mini-me@0.6.0"] | |
| 9 | 11 | |
| 10 | 12 | dockerfile: ./mini-me.dockerfile |
| 11 | 13 | |
| @@ -4,8 +4,10 @@ kind: workload | |||
| 4 | displayName: Mini Me | 4 | displayName: Mini Me |
| 5 | description: Mini Me (mm), a minimalist coding agent for local LLMs | 5 | description: Mini Me (mm), a minimalist coding agent for local LLMs |
| 6 | sourceUrl: https://rickub.com/bots-garden/mini-me | 6 | sourceUrl: https://rickub.com/bots-garden/mini-me |
| 7 | +licenses: [MIT] | ||
| 8 | +version: "0.3.0" | ||
| 7 | 9 | ||
| 8 | -provides: ["mini-me@0.4.0"] | 10 | +provides: ["mini-me@0.6.0"] |
| 9 | 11 | ||
| 10 | dockerfile: ./mini-me.dockerfile | 12 | dockerfile: ./mini-me.dockerfile |
| 11 | 13 | ||
modified
release.env +4 -1 | @@ -1,5 +1,8 @@ | ||
| 1 | 1 | # ./01-release.tag.sh commit, tag, push |
| 2 | -TAG="v0.0.2" | |
| 2 | +MINI_ME_VERSION="0.6.0" | |
| 3 | +PREVIOUS_TAG="v0.0.2" | |
| 4 | + | |
| 5 | +TAG="v0.0.3" | |
| 3 | 6 | ABOUT="Mini Me" |
| 4 | 7 | OWNER="bots-garden" |
| 5 | 8 | REPO="mini-me-kit" |
| @@ -1,5 +1,8 @@ | |||
| 1 | # ./01-release.tag.sh commit, tag, push | 1 | # ./01-release.tag.sh commit, tag, push |
| 2 | -TAG="v0.0.2" | 2 | +MINI_ME_VERSION="0.6.0" |
| 3 | +PREVIOUS_TAG="v0.0.2" | ||
| 4 | + | ||
| 5 | +TAG="v0.0.3" | ||
| 3 | ABOUT="Mini Me" | 6 | ABOUT="Mini Me" |
| 4 | OWNER="bots-garden" | 7 | OWNER="bots-garden" |
| 5 | REPO="mini-me-kit" | 8 | REPO="mini-me-kit" |
added
sbxenv.yaml +23 -0 | new file mode 100644 | ||
| @@ -0,0 +1,23 @@ | ||
| 1 | +schemaVersion: "1" | |
| 2 | + | |
| 3 | +# Sandbox name = SSH host (<name>.sbx): letters, digits and hyphens only. | |
| 4 | +name: vscode-mm | |
| 5 | + | |
| 6 | +# The workload kit is the base "agent". For a registry image its name is the last | |
| 7 | +# component of the repository (local kit: the kit directory name). | |
| 8 | +agent: vscode-ssh-kit | |
| 9 | + | |
| 10 | +kits: | |
| 11 | + - docker.io/k33g/vscode-ssh-kit:0.0.3 | |
| 12 | + - docker.io/k33g/nushell-kit:0.0.3 | |
| 13 | + - docker.io/k33g/mini-me-agent-kit:0.0.3 | |
| 14 | + - docker.io/k33g/go-toolchain-kit:0.0.3 | |
| 15 | + - docker.io/k33g/rust-toolchain-kit:0.0.3 | |
| 16 | + | |
| 17 | +# Mounted at the same path as on the host, so VS Code opens that same path remotely. | |
| 18 | +workspace: ./demo | |
| 19 | + | |
| 20 | +# sbx setup ssh | |
| 21 | +# sbx env create --force | |
| 22 | +# code --new-window --remote ssh-remote+vscode-mm.sbx "$PWD/demo" | |
| 23 | +# sbx env rm | |
| \ No newline at end of file | ||
| new file mode 100644 | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | +schemaVersion: "1" | ||
| 2 | + | ||
| 3 | +# Sandbox name = SSH host (<name>.sbx): letters, digits and hyphens only. | ||
| 4 | +name: vscode-mm | ||
| 5 | + | ||
| 6 | +# The workload kit is the base "agent". For a registry image its name is the last | ||
| 7 | +# component of the repository (local kit: the kit directory name). | ||
| 8 | +agent: vscode-ssh-kit | ||
| 9 | + | ||
| 10 | +kits: | ||
| 11 | + - docker.io/k33g/vscode-ssh-kit:0.0.3 | ||
| 12 | + - docker.io/k33g/nushell-kit:0.0.3 | ||
| 13 | + - docker.io/k33g/mini-me-agent-kit:0.0.3 | ||
| 14 | + - docker.io/k33g/go-toolchain-kit:0.0.3 | ||
| 15 | + - docker.io/k33g/rust-toolchain-kit:0.0.3 | ||
| 16 | + | ||
| 17 | +# Mounted at the same path as on the host, so VS Code opens that same path remotely. | ||
| 18 | +workspace: ./demo | ||
| 19 | + | ||
| 20 | +# sbx setup ssh | ||
| 21 | +# sbx env create --force | ||
| 22 | +# code --new-window --remote ssh-remote+vscode-mm.sbx "$PWD/demo" | ||
| 23 | +# sbx env rm | ||
| \ No newline at end of file | \ No newline at end of file | ||