Files
memind/scripts/build-goosed-v149-local.sh
T
john 716ef407fe feat(goose): add local v1.49 canary routing, smoke gates, and migration docs
Wire Portal and TKMind proxy to loopback Goose v1.49 via canary env blocks,
with verification scripts, Phase 2/3 evidence baselines, and rollback runbooks
so local upgrade stays isolated from stable 1.41 and production.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-08 21:10:20 +08:00

48 lines
2.0 KiB
Bash
Executable File

#!/usr/bin/env bash
# Build Goose v1.49 CLI for local `goose serve`.
# Default includes code-mode (required for TKMind). Use GOOSE_V149_BUILD_MODE=minimal to skip v8.
set -euo pipefail
GOOSED_ROOT="${GOOSED_V149_ROOT:-/Users/john/Project/tkmind_go-v149}"
LOG="${GOOSE_V149_BUILD_LOG:-/tmp/goosed-v149-build.log}"
MODE="${GOOSE_V149_BUILD_MODE:-codemode}"
bash "$(dirname "$0")/ensure-goose-v149-vendor.sh"
cd "${GOOSED_ROOT}"
: > "${LOG}"
echo "[goose-v149-build] mode=${MODE} start $(date -u +%Y-%m-%dT%H:%M:%SZ)" | tee -a "${LOG}"
case "${MODE}" in
full)
bash "$(dirname "$0")/ensure-goose-v149-v8.sh" 2>&1 | tee -a "${LOG}"
rustup run 1.96.1 cargo build --release --package goose-cli --bin goose 2>&1 | tee -a "${LOG}"
;;
codemode)
bash "$(dirname "$0")/ensure-goose-v149-v8.sh" 2>&1 | tee -a "${LOG}"
# code-mode without local-inference (smaller/faster than full default).
rustup run 1.96.1 cargo build --release --package goose-cli --bin goose \
--no-default-features \
--features rustls-tls,aws-providers,system-keyring,code-mode,telemetry 2>&1 | tee -a "${LOG}"
;;
minimal)
echo "[goose-v149-build] WARNING: minimal skips code-mode; not suitable for TKMind prod parity" | tee -a "${LOG}"
rustup run 1.96.1 cargo build --release --package goose-cli --bin goose \
--no-default-features --features rustls-tls,aws-providers,system-keyring 2>&1 | tee -a "${LOG}"
;;
*)
echo "[goose-v149-build] unknown mode: ${MODE} (use codemode|full|minimal)" >&2
exit 1
;;
esac
echo "[goose-v149-build] finished $(date -u +%Y-%m-%dT%H:%M:%SZ)" | tee -a "${LOG}"
"${GOOSED_ROOT}/target/release/goose" --version 2>&1 | tee -a "${LOG}"
if strings "${GOOSED_ROOT}/target/release/goose" | grep -q 'platform_extensions::code_execution'; then
echo "[goose-v149-build] code-mode: code_execution present in binary" | tee -a "${LOG}"
elif [[ "${MODE}" != "minimal" ]]; then
echo "[goose-v149-build] WARNING: code_execution not found in binary" | tee -a "${LOG}"
fi