Files
memind/scripts/build-goosed-v149-local.sh
T
john 4ad04f07f0 chore(goose-v149): refresh merge-prep baselines and fix local build script
Fix build-goosed-v149-local.sh vendor/v8 paths after cd into the v149 worktree,
record phase3/memory drift evidence, and update phase3 closeout gate status.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 12:06:58 +08:00

49 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
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
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 "${SCRIPT_DIR}/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 "${SCRIPT_DIR}/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 "${SCRIPT_DIR}/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