diff --git a/.github/workflows/bundle-desktop-linux.yml b/.github/workflows/bundle-desktop-linux.yml index e6acaa5489f7..cd8ca480ba5f 100644 --- a/.github/workflows/bundle-desktop-linux.yml +++ b/.github/workflows/bundle-desktop-linux.yml @@ -15,6 +15,7 @@ on: type: string required: false default: '' + pull_request: name: "Bundle Desktop (Linux)" @@ -24,15 +25,12 @@ jobs: runs-on: ubuntu-latest steps: - # 1) Check out source - name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4 with: - # Only pass ref if it's explicitly set, otherwise let checkout action use its default behavior - ref: ${{ inputs.ref != '' && inputs.ref || '' }} + ref: ${{ inputs.ref }} fetch-depth: 0 - # 2) Update versions before build - name: Update versions if: ${{ inputs.version != '' }} run: | @@ -44,7 +42,6 @@ jobs: cd ui/desktop npm version ${{ inputs.version }} --no-git-tag-version --allow-same-version - # 3) Debug information - name: Debug workflow info env: WORKFLOW_NAME: ${{ github.workflow }} @@ -63,7 +60,6 @@ jobs: lsb_release -a || true df -h - # 4) Install system dependencies for Linux packaging - name: Install system dependencies run: | sudo apt-get update @@ -83,7 +79,6 @@ jobs: dpkg-dev \ protobuf-compiler - # 4a) Pre-build cleanup to ensure enough disk space - name: Pre-build cleanup run: | echo "Performing aggressive pre-build cleanup..." @@ -104,52 +99,32 @@ jobs: # Check disk space after cleanup df -h - # 5) Set up Rust - - name: Set up Rust - uses: actions-rust-lang/setup-rust-toolchain@9d7e65c320fdb52dcd45ffaa68deb6c02c8754d9 # pin@v1 - with: - toolchain: stable - - # 6) Set up Node.js - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 23 - cache: 'npm' - cache-dependency-path: ui/desktop/package-lock.json - - # 7) Cache Rust dependencies - - name: Cache Cargo registry - uses: actions/cache@v4 - with: - path: ~/.cargo/registry - key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo-registry- + - name: Activate hermit and set CARGO_HOME + run: | + source bin/activate-hermit + echo "CARGO_HOME=$CARGO_HOME" >> $GITHUB_ENV + echo "RUSTUP_HOME=$RUSTUP_HOME" >> $GITHUB_ENV - - name: Cache Cargo index - uses: actions/cache@v4 - with: - path: ~/.cargo/index - key: ${{ runner.os }}-cargo-index - restore-keys: | - ${{ runner.os }}-cargo-index + - name: Install cross + run: source ./bin/activate-hermit && cargo install cross --git https://github.com/cross-rs/cross - - name: Cache Cargo build - uses: actions/cache@v4 + - name: Cache Cargo artifacts + uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # pin@v3 with: - path: target - key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} + path: | + ${{ env.CARGO_HOME }}/bin/ + ${{ env.CARGO_HOME }}/registry/index/ + ${{ env.CARGO_HOME }}/registry/cache/ + ${{ env.CARGO_HOME }}/git/db/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} restore-keys: | - ${{ runner.os }}-cargo-build- + ${{ runner.os }}-cargo- - # 8) Set up Go for building temporal-service - name: Set up Go uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # pin@v5 with: go-version: '1.21' - # 9) Build temporal-service using build.sh script - name: Build temporal-service run: | echo "Building temporal-service using build.sh script..." @@ -157,66 +132,41 @@ jobs: ./build.sh echo "temporal-service built successfully" - # 10) Build the Rust goosed binary - name: Build goosed binary + env: + CROSS_NO_WARNINGS: 0 + RUST_LOG: debug + RUST_BACKTRACE: 1 + CROSS_VERBOSE: 1 run: | - echo "Building goosed binary for Linux..." - cargo build --release -p goose-server - ls -la target/release/ - file target/release/goosed - - # 11) Clean up build artifacts to save space - - name: Clean up build artifacts - run: | - echo "Cleaning up to save disk space..." - # Remove debug artifacts - rm -rf target/debug || true - # Remove incremental build files - rm -rf target/release/incremental || true - rm -rf target/release/deps || true - rm -rf target/release/build || true - # Remove other target directories that aren't needed - find target -name "*.rlib" -delete || true - find target -name "*.rmeta" -delete || true - # Don't run cargo clean as it will remove our binary - # Check disk space - df -h + source ./bin/activate-hermit + export TARGET="x86_64-unknown-linux-gnu" + rustup target add "${TARGET}" + cross build --release --target ${TARGET} -p goose-server - # 12) Copy binaries to Electron folder - name: Copy binaries into Electron folder run: | echo "Copying binaries to ui/desktop/src/bin/" + export TARGET="x86_64-unknown-linux-gnu" mkdir -p ui/desktop/src/bin - cp target/release/goosed ui/desktop/src/bin/ + cp target/$TARGET/release/goosed ui/desktop/src/bin/ cp temporal-service/temporal-service ui/desktop/src/bin/ chmod +x ui/desktop/src/bin/goosed chmod +x ui/desktop/src/bin/temporal-service ls -la ui/desktop/src/bin/ - # 13) Final cleanup before npm build - - name: Final cleanup before npm build - run: | - echo "Final cleanup before npm build..." - # Now we can remove the entire target directory since we copied the binary - rm -rf target || true - # Clean any remaining caches - rm -rf ~/.cargo/registry/cache || true - rm -rf ~/.cargo/git/db || true - # Check final disk space - df -h - - # 14) Install npm dependencies - name: Install npm dependencies run: | + source ./bin/activate-hermit cd ui/desktop npm cache clean --force || true npm install # Verify installation ls -la node_modules/.bin/ | head -5 - # 15) Build Electron app with Linux makers (.deb and .rpm) - name: Build Linux packages run: | + source ./bin/activate-hermit cd ui/desktop echo "Building Linux packages (.deb and .rpm)..." @@ -227,7 +177,6 @@ jobs: ls -la out/ find out/ -name "*.deb" -o -name "*.rpm" | head -10 - # 16) List all generated files for debugging - name: List generated files run: | echo "=== All files in out/ directory ===" @@ -239,7 +188,6 @@ jobs: echo "=== File sizes ===" find ui/desktop/out/ -name "*.deb" -o -name "*.rpm" -exec ls -lh {} \; - # 17) Upload .deb package - name: Upload .deb package uses: actions/upload-artifact@v4 with: @@ -247,7 +195,6 @@ jobs: path: ui/desktop/out/make/deb/x64/*.deb if-no-files-found: error - # 18) Upload .rpm package - name: Upload .rpm package uses: actions/upload-artifact@v4 with: @@ -255,7 +202,6 @@ jobs: path: ui/desktop/out/make/rpm/x64/*.rpm if-no-files-found: error - # 19) Create combined artifact with both packages - name: Upload combined Linux packages uses: actions/upload-artifact@v4 with: diff --git a/Cargo.lock b/Cargo.lock index 7150160c69a3..ebc844c67e15 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3282,7 +3282,7 @@ dependencies = [ [[package]] name = "goose" -version = "1.1.0" +version = "1.3.0" dependencies = [ "ahash", "anyhow", @@ -3354,7 +3354,7 @@ dependencies = [ [[package]] name = "goose-bench" -version = "1.1.0" +version = "1.3.0" dependencies = [ "anyhow", "async-trait", @@ -3377,7 +3377,7 @@ dependencies = [ [[package]] name = "goose-cli" -version = "1.1.0" +version = "1.3.0" dependencies = [ "anstream", "anyhow", @@ -3428,7 +3428,7 @@ dependencies = [ [[package]] name = "goose-mcp" -version = "1.1.0" +version = "1.3.0" dependencies = [ "anyhow", "async-trait", @@ -3479,7 +3479,7 @@ dependencies = [ [[package]] name = "goose-server" -version = "1.1.0" +version = "1.3.0" dependencies = [ "anyhow", "async-trait", @@ -6988,9 +6988,9 @@ dependencies = [ [[package]] name = "rmcp" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ae7b8e0841e6c5e57448784136315356c70eb92d60d5a5a05a209f159083268" +checksum = "2faf35b7d3c4b7f8c21c45bb014011b32a0ce6444bf6094da04daab01a8c3c34" dependencies = [ "base64 0.22.1", "chrono", @@ -7016,9 +7016,9 @@ dependencies = [ [[package]] name = "rmcp-macros" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "470958f96a5700478601c385ad3d987460372c2223959eddcb682c7273cdfb86" +checksum = "ad9720d9d2a943779f1dc3d47fa9072c7eeffaff4e1a82f67eb9f7ea52696091" dependencies = [ "darling 0.21.0", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 6e24160901f6..35e756ec7f00 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ resolver = "2" [workspace.package] edition = "2021" -version = "1.1.0" +version = "1.3.0" authors = ["Block "] license = "Apache-2.0" repository = "https://github.com/block/goose" @@ -14,7 +14,7 @@ description = "An AI agent" uninlined_format_args = "allow" [workspace.dependencies] -rmcp = { version = "0.4.1", features = ["schemars", "auth"] } +rmcp = { version = "0.5.0", features = ["schemars", "auth"] } # Patch for Windows cross-compilation issue with crunchy [patch.crates-io] diff --git a/crates/goose-cli/src/session/output.rs b/crates/goose-cli/src/session/output.rs index dc8d70124e8f..32b706d4de97 100644 --- a/crates/goose-cli/src/session/output.rs +++ b/crates/goose-cli/src/session/output.rs @@ -829,11 +829,11 @@ impl McpSpinners { spinner.set_message(message.to_string()); } - pub fn update(&mut self, token: &str, value: u32, total: Option, message: Option<&str>) { + pub fn update(&mut self, token: &str, value: f64, total: Option, message: Option<&str>) { let bar = self.bars.entry(token.to_string()).or_insert_with(|| { if let Some(total) = total { self.multi_bar.add( - ProgressBar::new((total * 100) as u64).with_style( + ProgressBar::new((total * 100_f64) as u64).with_style( ProgressStyle::with_template("[{elapsed}] {bar:40} {pos:>3}/{len:3} {msg}") .unwrap(), ), @@ -842,7 +842,7 @@ impl McpSpinners { self.multi_bar.add(ProgressBar::new_spinner()) } }); - bar.set_position((value * 100) as u64); + bar.set_position((value * 100_f64) as u64); if let Some(msg) = message { bar.set_message(msg.to_string()); } diff --git a/crates/goose/src/context_mgmt/auto_compact.rs b/crates/goose/src/context_mgmt/auto_compact.rs index ffc970f9212a..6e31aecf9ac8 100644 --- a/crates/goose/src/context_mgmt/auto_compact.rs +++ b/crates/goose/src/context_mgmt/auto_compact.rs @@ -68,7 +68,7 @@ pub async fn check_compaction_needed( let threshold = threshold_override.unwrap_or_else(|| { config .get_param::("GOOSE_AUTO_COMPACT_THRESHOLD") - .unwrap_or(0.3) // Default to 30% + .unwrap_or(0.8) // Default to 80% }); let provider = agent.provider().await?; diff --git a/crates/goose/src/model.rs b/crates/goose/src/model.rs index 250d9143321e..b606eaa3b043 100644 --- a/crates/goose/src/model.rs +++ b/crates/goose/src/model.rs @@ -17,6 +17,7 @@ pub enum ConfigError { static MODEL_SPECIFIC_LIMITS: Lazy> = Lazy::new(|| { vec![ // openai + ("gpt-5", 272_000), ("gpt-4-turbo", 128_000), ("gpt-4.1", 1_000_000), ("gpt-4-1", 1_000_000), diff --git a/ui/desktop/openapi.json b/ui/desktop/openapi.json index 52642f80c7bf..589b3987dbb2 100644 --- a/ui/desktop/openapi.json +++ b/ui/desktop/openapi.json @@ -10,7 +10,7 @@ "license": { "name": "Apache-2.0" }, - "version": "1.1.0" + "version": "1.3.0" }, "paths": { "/agent/add_sub_recipes": { diff --git a/ui/desktop/package-lock.json b/ui/desktop/package-lock.json index edd61cc4ac8a..956a1fbe5c9c 100644 --- a/ui/desktop/package-lock.json +++ b/ui/desktop/package-lock.json @@ -1,12 +1,12 @@ { "name": "goose-app", - "version": "1.2.0", + "version": "1.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "goose-app", - "version": "1.2.0", + "version": "1.3.0", "license": "Apache-2.0", "dependencies": { "@ai-sdk/openai": "^0.0.72", diff --git a/ui/desktop/package.json b/ui/desktop/package.json index 39f845a586d4..616910a5c657 100644 --- a/ui/desktop/package.json +++ b/ui/desktop/package.json @@ -1,7 +1,7 @@ { "name": "goose-app", "productName": "Goose", - "version": "1.2.0", + "version": "1.3.0", "description": "Goose App", "engines": { "node": "^22.17.1"