Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
31cc0c4
ui connect to acp directly with env control
lifeizhou-ap Jun 29, 2026
92bf60c
always point packaged goose serve in non dev/test mode and enhance ur…
lifeizhou-ap Jun 29, 2026
4c45e87
added diagnose for start up
lifeizhou-ap Jun 29, 2026
fc4bd78
added just run-ui-acp
lifeizhou-ap Jun 29, 2026
e318b21
added env to bundle ui with acp only
lifeizhou-ap Jun 29, 2026
6c5ccf4
add goose serve arg --platform to pass desktop platform option to acp
lifeizhou-ap Jun 29, 2026
4f37be2
Merge branch 'main' into lifei/ui-acp-direct-spike
lifeizhou-ap Jun 29, 2026
9032504
throw error when acp server exits
lifeizhou-ap Jun 29, 2026
b1c261c
handle error and exit
lifeizhou-ap Jun 29, 2026
30aa3db
removed acpconfig read before react is rendered
lifeizhou-ap Jun 29, 2026
2a271ec
close stream when initialize failed
lifeizhou-ap Jun 29, 2026
74d87f5
set up initialization timeout
lifeizhou-ap Jun 29, 2026
a773905
Merge branch 'main' into lifei/ui-acp-direct-spike
lifeizhou-ap Jul 1, 2026
1031870
implement starting acp sever including local and external
lifeizhou-ap Jul 1, 2026
cd9bc27
clean up goosed
lifeizhou-ap Jul 1, 2026
222d3b1
removed goosed invocation in ui
lifeizhou-ap Jul 1, 2026
02efeb2
removed dependency on openapi type client and status
lifeizhou-ap Jul 1, 2026
37c1b19
enabled https/wss in local
lifeizhou-ap Jul 1, 2026
b525e84
remove goosed integration test
lifeizhou-ap Jul 1, 2026
de0e8f8
remove generate-api
lifeizhou-ap Jul 1, 2026
7a9d438
format
lifeizhou-ap Jul 1, 2026
f224459
bundle ui with acp server
lifeizhou-ap Jul 1, 2026
68383c2
do not fetch mcp app proxy url when using acp external server
lifeizhou-ap Jul 1, 2026
5c5cdfa
check acp endpoints with token
lifeizhou-ap Jul 1, 2026
58e149d
swap the binary discover path in local dev
lifeizhou-ap Jul 1, 2026
3817a63
fixed lint check
lifeizhou-ap Jul 1, 2026
a3bef1a
store token in GooseServeLease
lifeizhou-ap Jul 1, 2026
1defcca
update build windows script
lifeizhou-ap Jul 1, 2026
2522bd3
update build windows script remove generate-api
lifeizhou-ap Jul 1, 2026
14e4b68
added build sdk and remove cache
lifeizhou-ap Jul 1, 2026
96ece22
use goose as deep link command value instead of goosed
lifeizhou-ap Jul 1, 2026
bf0a912
removed the unnecessary log which might log sensitive info
lifeizhou-ap Jul 1, 2026
6f907f4
Keep backend TLS pins scoped to active leases
lifeizhou-ap Jul 1, 2026
73c1d5e
added timeout for check
lifeizhou-ap Jul 1, 2026
1fa17c7
Merge branch 'main' into lifei/ui-acp-direct-spike
lifeizhou-ap Jul 1, 2026
48052aa
remove goosed in deeplink cmd
lifeizhou-ap Jul 1, 2026
32a7743
Merge branch 'main' into lifei/ui-acp-direct-spike
lifeizhou-ap Jul 2, 2026
1fac360
address comment
lifeizhou-ap Jul 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
- `cargo fmt --check` - Code formatting (rustfmt)
- `cargo test --jobs 2` - All tests
- `cargo clippy --all-targets -- -D warnings` - Linting (clippy)
- `just check-openapi-schema` - OpenAPI schema validation

**Desktop app checks:**
- `pnpm install --frozen-lockfile` - Fresh dependency install (in `ui/desktop/`)
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/bundle-desktop-intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ jobs:
key: intel-macos-deployment-target-12


- name: Build goose-server for Intel macOS (x86_64)
- name: Build desktop backend for Intel macOS (x86_64)
run: |
source ./bin/activate-hermit
rustup target add x86_64-apple-darwin
cargo build --release -p goose-server --target x86_64-apple-darwin
cargo build --release -p goose-cli --bin goose --target x86_64-apple-darwin



Expand All @@ -95,9 +95,13 @@ jobs:
# Check disk space after cleanup
df -h

- name: Copy binaries into Electron folder
- name: Copy backend binary into Electron folder
run: |
cp target/x86_64-apple-darwin/release/goosed ui/desktop/src/bin/goosed
mkdir -p ui/desktop/src/bin
rm -f ui/desktop/src/bin/goose
cp target/x86_64-apple-darwin/release/goose ui/desktop/src/bin/goose
chmod +x ui/desktop/src/bin/goose
ls -la ui/desktop/src/bin/

- name: Cache pnpm dependencies
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/bundle-desktop-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
with:
key: linux-${{ matrix.build-on }}-${{ matrix.variant }}

- name: Build goosed binary
- name: Build desktop backend binary
env:
RUST_LOG: debug
RUST_BACKTRACE: 1
Expand All @@ -137,15 +137,16 @@ jobs:
FEATURE_ARGS=(--features vulkan)
fi

cargo build --release --target ${TARGET} -p goose-server "${FEATURE_ARGS[@]}"
cargo build --release --target ${TARGET} -p goose-cli --bin goose "${FEATURE_ARGS[@]}"

- name: Copy binaries into Electron folder
- name: Copy backend binary into Electron folder
run: |
echo "Copying binaries to ui/desktop/src/bin/"
echo "Copying backend binary to ui/desktop/src/bin/"
export TARGET="x86_64-unknown-linux-gnu"
mkdir -p ui/desktop/src/bin
cp target/$TARGET/release/goosed ui/desktop/src/bin/
chmod +x ui/desktop/src/bin/goosed
rm -f ui/desktop/src/bin/goose
cp target/$TARGET/release/goose ui/desktop/src/bin/
chmod +x ui/desktop/src/bin/goose
ls -la ui/desktop/src/bin/

- name: Free Rust build artifacts before packaging
Expand Down
36 changes: 21 additions & 15 deletions .github/workflows/bundle-desktop-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,42 +113,48 @@ jobs:
env:
CUDA_COMPUTE_CAP: ${{ inputs.windows_variant == 'cuda' && '80' || '' }}
run: |
Write-Output "Building Windows executable..."
if ("${{ inputs.windows_variant }}" -eq "cuda") {
cargo build --release --target x86_64-pc-windows-msvc -p goose-server --features cuda
$isCuda = "${{ inputs.windows_variant }}" -eq "cuda"

Write-Output "Building Windows ACP backend"
if ($isCuda) {
cargo build --release --target x86_64-pc-windows-msvc -p goose-cli --bin goose --features cuda
} else {
cargo build --release --target x86_64-pc-windows-msvc -p goose-server
cargo build --release --target x86_64-pc-windows-msvc -p goose-cli --bin goose
}
$binaryPath = "./target/x86_64-pc-windows-msvc/release/goose.exe"

# Verify build succeeded
if (-not (Test-Path "./target/x86_64-pc-windows-msvc/release/goosed.exe")) {
Write-Error "Windows binary not found."
if (-not (Test-Path $binaryPath)) {
Write-Error "Windows backend binary not found: $binaryPath"
Get-ChildItem ./target/x86_64-pc-windows-msvc/release/ -ErrorAction SilentlyContinue
exit 1
}

Write-Output "Windows binary found."
Get-Item ./target/x86_64-pc-windows-msvc/release/goosed.exe
Write-Output "Windows backend binary found."
Get-Item $binaryPath

- name: Prepare Windows binary
shell: bash
run: |
if [ ! -f "./target/x86_64-pc-windows-msvc/release/goosed.exe" ]; then
echo "Windows binary not found."
BACKEND_BINARY="./target/x86_64-pc-windows-msvc/release/goose.exe"

if [ ! -f "$BACKEND_BINARY" ]; then
echo "Windows backend binary not found: $BACKEND_BINARY"
exit 1
fi

echo "Cleaning destination directory..."
rm -rf ./ui/desktop/src/bin
mkdir -p ./ui/desktop/src/bin

echo "Copying Windows binary..."
cp -f ./target/x86_64-pc-windows-msvc/release/goosed.exe ./ui/desktop/src/bin/
echo "Copying Windows backend binary..."
cp -f "$BACKEND_BINARY" ./ui/desktop/src/bin/

if [ -d "./ui/desktop/src/platform/windows/bin" ]; then
echo "Copying Windows platform files..."
for file in ./ui/desktop/src/platform/windows/bin/*.{exe,dll,cmd}; do
if [ -f "$file" ] && [ "$(basename "$file")" != "goosed.exe" ]; then
filename="$(basename "$file")"
if [ -f "$file" ] && [ "$filename" != "goose.exe" ]; then
cp -f "$file" ./ui/desktop/src/bin/
fi
done
Expand Down Expand Up @@ -229,14 +235,14 @@ jobs:
certificate-profile-name: ${{ secrets.AZURE_CERTIFICATE_PROFILE_NAME }}
files: |
${{ github.workspace }}/dist-windows/Goose.exe
${{ github.workspace }}/dist-windows/resources/bin/goosed.exe
${{ github.workspace }}/dist-windows/resources/bin/goose.exe

- name: Verify signed executables
shell: pwsh
run: |
$files = @(
"dist-windows/Goose.exe",
"dist-windows/resources/bin/goosed.exe"
"dist-windows/resources/bin/goose.exe"
)
foreach ($file in $files) {
Write-Output "Verifying signature: $file"
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/bundle-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,10 @@ jobs:
key: macos-deployment-target-12

# Build the project
- name: Build goosed
run: source ./bin/activate-hermit && cargo build --release -p goose-server
- name: Build desktop backend
run: |
source ./bin/activate-hermit
cargo build --release -p goose-cli --bin goose

# Post-build cleanup to free space
- name: Post-build cleanup
Expand All @@ -134,9 +136,13 @@ jobs:
# Check disk space after cleanup
df -h

- name: Copy binaries into Electron folder
- name: Copy backend binary into Electron folder
run: |
cp target/release/goosed ui/desktop/src/bin/goosed
mkdir -p ui/desktop/src/bin
rm -f ui/desktop/src/bin/goose
cp target/release/goose ui/desktop/src/bin/goose
chmod +x ui/desktop/src/bin/goose
ls -la ui/desktop/src/bin/

- name: Cache pnpm dependencies
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
path: download_cli.sh

# ------------------------------------------------------------
# 4) Bundle Desktop App (macOS only) - builds goosed and Electron app
# 4) Bundle Desktop App (macOS only)
# ------------------------------------------------------------
bundle-desktop:
needs: [prepare-version]
Expand All @@ -80,7 +80,7 @@ jobs:
signing: false

# ------------------------------------------------------------
# 5) Bundle Desktop App (macOS Intel) - builds goosed and Electron app
# 5) Bundle Desktop App (macOS Intel)
# ------------------------------------------------------------
bundle-desktop-intel:
needs: [prepare-version]
Expand All @@ -93,7 +93,7 @@ jobs:
signing: false

# ------------------------------------------------------------
# 6) Bundle Desktop App (Linux) - builds goosed and Electron app
# 6) Bundle Desktop App (Linux)
# ------------------------------------------------------------
bundle-desktop-linux:
needs: [prepare-version]
Expand All @@ -102,7 +102,7 @@ jobs:
version: ${{ needs.prepare-version.outputs.version }}

# ------------------------------------------------------------
# 6) Bundle Desktop App (Windows) - builds goosed and Electron app
# 6) Bundle Desktop App (Windows)
# ------------------------------------------------------------
bundle-desktop-windows:
needs: [prepare-version]
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,12 +183,6 @@ jobs:
cd ui/desktop && pnpm install --frozen-lockfile
cd ../sdk && pnpm install --frozen-lockfile

- name: Check OpenAPI Schema is Up-to-Date
run: |
source ./bin/activate-hermit
hermit uninstall rustup
just check-openapi-schema

- name: Check ACP Schema is Up-to-Date
run: |
source ./bin/activate-hermit
Expand Down
45 changes: 1 addition & 44 deletions .github/workflows/pr-smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:

- name: Build Binary for Smoke Tests
run: |
cargo build --bin goose --bin goosed
cargo build --bin goose

- name: Upload goose binary
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
Expand All @@ -76,13 +76,6 @@ jobs:
path: target/debug/goose
retention-days: 1

- name: Upload goosed binary
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: goosed-binary
path: target/debug/goosed
retention-days: 1

smoke-tests:
name: Smoke Tests
runs-on: ubuntu-latest
Expand Down Expand Up @@ -253,39 +246,3 @@ jobs:
mkdir -p $HOME/.local/share/goose/sessions
mkdir -p $HOME/.config/goose
bash scripts/test_compaction.sh

goosed-integration-tests:
name: goose server HTTP integration tests
runs-on: ubuntu-latest
needs: build-binary
steps:
- name: Checkout Code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ github.event.inputs.branch || github.ref }}

- name: Download Binary
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: goosed-binary
path: target/debug

- name: Make Binary Executable
run: chmod +x target/debug/goosed

- name: Install Node.js Dependencies
run: source ../../bin/activate-hermit && pnpm install --frozen-lockfile
working-directory: ui/desktop

- name: Run Integration Tests
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GOOSED_BINARY: ../../target/debug/goosed
GOOSE_PROVIDER: anthropic
GOOSE_MODEL: claude-sonnet-4-5-20250929
SHELL: /bin/bash
SKIP_BUILD: 1
run: |
echo 'export PATH=/some/fake/path:$PATH' >> $HOME/.bash_profile
source ../../bin/activate-hermit && pnpm run test:integration:goosed
working-directory: ui/desktop
11 changes: 4 additions & 7 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cargo build
```bash
cargo build # debug
cargo build --release # release
just release-binary # release + openapi
just release-binary # release binary
```

### Test
Expand All @@ -33,8 +33,8 @@ cargo clippy --all-targets -- -D warnings

### UI
```bash
just generate-openapi # after server changes
just run-ui # start desktop
cd ui/desktop && pnpm run typecheck
cd ui/desktop && pnpm test # test UI
```

Expand All @@ -44,7 +44,6 @@ crates/
├── goose # core logic
├── goose-acp-macros # ACP proc macros
├── goose-cli # CLI entry
├── goose-server # backend (binary: goosed)
├── goose-mcp # MCP extensions
├── goose-test # test utilities
└── goose-test-support # test helpers
Expand All @@ -65,7 +64,6 @@ ui/desktop/ # Electron app
# 1. cargo build
# 2. cargo test -p <crate>
# 3. cargo clippy --all-targets -- -D warnings
# 4. [if server] just generate-openapi
```

## Rules
Expand All @@ -75,7 +73,7 @@ ui/desktop/ # Electron app
- Error: Use anyhow::Result
- Provider: Implement Provider trait see providers/base.rs
- MCP: Extensions in crates/goose-mcp/
- Server: Changes need just generate-openapi
- UI Desktop: Use ACP SDK types or local `src/types/*` types. Do not import generated OpenAPI types/client code from `ui/desktop/src/api`

## Code Quality

Expand Down Expand Up @@ -107,7 +105,7 @@ remaining space for dynamic text.

## Never

- Never: Edit ui/desktop/openapi.json manually
- Never: Recreate `ui/desktop/src/api` or add `@hey-api/openapi-ts` to `ui/desktop`
- Cargo.toml: For human-authored dependency changes, use `cargo add` instead of manually editing dependency entries unless there is a specific reason not to.
- Cargo.toml: Automated dependency bump PRs are exempt; when manual edits are necessary, keep `Cargo.lock` consistent.
- Never: Skip cargo fmt
Expand All @@ -116,6 +114,5 @@ remaining space for dynamic text.

## Entry Points
- CLI: crates/goose-cli/src/main.rs
- Server: crates/goose-server/src/main.rs
- UI: ui/desktop/src/main.ts
- Agent: crates/goose/src/agents/agent.rs
30 changes: 8 additions & 22 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,41 +184,27 @@ cd ui && pnpm install

See #8757.

### Regenerating the OpenAPI schema

The file `ui/desktop/openapi.json` is automatically generated during the build.
It is written by the `generate_schema` binary in `crates/goose-server`.
To update the spec without starting the UI, run:

```
just generate-openapi
```

This command regenerates `ui/desktop/openapi.json` and then runs the UI's
`generate-api` script to rebuild the TypeScript client from that spec.

API changes should be made in the Rust source under `crates/goose-server/src/`.

### Debugging

To debug the Goose server, run it from an IDE. The configuration will depend on the IDE. The command to run is:
To debug the external ACP backend, run it from an IDE. The configuration will depend on the IDE. The command to run is:

```
export GOOSE_SERVER__SECRET_KEY=test
cargo run --package goose-server --bin goosed -- agent # or: `just run-server`
cargo run --package goose-cli --bin goose -- serve --platform desktop --host 127.0.0.1 --port 3000
```

The server listens on port `3000` by default; this can be changed by setting the
`GOOSE_PORT` environment variable.
The `debug-ui` recipe connects to `http://127.0.0.1:3000` by default. If the
backend uses another port, set `GOOSE_PORT` when starting the UI, or set
`GOOSE_EXTERNAL_BACKEND_URL` to the backend's HTTP base URL.

Once the server is running, start a UI and connect it to the server by running:
Once the backend is running, start a UI and connect it to the backend by running:

```
just debug-ui
```

The UI connects to the server started in the IDE, allowing breakpoints
and stepping through the server code while interacting with the UI.
The UI connects to the backend started in the IDE, allowing breakpoints
and stepping through the backend code while interacting with the UI.

## Creating a fork

Expand Down
Loading
Loading