Skip to content

Commit

Permalink
Merge branch 'v1.0' into micn/form-input
Browse files Browse the repository at this point in the history
* v1.0: (43 commits)
  feat: openrouter provider (#538)
  [ui] chore: tidy up gui providers (#537)
  [ui]: Polish and system theme fix (#533)
  [ui]: General ui polish to more closely match designs (#532)
  Latency issue fix with prepare_inference (#535)
  chore: use cross to build binaries (#507)
  feat: a system for non developers to augment developer system (#524)
  fix: Broken open directory and new session buttons in more menu (#520)
  refactor: move get_usage to provider trait (#506)
  fix: Make stop button more obvious (#516)
  fix: Enhance Dark mode menu dots visibility (#517)
  working on automating release of .zip and binaries and having them on each PR as well (#509)
  conditionally load memory system in goose server (#508)
  Adds 'instructions' field to InitializeResult (#511)
  feat: MCP client sdk (#505)
  Update cli-release.yml
  feat: added groq provider (#494)
  fix: use rust tls (#500)
  fix: Ldelalande/fix scroll (#504)
  feat: MCP server sdk (simple version first) (#499)
  ...
  • Loading branch information
michaelneale committed Jan 6, 2025
2 parents 037c903 + 667187e commit e90aa2d
Show file tree
Hide file tree
Showing 112 changed files with 8,886 additions and 2,144 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,14 @@ jobs:
- name: Install Libs
run: |
sudo apt update -y
sudo apt install -y libdbus-1-dev libssl-dev gnome-keyring libxcb1-dev
sudo apt install -y libdbus-1-dev gnome-keyring libxcb1-dev
- name: Start gnome-keyring
# run gnome-keyring with 'foobar' as password for the login keyring
# this will create a new login keyring and unlock it
# the login password doesn't matter, but the keyring must be unlocked for the tests to work
run: gnome-keyring-daemon --components=secrets --daemonize --unlock <<< 'foobar'

- name: Install UV
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Run download_tokenizer_files.py
run: uv run download_tokenizer_files.py

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
Expand Down
71 changes: 71 additions & 0 deletions .github/workflows/cli-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
on:
push:
tags:
- "v1.*"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

name: Release CLI

jobs:
build:
name: Build ${{ matrix.os }}-${{ matrix.architecture }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest ]
architecture: [ aarch64, x86_64 ]
include:
- os: ubuntu-latest
target-suffix: unknown-linux-gnu
- os: macos-latest
target-suffix: apple-darwin

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: build
run: |
export TARGET=${{ matrix.architecture }}-${{ matrix.target-suffix }}
rustup target add "${TARGET}"
cargo install cross --git https://github.com/cross-rs/cross
CROSS_NO_WARNINGS=0 cross build --release --target ${TARGET}
cd target/${TARGET}/release
tar -cjf goose-${TARGET}.tar.bz2 goose goosed
echo "ARTIFACT=target/${TARGET}/release/goose-${TARGET}.tar.bz2" >> $GITHUB_ENV
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: goose-${{ matrix.architecture }}-${{ matrix.target-suffix }}
path: ${{ env.ARTIFACT }}

release:
name: Release
runs-on: ubuntu-latest
needs: [ build ]
permissions:
contents: write
steps:
# Step 1: Download all build artifacts
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true

# Step 2: Create GitHub release with artifacts
- name: Create GitHub release
uses: ncipollo/release-action@v1
with:
artifacts: "goose-*.tar.bz2"
token: ${{ secrets.GITHUB_TOKEN }}
119 changes: 97 additions & 22 deletions .github/workflows/desktop-app-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,32 @@ name: Desktop App Release

on:
push:
tags:
- "v1.*"
pull_request:
branches:
- v1.0
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-bundle:
build:
runs-on: macos-latest
permissions:
contents: write
pull-requests: write

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Rust
uses: actions-rs/toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- name: Cache Cargo registry
uses: actions/cache@v3
Expand All @@ -44,31 +53,20 @@ jobs:
restore-keys: |
${{ runner.os }}-cargo-build-
# Install UV and download tokenizer files
- name: Install UV
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Run download_tokenizer_files.py
run: uv run download_tokenizer_files.py

# Build Rust Binary
- name: Build Release Binary
run: cargo build --release

- name: copy binary
run: cp target/release/goosed ui/desktop/src/bin/goosed




# Desktop App Steps
- name: Add MacOS certs for signing and notarization
run: ./add-macos-cert.sh
working-directory: ui/desktop
env:
CERTIFICATE_OSX_APPLICATION: ${{ secrets.CERTIFICATE_OSX_APPLICATION }}
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}

- name: Set up Node.js
uses: actions/setup-node@v2
Expand All @@ -80,15 +78,92 @@ jobs:
working-directory: ui/desktop

- name: Make default Goose App
run: npm run bundle:default
run: |
attempt=0
max_attempts=2
until [ $attempt -ge $max_attempts ]; do
npm run bundle:default && break
attempt=$((attempt + 1))
echo "Attempt $attempt failed. Retrying..."
sleep 5
done
if [ $attempt -ge $max_attempts ]; then
echo "Action failed after $max_attempts attempts."
exit 1
fi
working-directory: ui/desktop
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}

- name: Upload default
uses: actions/upload-artifact@v3
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Goose.zip
path: ui/desktop/out/Goose-darwin-arm64/Goose.zip
name: Goose-darwin-arm64
path: ui/desktop/out/Goose-darwin-arm64/Goose.zip

release:
name: Release
runs-on: ubuntu-latest
needs: [build]
permissions:
contents: write
pull-requests: write
if: github.event_name != 'pull_request'
steps:
# Download all artifacts
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true

# Create or update release
- name: Create/Update Release
uses: ncipollo/release-action@v1
with:
artifacts: "*.zip"
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
omitBody: true
omitPrereleaseDuringUpdate: true

pr-comment:
name: Add PR Comment
runs-on: ubuntu-latest
needs: [build]
permissions:
pull-requests: write
if: github.event_name == 'pull_request'
steps:
# Download all artifacts
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true

# Create comment with download links
- name: Find Comment
uses: peter-evans/find-comment@v2
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: Desktop App build artifacts

- name: Create or update comment
uses: peter-evans/create-or-update-comment@v3
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
### Desktop App for this PR
The following build is available for testing:
- [📱 macOS Desktop App (Universal, signed)](https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/Goose-darwin-arm64.zip)
The app is signed and notarized for macOS. After downloading, unzip the file and drag the Goose.app to your Applications folder.
This link is provided by nightly.link and will work even if you're not logged into GitHub.
edit-mode: replace
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ Cargo.lock
# UI
./ui/desktop/node_modules
./ui/desktop/out

# Hermit
/.hermit/
/bin/
19 changes: 19 additions & 0 deletions Cross.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[target.aarch64-unknown-linux-gnu]
xargo = false
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH && apt-get update --fix-missing && apt-get install --assume-yes libxcb1-dev:$CROSS_DEB_ARCH libdbus-1-dev:$CROSS_DEB_ARCH",
]

# If you run the build on your local machine,
# This is a workaround for the missing pkg-config path on aarch64
# You also need to add pkg-config:$CROSS_DEB_ARCH to the apt-get install command above
#[target.aarch64-unknown-linux-gnu.env]
#passthrough = ["PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig"]

# If you run the build on your local machine,
# You need to add pkg-config:$CROSS_DEB_ARCH to the apt-get install command below
[target.x86_64-unknown-linux-gnu]
xargo = false
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH && apt-get update --fix-missing && apt-get install --assume-yes libxcb1-dev:$CROSS_DEB_ARCH libdbus-1-dev:$CROSS_DEB_ARCH",
]
10 changes: 7 additions & 3 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ release:
# Copy binary command
copy-binary:
@if [ -f ./target/release/goosed ]; then \
echo "Copying goosed binary to ui/desktop/src/bin..."; \
cp ./target/release/goosed ./ui/desktop/src/bin/; \
echo "Copying goosed binary to ui/desktop/src/bin with permissions preserved..."; \
cp -p ./target/release/goosed ./ui/desktop/src/bin/; \
else \
echo "Release binary not found."; \
exit 1; \
fi

# Run UI with latest
run-ui:
@just release
Expand All @@ -26,3 +25,8 @@ run-ui:
run-server:
@echo "Running server..."
cargo run -p goose-server

# make GUI with latest binary
make-ui:
@just release
cd ui/desktop && npm run bundle:default
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ This is the branch for goose 1.0 WIP: which is a port over from python to rust +
## Building

```sh
uv run download_tokenizer_files.py
cargo build
```

## Running the CLI

### Configure

```
goose configure
```
Expand Down Expand Up @@ -63,19 +63,19 @@ Usage: cargo run --bin goose -- run -i instructions.md

## GUI

Goose has an electron based GUI which you can see in `ui/desktop`:
Goose has an electron based GUI which you can see in `ui/desktop`:

<img width="732" alt="image" src="https://github.com/user-attachments/assets/17499ae5-7812-46f0-8aae-e4d3d9583c34">
<img width="739" alt="image" src="https://github.com/user-attachments/assets/13ff2304-8468-47e0-9de8-89d23a62ec26">
<img width="744" alt="image" src="https://github.com/user-attachments/assets/3a825455-6cd1-406b-a459-e2c73dba024b">



## Start sub system server

```sh
cd crates/stub-system
cargo run
```

## Troubleshooting

#### Compiling `tokenizers` library
Expand Down
18 changes: 16 additions & 2 deletions crates/goose-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ path = "src/main.rs"

[dependencies]
goose = { path = "../goose" }
mcp-core = { path = "../mcp-core" }
clap = { version = "4.4", features = ["derive"] }
cliclack = "0.3.5"
console = "0.15.8"
Expand All @@ -29,12 +30,25 @@ serde_yaml = "0.9"
dirs = "4.0"
strum = "0.26"
strum_macros = "0.26"
reqwest = "0.11.27"
reqwest = { version = "0.12.9", features = [
"rustls-tls",
"json",
"cookies",
"gzip",
"brotli",
"deflate",
"zstd",
"charset",
"http2",
"stream"
], default-features = false }
rand = "0.8.5"
async-trait = "0.1"
rustyline = "15.0.0"
rust_decimal = "1.36.0"
rust_decimal_macros = "1.36.0"

[dev-dependencies]
tempfile = "3"
temp-env = "0.3.6"
temp-env = { version = "0.3.6", features = ["async_closure"] }

Loading

0 comments on commit e90aa2d

Please sign in to comment.