Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 6 additions & 3 deletions .github/workflows/build-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
echo "Building with explicit PROTOC path..."
cross build --release --target ${TARGET} -p goose-cli -vv

- name: Build temporal-service for target platform
- name: Build temporal-service for target platform using build.sh script
run: |
source ./bin/activate-hermit
export TARGET="${{ matrix.architecture }}-${{ matrix.target-suffix }}"
Expand Down Expand Up @@ -116,9 +116,12 @@ jobs:
;;
esac

echo "Building temporal-service for ${GOOS}/${GOARCH}..."
echo "Building temporal-service for ${GOOS}/${GOARCH} using build.sh script..."
cd temporal-service
go build -o "../target/${TARGET}/release/${BINARY_NAME}" main.go
# Run build.sh with cross-compilation environment
GOOS="${GOOS}" GOARCH="${GOARCH}" ./build.sh
# Move the built binary to the expected location
mv "${BINARY_NAME}" "../target/${TARGET}/release/${BINARY_NAME}"
echo "temporal-service built successfully for ${TARGET}"

- name: Package CLI with temporal-service
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/bundle-desktop-intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,12 @@ jobs:
rustup target add x86_64-apple-darwin
cargo build --release -p goose-server --target x86_64-apple-darwin

# Build temporal-service
# Build temporal-service using build.sh script
- name: Build temporal-service
run: |
echo "Building temporal-service..."
echo "Building temporal-service using build.sh script..."
cd temporal-service
go build -o temporal-service main.go
chmod +x temporal-service
./build.sh
echo "temporal-service built successfully"

# Install and prepare temporal CLI
Expand Down
40 changes: 28 additions & 12 deletions .github/workflows/bundle-desktop-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,29 @@ jobs:
restore-keys: |
${{ runner.os }}-cargo-build-

# 8) Build the Rust goosed binary
# 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..."
cd temporal-service
./build.sh
echo "temporal-service built successfully"

# 10) Build the Rust goosed binary
- name: Build goosed binary
run: |
echo "Building goosed binary for Linux..."
cargo build --release -p goose-server
ls -la target/release/
file target/release/goosed

# 9) Clean up build artifacts to save space
# 11) Clean up build artifacts to save space
- name: Clean up build artifacts
run: |
echo "Cleaning up to save disk space..."
Expand All @@ -167,16 +181,18 @@ jobs:
# Check disk space
df -h

# 10) Copy binary to Electron folder
- name: Copy binary into Electron folder
# 12) Copy binaries to Electron folder
- name: Copy binaries into Electron folder
run: |
echo "Copying goosed binary to ui/desktop/src/bin/"
echo "Copying binaries to ui/desktop/src/bin/"
mkdir -p ui/desktop/src/bin
cp 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/

# 10a) Final cleanup before npm build
# 13) Final cleanup before npm build
- name: Final cleanup before npm build
run: |
echo "Final cleanup before npm build..."
Expand All @@ -188,7 +204,7 @@ jobs:
# Check final disk space
df -h

# 12) Install npm dependencies
# 14) Install npm dependencies
- name: Install npm dependencies
run: |
cd ui/desktop
Expand All @@ -199,7 +215,7 @@ jobs:
# Verify installation
ls -la node_modules/.bin/ | head -5

# 13) Build Electron app with Linux makers (.deb and .rpm)
# 15) Build Electron app with Linux makers (.deb and .rpm)
- name: Build Linux packages
run: |
cd ui/desktop
Expand All @@ -212,7 +228,7 @@ jobs:
ls -la out/
find out/ -name "*.deb" -o -name "*.rpm" | head -10

# 14) List all generated files for debugging
# 16) List all generated files for debugging
- name: List generated files
run: |
echo "=== All files in out/ directory ==="
Expand All @@ -224,23 +240,23 @@ jobs:
echo "=== File sizes ==="
find ui/desktop/out/ -name "*.deb" -o -name "*.rpm" -exec ls -lh {} \;

# 15) Upload .deb package
# 17) Upload .deb package
- name: Upload .deb package
uses: actions/upload-artifact@v4
with:
name: Goose-linux-x64-deb
path: ui/desktop/out/make/deb/x64/*.deb
if-no-files-found: error

# 16) Upload .rpm package
# 18) Upload .rpm package
- name: Upload .rpm package
uses: actions/upload-artifact@v4
with:
name: Goose-linux-x64-rpm
path: ui/desktop/out/make/rpm/x64/*.rpm
if-no-files-found: error

# 17) Create combined artifact with both packages
# 19) Create combined artifact with both packages
- name: Upload combined Linux packages
uses: actions/upload-artifact@v4
with:
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/bundle-desktop-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,20 @@ jobs:
ls -la ./target/x86_64-pc-windows-gnu/release/goosed.exe
ls -la ./target/x86_64-pc-windows-gnu/release/*.dll

# 4.5) Build temporal-service for Windows
# 4.5) Build temporal-service for Windows using build.sh script
- name: Build temporal-service for Windows
run: |
echo "Building temporal-service for Windows..."
echo "Building temporal-service for Windows using build.sh script..."
docker run --rm \
-v "$(pwd)":/usr/src/myapp \
-w /usr/src/myapp/temporal-service \
golang:latest \
sh -c "GOOS=windows GOARCH=amd64 go build -o temporal-service.exe main.go"
sh -c "
# Make build.sh executable
chmod +x build.sh
# Set Windows build environment and run build script
GOOS=windows GOARCH=amd64 ./build.sh
"
echo "temporal-service.exe built successfully"

# 4.6) Download temporal CLI for Windows
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/bundle-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,12 @@ jobs:
- name: Build goosed
run: source ./bin/activate-hermit && cargo build --release -p goose-server

# Build temporal-service
# Build temporal-service using build.sh script
- name: Build temporal-service
run: |
echo "Building temporal-service..."
echo "Building temporal-service using build.sh script..."
cd temporal-service
go build -o temporal-service main.go
chmod +x temporal-service
./build.sh
echo "temporal-service built successfully"

# Install and prepare temporal CLI
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,8 @@ benchconf.json
scripts/fake.sh
do_not_version/
/ui/desktop/src/bin/temporal
/temporal-service/temporal.db
/ui/desktop/src/bin/temporal.db
/temporal.db
/ui/desktop/src/bin/goose-scheduler-executor
/ui/desktop/src/bin/goose
16 changes: 0 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

98 changes: 76 additions & 22 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ copy-binary BUILD_MODE="release":
echo "Binary not found in target/{{BUILD_MODE}}"; \
exit 1; \
fi
@if [ -f ./target/{{BUILD_MODE}}/goose ]; then \
echo "Copying goose CLI binary from target/{{BUILD_MODE}}..."; \
cp -p ./target/{{BUILD_MODE}}/goose ./ui/desktop/src/bin/; \
else \
echo "Goose CLI binary not found in target/{{BUILD_MODE}}"; \
exit 1; \
fi
@if [ -f ./temporal-service/temporal-service ]; then \
echo "Copying temporal-service binary..."; \
cp -p ./temporal-service/temporal-service ./ui/desktop/src/bin/; \
Expand All @@ -83,6 +90,13 @@ copy-binary-intel:
echo "Intel release binary not found."; \
exit 1; \
fi
@if [ -f ./target/x86_64-apple-darwin/release/goose ]; then \
echo "Copying Intel goose CLI binary to ui/desktop/src/bin..."; \
cp -p ./target/x86_64-apple-darwin/release/goose ./ui/desktop/src/bin/; \
else \
echo "Intel goose CLI binary not found."; \
exit 1; \
fi
@if [ -f ./temporal-service/temporal-service ]; then \
echo "Copying temporal-service binary..."; \
cp -p ./temporal-service/temporal-service ./ui/desktop/src/bin/; \
Expand All @@ -108,6 +122,12 @@ copy-binary-windows:
Write-Host 'Windows binary not found.' -ForegroundColor Red; \
exit 1; \
}"
@powershell.exe -Command "if (Test-Path ./target/x86_64-pc-windows-gnu/release/goose-scheduler-executor.exe) { \
Write-Host 'Copying Windows goose-scheduler-executor binary...'; \
Copy-Item -Path './target/x86_64-pc-windows-gnu/release/goose-scheduler-executor.exe' -Destination './ui/desktop/src/bin/' -Force; \
} else { \
Write-Host 'Windows goose-scheduler-executor binary not found.' -ForegroundColor Yellow; \
}"
@if [ -f ./temporal-service/temporal-service.exe ]; then \
echo "Copying Windows temporal-service binary..."; \
cp -p ./temporal-service/temporal-service.exe ./ui/desktop/src/bin/; \
Expand All @@ -134,6 +154,12 @@ run-ui-alpha temporal="true":
@echo "Running UI with {{ if temporal == "true" { "Temporal" } else { "Legacy" } }} scheduler..."
cd ui/desktop && npm install && ALPHA=true GOOSE_SCHEDULER_TYPE={{ if temporal == "true" { "temporal" } else { "legacy" } }} npm run start-alpha-gui

# Run UI with alpha changes using legacy scheduler (no Temporal dependency)
run-ui-alpha-legacy:
@just release-binary
@echo "Running UI with Legacy scheduler (no Temporal required)..."
cd ui/desktop && npm install && ALPHA=true GOOSE_SCHEDULER_TYPE=legacy npm run start-alpha-gui

# Run UI with latest (Windows version)
run-ui-windows:
@just release-windows
Expand All @@ -160,6 +186,11 @@ make-ui:
@just release-binary
cd ui/desktop && npm run bundle:default

# make GUI with latest binary and alpha features enabled
make-ui-alpha:
@just release-binary
cd ui/desktop && npm run bundle:alpha

# make GUI with latest Windows binary
make-ui-windows:
@just release-windows
Expand All @@ -172,25 +203,8 @@ make-ui-windows:
echo "Copying Windows binary and DLLs..." && \
cp -f ./target/x86_64-pc-windows-gnu/release/goosed.exe ./ui/desktop/src/bin/ && \
cp -f ./target/x86_64-pc-windows-gnu/release/*.dll ./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 \
cp -f "$file" ./ui/desktop/src/bin/; \
fi; \
done && \
if [ -d "./ui/desktop/src/platform/windows/bin/goose-npm" ]; then \
echo "Setting up npm environment..." && \
rsync -a --delete ./ui/desktop/src/platform/windows/bin/goose-npm/ ./ui/desktop/src/bin/goose-npm/; \
fi && \
echo "Windows-specific files copied successfully"; \
fi && \
echo "Starting Windows package build..." && \
(cd ui/desktop && echo "In desktop directory, running npm bundle:windows..." && npm run bundle:windows) && \
echo "Creating resources directory..." && \
(cd ui/desktop && mkdir -p out/Goose-win32-x64/resources/bin) && \
echo "Copying final binaries..." && \
(cd ui/desktop && rsync -av src/bin/ out/Goose-win32-x64/resources/bin/) && \
(cd ui/desktop && npm run bundle:windows) && \
echo "Windows package build complete!"; \
else \
echo "Windows binary not found."; \
Expand All @@ -202,10 +216,50 @@ make-ui-intel:
@just release-intel
cd ui/desktop && npm run bundle:intel

# Setup langfuse server
langfuse-server:
#!/usr/bin/env bash
./scripts/setup_langfuse.sh
# Start Temporal services (server and temporal-service)
start-temporal:
@echo "Starting Temporal server..."
@if ! pgrep -f "temporal server start-dev" > /dev/null; then \
echo "Starting Temporal server in background..."; \
nohup temporal server start-dev --db-filename temporal.db --port 7233 --ui-port 8233 --log-level warn > temporal-server.log 2>&1 & \
echo "Waiting for Temporal server to start..."; \
sleep 5; \
else \
echo "Temporal server is already running"; \
fi
@echo "Starting temporal-service..."
@if ! pgrep -f "temporal-service" > /dev/null; then \
echo "Starting temporal-service in background..."; \
cd temporal-service && nohup ./temporal-service > temporal-service.log 2>&1 & \
echo "Waiting for temporal-service to start..."; \
sleep 3; \
else \
echo "temporal-service is already running"; \
fi
@echo "Temporal services started. Check logs: temporal-server.log, temporal-service/temporal-service.log"

# Stop Temporal services
stop-temporal:
@echo "Stopping Temporal services..."
@pkill -f "temporal server start-dev" || echo "Temporal server was not running"
@pkill -f "temporal-service" || echo "temporal-service was not running"
@echo "Temporal services stopped"

# Check status of Temporal services
status-temporal:
@echo "Checking Temporal services status..."
@if pgrep -f "temporal server start-dev" > /dev/null; then \
echo "✓ Temporal server is running"; \
else \
echo "✗ Temporal server is not running"; \
fi
@if pgrep -f "temporal-service" > /dev/null; then \
echo "✓ temporal-service is running"; \
else \
echo "✗ temporal-service is not running"; \
fi
@echo "Testing temporal-service health..."
@curl -s http://localhost:8080/health > /dev/null && echo "✓ temporal-service is responding" || echo "✗ temporal-service is not responding"

# Run UI with debug build
run-dev:
Expand Down
1 change: 1 addition & 0 deletions crates/goose-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ tokio = { version = "1.43", features = ["full"] }
futures = "0.3"
serde = { version = "1.0", features = ["derive"] } # For serialization
serde_yaml = "0.9"
tempfile = "3"
etcetera = "0.8.0"
reqwest = { version = "0.12.9", features = [
"rustls-tls-native-roots",
Expand Down
Loading
Loading