Skip to content

Commit 159512f

Browse files
author
Douwe Osinga
committed
Merge origin/main into jhugo/bump-workspace-deps
2 parents 2a41b22 + 7ec07f2 commit 159512f

428 files changed

Lines changed: 59613 additions & 29672 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/generate-release-pr-body/pr_body_template.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ Push the release tag to trigger the release:
77
git fetch && git tag v{{VERSION}} origin/release/{{VERSION}}
88
git push origin v{{VERSION}}
99
```
10-
This PR will auto-merge once the tag is pushed.
10+
The tag push will trigger the release build. This PR will be automatically closed.
11+
12+
## Cherry-Picks
13+
14+
If you need to include additional fixes, cherry-pick them into the `release/{{VERSION}}` branch before tagging.
1115

1216
## Important Notes
1317

.github/copilot-instructions.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
- Core crates: `goose` (agent logic), `goose-cli` (CLI), `goose-server` (backend), `goose-mcp` (MCP servers)
4444
- Error handling: Use `anyhow::Result`, not `unwrap()` in production code
4545
- Async runtime: tokio
46-
- See HOWTOAI.md for AI-assisted code standards
4746
- MCP protocol implementations require extra scrutiny
4847
- Naming convention: In `documentation/docs` and `documentation/blog`, always refer to the project as "goose" (lowercase), never "Goose" (even at the start of sentences)
4948

.github/pull_request_template.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,6 @@
11
## Summary
22
<!-- Describe your change -->
33

4-
5-
### Type of Change
6-
<!-- Select all that apply -->
7-
- [ ] Feature
8-
- [ ] Bug fix
9-
- [ ] Refactor / Code quality
10-
- [ ] Performance improvement
11-
- [ ] Documentation
12-
- [ ] Tests
13-
- [ ] Security fix
14-
- [ ] Build / Release
15-
- [ ] Other (specify below)
16-
17-
### AI Assistance
18-
<!-- great that you got assistance 🔥, just check out the HOWTOAI guidance: https://github.com/block/goose/blob/main/HOWTOAI.md-->
19-
- [ ] This PR was created or reviewed with AI assistance
20-
214
### Testing
225
<!-- How have this change been tested? Unit/integration tests? Manual testing? -->
236

.github/recipes/code-review.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
version: "1.0.0"
2+
title: GitHub PR Code Review
3+
description: Perform a code review of a GitHub pull request.
4+
5+
parameters:
6+
- key: pr_directory
7+
input_type: string
8+
requirement: required
9+
description: Path to the directory with pr.md and pr.diff
10+
- key: instructions
11+
input_type: string
12+
requirement: required
13+
description: Specific instructions for the code review.
14+
15+
extensions:
16+
- type: builtin
17+
name: developer
18+
- type: stdio
19+
name: code_review
20+
cmd: uv
21+
args:
22+
- run
23+
- '{{ recipe_dir }}/../scripts/pr-review-mcp.py'
24+
25+
prompt: |
26+
Review the code changes downloaded from a GitHub pull request.
27+
The PR metadata is located at {{ pr_directory }}/pr.md.
28+
The proposed diff you are to review is located at {{ pr_directory }}/pr.diff.
29+
The base branch is checked out in the working directory.
30+
Use the tools you have to review the diff and examine the code changes and context.
31+
Use the code review tools to add feedback on specific parts of the diff.
32+
There is no need to call the finish_review tool unless absolutely necessary to add
33+
summary content not covered by inline comments.
34+
35+
Be concise with your comments. Just a few sentences per comment at most, with no
36+
extra formatting. Just the gist of the problem is enough.
37+
38+
** Important **
39+
Don't add nit-pick comments and avoid matters of opinion.
40+
Adhere closely to the code review instructions below.
41+
Don't add add feedback outside the scope of the instructions below.
42+
43+
# Code review instructions
44+
{{ instructions }}

.github/scripts/pr-review-mcp.py

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
#!/usr/bin/env -S uv run --script
2+
# /// script
3+
# requires-python = ">=3.11"
4+
# dependencies = ["mcp"]
5+
# ///
6+
"""MCP server for collecting PR review comments and conclusion."""
7+
8+
import json
9+
import os
10+
from pathlib import Path
11+
12+
from mcp.server.fastmcp import FastMCP
13+
14+
server = FastMCP("pr-review")
15+
16+
output_dir = Path(os.environ.get("REVIEW_OUTPUT_DIR", "/tmp"))
17+
18+
19+
def _append_comment(comment: dict) -> int:
20+
"""Append a comment to the comments file and return the new total."""
21+
comments_file = output_dir / "comments.json"
22+
comments = json.loads(comments_file.read_text()) if comments_file.exists() else []
23+
comments.append(comment)
24+
comments_file.write_text(json.dumps(comments, indent=2))
25+
return len(comments)
26+
27+
28+
@server.tool()
29+
def add_comment(
30+
path: str,
31+
line: int,
32+
body: str,
33+
suggestion: str | None = None,
34+
side: str = "RIGHT",
35+
start_line: int | None = None,
36+
) -> str:
37+
"""Add a review comment on a specific line in the PR diff.
38+
39+
Args:
40+
path: The relative file path in the repository (e.g. "src/main.rs").
41+
line: The line number in the file that the comment applies to.
42+
For added or modified lines, use the line number in the new version of the file (side=RIGHT).
43+
For deleted lines, use the line number in the old version of the file (side=LEFT).
44+
body: The review comment text (Markdown supported).
45+
suggestion: Optional replacement code for the line(s). When provided, GitHub renders an
46+
"Apply suggestion" button the author can click. The suggestion replaces the
47+
entire line (or range if start_line is set).
48+
side: Which version of the file the line number refers to.
49+
"RIGHT" for the new/modified version (default), "LEFT" for the old/deleted version.
50+
start_line: For multi-line comments, the first line of the range. When set, `line` is the last line.
51+
"""
52+
if suggestion is not None:
53+
body = (
54+
f"{body}\n\n```suggestion\n{suggestion}\n```"
55+
if body
56+
else f"```suggestion\n{suggestion}\n```"
57+
)
58+
59+
comment = {"path": path, "line": line, "side": side, "body": body}
60+
if start_line is not None:
61+
comment["start_line"] = start_line
62+
comment["start_side"] = side
63+
64+
total = _append_comment(comment)
65+
return f"Comment added on {path}:{line} ({total} total)."
66+
67+
68+
@server.tool()
69+
def finish_review(body: str = "") -> str:
70+
"""Finish the review.
71+
72+
Args:
73+
body: Optional top-level review body (Markdown supported). Only include if it
74+
contains information not already covered by inline comments. Most reviews
75+
should leave this empty.
76+
"""
77+
conclusion = {"body": body, "event": "COMMENT"}
78+
conclusion_file = output_dir / "conclusion.json"
79+
conclusion_file.write_text(json.dumps(conclusion, indent=2))
80+
return "Review finished."
81+
82+
83+
if __name__ == "__main__":
84+
server.run(transport="stdio")

.github/workflows/build-cli.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,11 @@ jobs:
144144
# Copy the goose binary
145145
cp "target/${TARGET}/release/goose" "target/${TARGET}/release/goose-package/"
146146
147-
# Create the tar archive
148147
cd "target/${TARGET}/release"
149148
tar -cjf "goose-${TARGET}.tar.bz2" -C goose-package .
150-
echo "ARTIFACT=target/${TARGET}/release/goose-${TARGET}.tar.bz2" >> $GITHUB_ENV
149+
tar -czf "goose-${TARGET}.tar.gz" -C goose-package .
150+
echo "ARTIFACT_BZ2=target/${TARGET}/release/goose-${TARGET}.tar.bz2" >> $GITHUB_ENV
151+
echo "ARTIFACT_GZ=target/${TARGET}/release/goose-${TARGET}.tar.gz" >> $GITHUB_ENV
151152
152153
- name: Package CLI (Windows)
153154
if: matrix.os == 'windows'
@@ -161,10 +162,14 @@ jobs:
161162
162163
cd "target/${TARGET}/release"
163164
7z a -tzip "goose-${TARGET}.zip" goose-package/
164-
echo "ARTIFACT=target/${TARGET}/release/goose-${TARGET}.zip" >> $GITHUB_ENV
165+
echo "ARTIFACT_ZIP=target/${TARGET}/release/goose-${TARGET}.zip" >> $GITHUB_ENV
165166
166167
- name: Upload CLI artifact
167168
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
168169
with:
169170
name: goose-${{ matrix.architecture }}-${{ matrix.target-suffix }}
170-
path: ${{ env.ARTIFACT }}
171+
path: |
172+
${{ env.ARTIFACT_BZ2 }}
173+
${{ env.ARTIFACT_GZ }}
174+
${{ env.ARTIFACT_ZIP }}
175+
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
name: Build Native Packages
2+
3+
on:
4+
workflow_call:
5+
outputs:
6+
artifact-name:
7+
description: "Name of the artifact containing all native binaries"
8+
value: ${{ jobs.collect.outputs.artifact-name }}
9+
workflow_dispatch:
10+
push:
11+
branches:
12+
- main
13+
paths:
14+
- 'crates/goose-acp/**'
15+
- 'ui/acp/**'
16+
- '.github/workflows/build-native-packages.yml'
17+
pull_request:
18+
paths:
19+
- 'crates/goose-acp/**'
20+
- 'ui/acp/**'
21+
- '.github/workflows/build-native-packages.yml'
22+
23+
jobs:
24+
build-matrix:
25+
name: Build ${{ matrix.platform }}
26+
runs-on: ${{ matrix.os }}
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
include:
31+
- platform: darwin-arm64
32+
os: macos-latest
33+
target: aarch64-apple-darwin
34+
- platform: darwin-x64
35+
os: macos-latest
36+
target: x86_64-apple-darwin
37+
- platform: linux-arm64
38+
os: ubuntu-24.04-arm
39+
target: aarch64-unknown-linux-gnu
40+
- platform: linux-x64
41+
os: ubuntu-latest
42+
target: x86_64-unknown-linux-gnu
43+
- platform: win32-x64
44+
os: windows-latest
45+
target: x86_64-pc-windows-msvc
46+
47+
steps:
48+
- name: Checkout
49+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
50+
51+
- name: Setup Rust
52+
uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable
53+
with:
54+
targets: ${{ matrix.target }}
55+
56+
- name: Add Intel target for cross-compilation (macOS ARM64 → x86_64)
57+
if: matrix.platform == 'darwin-x64'
58+
run: rustup target add x86_64-apple-darwin
59+
60+
- name: Install cross-compilation tools (Linux ARM64)
61+
if: matrix.platform == 'linux-arm64'
62+
run: |
63+
sudo apt-get update
64+
sudo apt-get install -y gcc-aarch64-linux-gnu
65+
66+
- name: Setup Rust cache
67+
uses: Swatinem/rust-cache@42dc69e1aa15d09112580998cf2ef0119e2e91ae # v2
68+
with:
69+
key: ${{ matrix.platform }}
70+
71+
- name: Build goose-acp-server
72+
run: cargo build --release --target ${{ matrix.target }} --bin goose-acp-server
73+
74+
- name: Prepare artifact (Unix)
75+
if: runner.os != 'Windows'
76+
run: |
77+
mkdir -p artifact/bin
78+
cp target/${{ matrix.target }}/release/goose-acp-server artifact/bin/
79+
chmod +x artifact/bin/goose-acp-server
80+
81+
- name: Prepare artifact (Windows)
82+
if: runner.os == 'Windows'
83+
shell: bash
84+
run: |
85+
mkdir -p artifact/bin
86+
cp target/${{ matrix.target }}/release/goose-acp-server.exe artifact/bin/
87+
88+
- name: Upload artifact
89+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
90+
with:
91+
name: goose-acp-server-${{ matrix.platform }}
92+
path: artifact/
93+
if-no-files-found: error
94+
retention-days: 7
95+
96+
collect:
97+
name: Collect all binaries
98+
runs-on: ubuntu-latest
99+
needs: build-matrix
100+
outputs:
101+
artifact-name: native-binaries-all
102+
103+
steps:
104+
- name: Download all artifacts
105+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
106+
with:
107+
path: native-binaries
108+
109+
- name: List downloaded artifacts
110+
run: |
111+
echo "Downloaded artifacts:"
112+
ls -R native-binaries/
113+
114+
- name: Upload combined artifact
115+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
116+
with:
117+
name: native-binaries-all
118+
path: native-binaries/
119+
if-no-files-found: error
120+
retention-days: 7

.github/workflows/bundle-desktop-intel.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ jobs:
3535
bundle-desktop-intel:
3636
runs-on: macos-latest
3737
name: Bundle Desktop App on Intel macOS
38+
env:
39+
MACOSX_DEPLOYMENT_TARGET: "12.0"
3840
permissions:
3941
id-token: write
4042
contents: read
@@ -60,12 +62,12 @@ jobs:
6062
# Update version in package.json
6163
source ./bin/activate-hermit
6264
cd ui/desktop
63-
pnpm version ${{ inputs.version }} --no-git-tag-version --allow-same-version
65+
npm pkg set "version=${{ inputs.version }}"
6466
6567
- name: Cache Rust dependencies
6668
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
6769
with:
68-
key: intel
70+
key: intel-macos-deployment-target-12
6971

7072

7173
- name: Build goose-server for Intel macOS (x86_64)
@@ -100,7 +102,7 @@ jobs:
100102
path: |
101103
ui/desktop/node_modules
102104
.hermit/node/cache
103-
key: intel-pnpm-cache-v1-${{ runner.os }}-${{ hashFiles('ui/desktop/pnpm-lock.yaml') }}
105+
key: intel-pnpm-cache-v1-${{ runner.os }}-${{ hashFiles('ui/pnpm-lock.yaml') }}
104106
restore-keys: |
105107
intel-pnpm-cache-v1-${{ runner.os }}-
106108

.github/workflows/bundle-desktop-linux.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
# Update version in package.json
4040
source ./bin/activate-hermit
4141
cd ui/desktop
42-
pnpm version ${{ inputs.version }} --no-git-tag-version --allow-same-version
42+
npm pkg set "version=${{ inputs.version }}"
4343
4444
- name: Debug workflow info
4545
env:
@@ -127,7 +127,7 @@ jobs:
127127
path: |
128128
ui/desktop/node_modules
129129
.hermit/node/cache
130-
key: linux-pnpm-cache-v1-${{ runner.os }}-${{ hashFiles('ui/desktop/pnpm-lock.yaml') }}
130+
key: linux-pnpm-cache-v1-${{ runner.os }}-${{ hashFiles('ui/pnpm-lock.yaml') }}
131131
restore-keys: |
132132
linux-pnpm-cache-v1-${{ runner.os }}-
133133
@@ -146,7 +146,7 @@ jobs:
146146
echo "Building Linux packages (.deb, .rpm, and .flatpak)..."
147147
148148
# Build all configured packages
149-
pnpm run make -- --platform=linux --arch=x64
149+
pnpm run make --platform=linux --arch=x64
150150
151151
echo "Build completed. Checking output..."
152152
ls -la out/

.github/workflows/bundle-desktop-manual.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,12 @@ jobs:
1717
with:
1818
signing: false
1919
ref: ${{ inputs.branch }}
20+
21+
bundle-desktop-intel-unsigned:
22+
uses: ./.github/workflows/bundle-desktop-intel.yml
23+
permissions:
24+
id-token: write
25+
contents: read
26+
with:
27+
signing: false
28+
ref: ${{ inputs.branch }}

0 commit comments

Comments
 (0)