use pnpm for Desktop Electron App (#7679)

This commit is contained in:
Lifei Zhou 2026-03-11 08:46:05 -04:00 committed by GitHub
parent a28c306b23
commit 02bc7ed745
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 13856 additions and 21417 deletions

View file

@ -60,17 +60,17 @@
- `just check-openapi-schema` - OpenAPI schema validation
**Desktop app checks:**
- `npm ci` - Fresh dependency install (in `ui/desktop/`)
- `npm run lint:check` - ESLint + Prettier
- `npm run test:run` - Vitest tests
- `pnpm install --frozen-lockfile` - Fresh dependency install (in `ui/desktop/`)
- `pnpm run lint:check` - ESLint + Prettier
- `pnpm run test:run` - Vitest tests
**Setup steps CI performs:**
- Installs system dependencies (libdbus, gnome-keyring, libxcb)
- Activates hermit environment (`source bin/activate-hermit`)
- Caches Cargo and npm dependencies
- Runs `npm ci` before any npm scripts (ensures all packages are installed)
- Caches Cargo and pnpm dependencies
- Runs `pnpm install --frozen-lockfile` before any pnpm scripts (ensures all packages are installed)
**Key insight**: Commands like `npx` check local `node_modules` first, which CI installs via `npm ci`. Don't flag these as broken unless you can explain why CI setup wouldn't handle it.
**Key insight**: Commands like `npx` check local `node_modules` first, which CI installs via `pnpm install --frozen-lockfile`. Don't flag these as broken unless you can explain why CI setup wouldn't handle it.
## Skip These (Low Value)
@ -78,7 +78,7 @@ Do not comment on:
- **Style/formatting** - CI handles this (rustfmt, prettier)
- **Clippy warnings** - CI handles this (clippy)
- **Test failures** - CI handles this (full test suite)
- **Missing dependencies** - CI handles this (npm ci will fail)
- **Missing dependencies** - CI handles this (pnpm install will fail)
- **Minor naming suggestions** - unless truly confusing
- **Suggestions to add comments** - for self-documenting code
- **Refactoring suggestions** - unless there's a clear bug or maintainability issue

View file

@ -60,7 +60,7 @@ jobs:
# Update version in package.json
source ./bin/activate-hermit
cd ui/desktop
npm version ${{ inputs.version }} --no-git-tag-version --allow-same-version
pnpm version ${{ inputs.version }} --no-git-tag-version --allow-same-version
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
@ -94,18 +94,18 @@ jobs:
run: |
cp target/x86_64-apple-darwin/release/goosed ui/desktop/src/bin/goosed
- name: Cache npm dependencies
- name: Cache pnpm dependencies
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
with:
path: |
ui/desktop/node_modules
.hermit/node/cache
key: intel-npm-cache-v1-${{ runner.os }}-${{ hashFiles('ui/desktop/package-lock.json') }}
key: intel-pnpm-cache-v1-${{ runner.os }}-${{ hashFiles('ui/desktop/pnpm-lock.yaml') }}
restore-keys: |
intel-npm-cache-v1-${{ runner.os }}-
intel-pnpm-cache-v1-${{ runner.os }}-
- name: Install dependencies
run: source ../../bin/activate-hermit && npm ci
run: source ../../bin/activate-hermit && pnpm install --frozen-lockfile
working-directory: ui/desktop
# Configure Electron builder for Intel architecture
@ -125,7 +125,7 @@ jobs:
attempt=0
max_attempts=2
until [ $attempt -ge $max_attempts ]; do
npm run bundle:intel && break
pnpm run bundle:intel && break
attempt=$((attempt + 1))
echo "Attempt $attempt failed. Retrying..."
sleep 5

View file

@ -37,8 +37,9 @@ jobs:
rm -f Cargo.toml.bak
# Update version in package.json
source ./bin/activate-hermit
cd ui/desktop
npm version ${{ inputs.version }} --no-git-tag-version --allow-same-version
pnpm version ${{ inputs.version }} --no-git-tag-version --allow-same-version
- name: Debug workflow info
env:
@ -120,21 +121,21 @@ jobs:
chmod +x ui/desktop/src/bin/goosed
ls -la ui/desktop/src/bin/
- name: Cache npm dependencies
- name: Cache pnpm dependencies
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
with:
path: |
ui/desktop/node_modules
.hermit/node/cache
key: linux-npm-cache-v1-${{ runner.os }}-${{ hashFiles('ui/desktop/package-lock.json') }}
key: linux-pnpm-cache-v1-${{ runner.os }}-${{ hashFiles('ui/desktop/pnpm-lock.yaml') }}
restore-keys: |
linux-npm-cache-v1-${{ runner.os }}-
linux-pnpm-cache-v1-${{ runner.os }}-
- name: Install npm dependencies
- name: Install pnpm dependencies
run: |
source ./bin/activate-hermit
cd ui/desktop
npm ci
pnpm install --frozen-lockfile
# Verify installation
ls -la node_modules/.bin/ | head -5
@ -145,7 +146,7 @@ jobs:
echo "Building Linux packages (.deb, .rpm, and .flatpak)..."
# Build all configured packages
npm run make -- --platform=linux --arch=x64
pnpm run make -- --platform=linux --arch=x64
echo "Build completed. Checking output..."
ls -la out/

View file

@ -55,6 +55,9 @@ jobs:
with:
node-version: 24.10.0
- name: Install pnpm
run: npm install -g pnpm@10.30.3
- name: Cache node_modules
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
with:
@ -62,9 +65,9 @@ jobs:
node_modules
ui/desktop/node_modules
.hermit/node/cache
key: windows-npm-cache-v1-${{ runner.os }}-node24-${{ hashFiles('**/package-lock.json') }}
key: windows-pnpm-cache-v1-${{ runner.os }}-node24-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
windows-npm-cache-v1-${{ runner.os }}-node24-
windows-pnpm-cache-v1-${{ runner.os }}-node24-
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
@ -130,17 +133,17 @@ jobs:
git config --global url."https://github.com/".insteadOf "git@github.com:"
git config --global url."https://github.com/".insteadOf "git+ssh://git@github.com/"
- name: Build desktop UI with npm
- name: Build desktop UI with pnpm
shell: bash
env:
ELECTRON_PLATFORM: win32
run: |
cd ui/desktop
npm ci
pnpm install --frozen-lockfile
node scripts/build-main.js
node scripts/prepare-platform-binaries.js
npm run make -- --platform=win32 --arch=x64
pnpm run make -- --platform=win32 --arch=x64
- name: Copy exe to final out folder and prepare flat distribution
shell: bash

View file

@ -105,7 +105,7 @@ jobs:
source ./bin/activate-hermit
# Update version in package.json
cd ui/desktop
npm version "${VERSION}" --no-git-tag-version --allow-same-version
pnpm version "${VERSION}" --no-git-tag-version --allow-same-version
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
@ -131,18 +131,18 @@ jobs:
run: |
cp target/release/goosed ui/desktop/src/bin/goosed
- name: Cache npm dependencies
- name: Cache pnpm dependencies
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
with:
path: |
ui/desktop/node_modules
.hermit/node/cache
key: macos-npm-cache-v1-${{ runner.os }}-${{ hashFiles('ui/desktop/package-lock.json') }}
key: macos-pnpm-cache-v1-${{ runner.os }}-${{ hashFiles('ui/desktop/pnpm-lock.yaml') }}
restore-keys: |
macos-npm-cache-v1-${{ runner.os }}-
macos-pnpm-cache-v1-${{ runner.os }}-
- name: Install dependencies
run: source ../../bin/activate-hermit && npm ci
run: source ../../bin/activate-hermit && pnpm install --frozen-lockfile
working-directory: ui/desktop
# Check disk space before bundling
@ -155,7 +155,7 @@ jobs:
attempt=0
max_attempts=2
until [ $attempt -ge $max_attempts ]; do
npm run bundle:default && break
pnpm run bundle:default && break
attempt=$((attempt + 1))
echo "Attempt $attempt failed. Retrying..."
sleep 5

View file

@ -120,7 +120,7 @@ jobs:
uses: Swatinem/rust-cache@v2
- name: Install Node.js Dependencies for OpenAPI Check
run: source ../../bin/activate-hermit && npm ci
run: source ../../bin/activate-hermit && pnpm install --frozen-lockfile
working-directory: ui/desktop
- name: Check OpenAPI Schema is Up-to-Date
@ -141,28 +141,24 @@ jobs:
# Temporarily disabled due to GitHub Actions bug on macOS runners
# https://github.com/actions/runner-images/issues/13341
# https://github.com/actions/runner/issues/4134
# - name: Cache npm dependencies
# - name: Cache pnpm dependencies
# uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
# with:
# path: |
# ui/desktop/node_modules
# .hermit/node/cache
# key: ci-npm-cache-v1-${{ runner.os }}-${{ hashFiles('ui/desktop/package-lock.json') }}
# key: ci-pnpm-cache-v1-${{ runner.os }}-${{ hashFiles('ui/desktop/pnpm-lock.yaml') }}
# restore-keys: |
# ci-npm-cache-v1-${{ runner.os }}-
- name: Check lockfile has cross-platform entries
run: ./scripts/check-lockfile-platforms.sh
working-directory: ui/desktop
# ci-pnpm-cache-v1-${{ runner.os }}-
- name: Install Dependencies
run: source ../../bin/activate-hermit && npm ci
run: source ../../bin/activate-hermit && pnpm install --frozen-lockfile
working-directory: ui/desktop
- name: Run Lint
run: source ../../bin/activate-hermit && npm run lint:check
run: source ../../bin/activate-hermit && pnpm run lint:check
working-directory: ui/desktop
- name: Run Tests
run: source ../../bin/activate-hermit && npm run test:run
run: source ../../bin/activate-hermit && pnpm run test:run
working-directory: ui/desktop

View file

@ -267,7 +267,7 @@ jobs:
run: chmod +x target/debug/goosed
- name: Install Node.js Dependencies
run: source ../../bin/activate-hermit && npm ci
run: source ../../bin/activate-hermit && pnpm install --frozen-lockfile
working-directory: ui/desktop
- name: Run Integration Tests
@ -279,5 +279,5 @@ jobs:
SHELL: /bin/bash
run: |
echo 'export PATH=/some/fake/path:$PATH' >> $HOME/.bash_profile
source ../../bin/activate-hermit && npm run test:integration:debug
source ../../bin/activate-hermit && pnpm run test:integration:debug
working-directory: ui/desktop

View file

@ -1,7 +1,7 @@
# Only auto-format desktop TS code if relevant files are modified
if git diff --cached --name-only | grep -q "^ui/desktop/"; then
if [ -d "ui/desktop" ]; then
cd ui/desktop && npx lint-staged
cd ui/desktop && pnpm exec lint-staged
else
echo "Warning: ui/desktop directory does not exist, skipping lint-staged"
fi

View file

@ -35,7 +35,7 @@ cargo clippy --all-targets -- -D warnings
```bash
just generate-openapi # after server changes
just run-ui # start desktop
cd ui/desktop && npm test # test UI
cd ui/desktop && pnpm test # test UI
```
## Structure

View file

@ -43,7 +43,7 @@ pkg install cmake protobuf clang build-essential
- **Rust**: Install via [rustup](https://rustup.rs/)
- **Node.js**: Version 22.9.0 or later (use [nvm](https://github.com/nvm-sh/nvm) for version management)
- **npm**: Comes with Node.js
- **pnpm**: Version 10 or later (managed via Hermit, or install globally)
## Build Process
@ -61,7 +61,7 @@ cargo build --release -p goose-server
### 3. Prepare the Desktop Application
```bash
cd ui/desktop
npm install
pnpm install
# Copy the server binary to the expected location
mkdir -p src/bin
@ -73,7 +73,7 @@ cp ../../target/release/goosed src/bin/
#### Option A: ZIP Distribution (Recommended)
Works on all Linux distributions:
```bash
npm run make -- --targets=@electron-forge/maker-zip
pnpm run make -- --targets=@electron-forge/maker-zip
```
Output: `out/make/zip/linux/x64/goose-linux-x64-{version}.zip`
@ -81,14 +81,14 @@ Output: `out/make/zip/linux/x64/goose-linux-x64-{version}.zip`
#### Option B: DEB Package
For Debian/Ubuntu systems:
```bash
npm run make -- --targets=@electron-forge/maker-deb
pnpm run make -- --targets=@electron-forge/maker-deb
```
Output: `out/make/deb/x64/goose_{version}_amd64.deb`
#### Option C: Both Formats
```bash
npm run make
pnpm run make
```
### 5. Run the Application
@ -130,7 +130,7 @@ cd /path/to/goose/ui/desktop/out/goose-linux-x64
If you see "Could not find goosed binary", ensure you've:
1. Built the Rust backend: `cargo build --release -p goose-server`
2. Copied it to the right location: `cp ../../target/release/goosed src/bin/`
3. Rebuilt the application: `npm run make`
3. Rebuilt the application: `pnpm run make`
### Distribution-Specific Notes
@ -148,7 +148,7 @@ sudo apt install flatpak flatpak-builder
flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo
# Build with Electron Forge
npm run make -- --targets=@electron-forge/maker-flatpak
pnpm run make -- --targets=@electron-forge/maker-flatpak
```
Output: `out/make/flatpak/x86_64/*.flatpak`
@ -161,7 +161,7 @@ Building as Snap packages is not currently supported but may be added in the fut
For active development:
1. **Backend changes**: Rebuild with `cargo build --release -p goose-server` and copy the binary
2. **Frontend changes**: Use `npm run start` for hot reload during development
2. **Frontend changes**: Use `pnpm run start` for hot reload during development
3. **Full rebuild**: Run the complete build process above
## Creating System Integration

View file

@ -14,7 +14,7 @@ check-everything:
@echo " → Checking for banned TLS crates..."
./scripts/check-no-native-tls.sh
@echo " → Checking UI code formatting..."
cd ui/desktop && npm run lint:check
cd ui/desktop && pnpm run lint:check
@echo " → Validating OpenAPI schema..."
./scripts/check-openapi-schema.sh
@echo ""
@ -125,7 +125,7 @@ copy-binary-windows:
run-ui:
@just release-binary
@echo "Running UI..."
cd ui/desktop && npm ci && npm run start-gui
cd ui/desktop && pnpm install && pnpm run start-gui
run-ui-playwright:
#!/usr/bin/env sh
@ -134,11 +134,11 @@ run-ui-playwright:
RUN_DIR="$HOME/goose-runs/$(date +%Y%m%d-%H%M%S)"
mkdir -p "$RUN_DIR"
echo "Using isolated directory: $RUN_DIR"
cd ui/desktop && ENABLE_PLAYWRIGHT=true GOOSE_PATH_ROOT="$RUN_DIR" npm run start-gui
cd ui/desktop && ENABLE_PLAYWRIGHT=true GOOSE_PATH_ROOT="$RUN_DIR" pnpm run start-gui
run-ui-only:
@echo "Running UI..."
cd ui/desktop && npm ci && npm run start-gui
cd ui/desktop && pnpm install && pnpm run start-gui
debug-ui *alpha:
@echo "🚀 Starting goose frontend in external backend mode{{ if alpha == "alpha" { " with alpha features enabled" } else { "" } }}"
@ -146,8 +146,8 @@ debug-ui *alpha:
export GOOSE_EXTERNAL_BACKEND=true && \
export GOOSE_SERVER__SECRET_KEY="${GOOSE_SERVER__SECRET_KEY:-test}" && \
{{ if alpha == "alpha" { "export ALPHA=true &&" } else { "" } }} \
npm ci && \
npm run {{ if alpha == "alpha" { "start-alpha-gui" } else { "start-gui" } }}
pnpm install && \
pnpm run {{ if alpha == "alpha" { "start-alpha-gui" } else { "start-gui" } }}
# Run UI with main process debugging enabled
# To debug main process:
@ -160,15 +160,15 @@ debug-ui-main-process:
@echo "🔍 Starting goose UI with main process debugging enabled"
@just release-binary
cd ui/desktop && \
npm ci && \
npm run start-gui-debug
pnpm install && \
pnpm run start-gui-debug
# Package the desktop app locally for testing (macOS)
# Applies ad-hoc code signing with entitlements (needed for mic access, etc.)
package-ui:
@just release-binary
@echo "Packaging desktop app..."
cd ui/desktop && npm ci && npm run package
cd ui/desktop && pnpm install && pnpm run package
@echo "Signing with entitlements..."
codesign --force --deep --sign - --entitlements ui/desktop/entitlements.plist ui/desktop/out/Goose-darwin-arm64/Goose.app
@echo "Done! Launch with: open ui/desktop/out/Goose-darwin-arm64/Goose.app"
@ -177,14 +177,14 @@ package-ui:
run-ui-alpha:
@just release-binary
@echo "Running UI with alpha features..."
cd ui/desktop && npm ci && ALPHA=true npm run start-alpha-gui
cd ui/desktop && pnpm install && ALPHA=true pnpm run start-alpha-gui
# Run UI with latest (Windows version)
run-ui-windows:
@just release-windows
@powershell.exe -Command "Write-Host 'Copying Windows binary...'"
@just copy-binary-windows
@powershell.exe -Command "Write-Host 'Running UI...'; Set-Location ui/desktop; npm ci; npm run start-gui"
@powershell.exe -Command "Write-Host 'Running UI...'; Set-Location ui/desktop; pnpm install; pnpm run start-gui"
# Run Docusaurus server for documentation
run-docs:
@ -215,17 +215,17 @@ generate-manpages:
# make GUI with latest binary
lint-ui:
cd ui/desktop && npm run lint:check
cd ui/desktop && pnpm run lint:check
# make GUI with latest binary
make-ui:
@just release-binary
cd ui/desktop && npm run bundle:default
cd ui/desktop && pnpm 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
cd ui/desktop && pnpm run bundle:alpha
# make GUI with latest Windows binary
make-ui-windows:
@ -240,7 +240,7 @@ make-ui-windows:
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/ && \
echo "Starting Windows package build..." && \
(cd ui/desktop && npm run bundle:windows) && \
(cd ui/desktop && pnpm run bundle:windows) && \
echo "Windows package build complete!"; \
else \
echo "Windows binary not found."; \
@ -250,7 +250,7 @@ make-ui-windows:
# make GUI with latest binary
make-ui-intel:
@just release-intel
cd ui/desktop && npm run bundle:intel
cd ui/desktop && pnpm run bundle:intel
@ -260,11 +260,11 @@ run-dev:
cargo build
@just copy-binary debug
@echo "Running UI..."
cd ui/desktop && npm run start-gui
cd ui/desktop && pnpm run start-gui
# Install all dependencies (run once after fresh clone)
install-deps:
cd ui/desktop && npm install
cd ui/desktop && pnpm install
cd documentation && yarn
ensure-release-branch:
@ -313,7 +313,7 @@ prepare-release version:
@git switch -c "release/{{ version }}"
@uvx --from=toml-cli toml set --toml-path=Cargo.toml "workspace.package.version" {{ version }}
@cd ui/desktop && npm version {{ version }} --no-git-tag-version --allow-same-version
@cd ui/desktop && pnpm version {{ version }} --no-git-tag-version --allow-same-version
# see --workspace flag https://doc.rust-lang.org/cargo/commands/cargo-update.html
# used to update Cargo.lock after we've bumped versions in Cargo.toml
@ -324,7 +324,7 @@ prepare-release version:
Cargo.toml \
Cargo.lock \
ui/desktop/package.json \
ui/desktop/package-lock.json \
ui/desktop/pnpm-lock.yaml \
ui/desktop/openapi.json \
crates/goose/src/providers/canonical/data/canonical_models.json \
crates/goose/src/providers/canonical/data/canonical_mapping_report.json
@ -385,9 +385,9 @@ win-bld-rls:
win-bld-rls-all:
just win-bld "--release" "--workspace --all-targets --all-features"
### Install npm stuff
### Install pnpm stuff
win-app-deps:
cd ui{{s}}desktop ; npm ci
cd ui{{s}}desktop ; pnpm install
### Windows copy {release|debug} files to ui\desktop\src\bin
### s = os dependent file separator
@ -407,13 +407,13 @@ win-copy-oth profile:
win-app-copy profile="release":
just win-copy-{{ if os() == "windows" { "win" } else { "oth" } }} {{profile}}
### Only copy binaries, npm install, start-gui
### Only copy binaries, pnpm install, start-gui
### profile = release or debug
### s = os dependent file separator
win-app-run profile:
just win-app-copy {{profile}}
just win-app-deps
cd ui{{s}}desktop ; npm run start-gui
cd ui{{s}}desktop ; pnpm run start-gui
### Only run debug desktop, no build
win-run-dbg:

1
bin/.pnpm-10.30.3.pkg Symbolic link
View file

@ -0,0 +1 @@
hermit

1
bin/pnpm Symbolic link
View file

@ -0,0 +1 @@
.pnpm-10.30.3.pkg

View file

@ -1 +1,4 @@
registry=https://registry.npmjs.org/
registry=https://registry.npmjs.org/
node-linker=hoisted
supportedArchitectures.os=current,linux,darwin,win32
supportedArchitectures.cpu=current,x64,arm64

View file

@ -10,8 +10,8 @@ git clone git@github.com:block/goose.git
cd goose
source ./bin/activate-hermit
cd ui/desktop
npm install
npm run start
pnpm install
pnpm run start
```
## Platform-specific build requirements
@ -41,9 +41,9 @@ This is an electron forge app, using vite and react.js. `goosed` runs as multi p
## Building for different platforms
### macOS
`npm run bundle:default` will give you a goose.app/zip which is signed/notarized but only if you set up the env vars as per `forge.config.ts` (you can empty out the section on osxSign if you don't want to sign it) - this will have all defaults.
`pnpm run bundle:default` will give you a goose.app/zip which is signed/notarized but only if you set up the env vars as per `forge.config.ts` (you can empty out the section on osxSign if you don't want to sign it) - this will have all defaults.
`npm run bundle:preconfigured` will make a goose.app/zip signed and notarized, but use the following:
`pnpm run bundle:preconfigured` will make a goose.app/zip signed and notarized, but use the following:
```python
f" process.env.GOOSE_PROVIDER__TYPE = '{os.getenv("GOOSE_BUNDLE_TYPE")}';",
@ -71,13 +71,13 @@ cp ../../target/release/goosed src/bin/
3. Build the application:
```bash
# For ZIP distribution (works on all Linux distributions)
npm run make -- --targets=@electron-forge/maker-zip
pnpm run make -- --targets=@electron-forge/maker-zip
# For DEB package (Debian/Ubuntu)
npm run make -- --targets=@electron-forge/maker-deb
pnpm run make -- --targets=@electron-forge/maker-deb
# For Flatpak (requires flatpak and flatpak-builder)
npm run make -- --targets=@electron-forge/maker-flatpak
pnpm run make -- --targets=@electron-forge/maker-flatpak
```
The built application will be available in:
@ -94,5 +94,5 @@ Use the existing Windows build process as documented.
Set `VITE_START_EMBEDDED_SERVER=yes` to no in `.env`.
Run `cargo run -p goose-server` from parent dir.
`npm run start` will then run against this.
`pnpm run start` will then run against this.
You can try server directly with `./test.sh`

File diff suppressed because it is too large Load diff

View file

@ -5,30 +5,30 @@
"description": "Goose App",
"engines": {
"node": "^24.10.0",
"npm": "^11.6.1"
"pnpm": ">=10.30.0"
},
"main": ".vite/build/main.js",
"scripts": {
"typecheck": "tsc --noEmit",
"generate-api": "openapi-ts",
"start-gui": "npm run generate-api && electron-forge start",
"start-gui-debug": "npm run generate-api && electron-forge start -- --inspect=9229",
"start-gui": "pnpm run generate-api && electron-forge start",
"start-gui-debug": "pnpm run generate-api && electron-forge start -- --inspect=9229",
"start": "cd ../.. && just run-ui",
"start:test-error": "GOOSE_TEST_ERROR=true electron-forge start",
"package": "electron-forge package",
"make": "electron-forge make",
"bundle:default": "node scripts/prepare-platform-binaries.js && npm run make && BUNDLE_NAME=\"${GOOSE_BUNDLE_NAME:-Goose}\" && APP_DIR=\"out/${BUNDLE_NAME}-darwin-arm64\" && APP_BUNDLE=\"${APP_DIR}/${BUNDLE_NAME}.app\" && (cd \"$APP_DIR\" && ditto -c -k --sequesterRsrc --keepParent \"${BUNDLE_NAME}.app\" \"${BUNDLE_NAME}.zip\") || echo \"${APP_BUNDLE} not found; either the binary is not built or you are not on macOS\"",
"bundle:alpha": "ALPHA=true node scripts/prepare-platform-binaries.js && ALPHA=true npm run make && BUNDLE_NAME=\"${GOOSE_BUNDLE_NAME:-Goose}\" && APP_DIR=\"out/${BUNDLE_NAME}-darwin-arm64\" && APP_BUNDLE=\"${APP_DIR}/${BUNDLE_NAME}.app\" && (cd \"$APP_DIR\" && ditto -c -k --sequesterRsrc --keepParent \"${BUNDLE_NAME}.app\" \"${BUNDLE_NAME}_alpha.zip\") || echo \"${APP_BUNDLE} not found; either the binary is not built or you are not on macOS\"",
"bundle:intel": "node scripts/prepare-platform-binaries.js && npm run make -- --arch=x64 && BUNDLE_NAME=\"${GOOSE_BUNDLE_NAME:-Goose}\" && APP_DIR=\"out/${BUNDLE_NAME}-darwin-x64\" && APP_BUNDLE=\"${APP_DIR}/${BUNDLE_NAME}.app\" && (cd \"$APP_DIR\" && ditto -c -k --sequesterRsrc --keepParent \"${BUNDLE_NAME}.app\" \"${BUNDLE_NAME}_intel_mac.zip\")",
"bundle:default": "node scripts/prepare-platform-binaries.js && pnpm run make && BUNDLE_NAME=\"${GOOSE_BUNDLE_NAME:-Goose}\" && APP_DIR=\"out/${BUNDLE_NAME}-darwin-arm64\" && APP_BUNDLE=\"${APP_DIR}/${BUNDLE_NAME}.app\" && (cd \"$APP_DIR\" && ditto -c -k --sequesterRsrc --keepParent \"${BUNDLE_NAME}.app\" \"${BUNDLE_NAME}.zip\") || echo \"${APP_BUNDLE} not found; either the binary is not built or you are not on macOS\"",
"bundle:alpha": "ALPHA=true node scripts/prepare-platform-binaries.js && ALPHA=true pnpm run make && BUNDLE_NAME=\"${GOOSE_BUNDLE_NAME:-Goose}\" && APP_DIR=\"out/${BUNDLE_NAME}-darwin-arm64\" && APP_BUNDLE=\"${APP_DIR}/${BUNDLE_NAME}.app\" && (cd \"$APP_DIR\" && ditto -c -k --sequesterRsrc --keepParent \"${BUNDLE_NAME}.app\" \"${BUNDLE_NAME}_alpha.zip\") || echo \"${APP_BUNDLE} not found; either the binary is not built or you are not on macOS\"",
"bundle:intel": "node scripts/prepare-platform-binaries.js && pnpm run make -- --arch=x64 && BUNDLE_NAME=\"${GOOSE_BUNDLE_NAME:-Goose}\" && APP_DIR=\"out/${BUNDLE_NAME}-darwin-x64\" && APP_BUNDLE=\"${APP_DIR}/${BUNDLE_NAME}.app\" && (cd \"$APP_DIR\" && ditto -c -k --sequesterRsrc --keepParent \"${BUNDLE_NAME}.app\" \"${BUNDLE_NAME}_intel_mac.zip\")",
"debug": "echo 'run --remote-debugging-port=8315' && BUNDLE_NAME=\"${GOOSE_BUNDLE_NAME:-Goose}\" && lldb \"out/${BUNDLE_NAME}-darwin-arm64/${BUNDLE_NAME}.app\"",
"test-e2e": "npm run generate-api && playwright test",
"test-e2e:dev": "npm run generate-api && playwright test --reporter=list --retries=0 --max-failures=1",
"test-e2e:ui": "npm run generate-api && playwright test --ui",
"test-e2e:debug": "npm run generate-api && playwright test --debug",
"test-e2e": "pnpm run generate-api && playwright test",
"test-e2e:dev": "pnpm run generate-api && playwright test --reporter=list --retries=0 --max-failures=1",
"test-e2e:ui": "pnpm run generate-api && playwright test --ui",
"test-e2e:debug": "pnpm run generate-api && playwright test --debug",
"test-e2e:report": "playwright show-report",
"test-e2e:single": "npm run generate-api && playwright test -g",
"test-e2e:single": "pnpm run generate-api && playwright test -g",
"lint": "eslint \"src/**/*.{ts,tsx}\" --fix --no-warn-ignored",
"lint:check": "npm run typecheck && eslint \"src/**/*.{ts,tsx}\" --max-warnings 0 --no-warn-ignored",
"lint:check": "pnpm run typecheck && eslint \"src/**/*.{ts,tsx}\" --max-warnings 0 --no-warn-ignored",
"format": "prettier --write \"src/**/*.{ts,tsx,css,json}\"",
"format:check": "prettier --check \"src/**/*.{ts,tsx,css,json}\"",
"test": "vitest",
@ -39,10 +39,9 @@
"test:integration:watch": "vitest --config vitest.integration.config.ts",
"test:integration:debug": "DEBUG=1 vitest run --config vitest.integration.config.ts",
"prepare": "husky",
"start-alpha-gui": "ALPHA=true npm run start-gui"
"start-alpha-gui": "ALPHA=true pnpm run start-gui"
},
"dependencies": {
"goose-acp-types": "file:../acp",
"@mcp-ui/client": "^6.1.0",
"@modelcontextprotocol/ext-apps": "^1.1.1",
"@radix-ui/react-accordion": "^1.2.12",
@ -56,7 +55,7 @@
"@radix-ui/react-slot": "^1.2.4",
"@radix-ui/react-tabs": "^1.1.13",
"@radix-ui/themes": "^3.3.0",
"@tanstack/react-form": "1.28.3",
"@tanstack/react-form": "^1.28.3",
"@types/react-router-dom": "^5.3.3",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
@ -71,7 +70,8 @@
"electron-window-state": "^5.0.3",
"express": "^5.2.1",
"framer-motion": "^12.34.3",
"katex": "0.16.33",
"goose-acp-types": "file:../acp",
"katex": "^0.16.33",
"lodash": "^4.17.23",
"lucide-react": "^0.575.0",
"qrcode.react": "^4.2.0",
@ -110,7 +110,7 @@
"@electron/fuses": "^1.8.0",
"@electron/remote": "^2.1.3",
"@eslint/js": "^9.39.2",
"@hey-api/openapi-ts": "0.93.0",
"@hey-api/openapi-ts": "^0.93.0",
"@modelcontextprotocol/sdk": "^1.27.0",
"@playwright/test": "^1.58.2",
"@tailwindcss/line-clamp": "^0.4.4",
@ -152,13 +152,21 @@
},
"keywords": [],
"license": "Apache-2.0",
"overrides": {
"react": "^19.2.4",
"react-dom": "^19.2.4"
"pnpm": {
"overrides": {
"react": "^19.2.4",
"react-dom": "^19.2.4"
},
"onlyBuiltDependencies": [
"@modelcontextprotocol/ext-apps",
"electron",
"electron-winstaller",
"esbuild"
]
},
"lint-staged": {
"src/**/*.{ts,tsx}": [
"bash -c 'npm run typecheck'",
"bash -c 'pnpm run typecheck'",
"eslint --fix --max-warnings 0 --no-warn-ignored",
"prettier --write"
],

13733
ui/desktop/pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,30 +0,0 @@
#!/usr/bin/env bash
# Verify package-lock.json has cross-platform optional dependency entries.
#
# npm has a bug where running `npm install` with an existing node_modules/
# prunes platform-specific entries from the lockfile, breaking CI on other platforms.
# See: https://github.com/npm/cli/issues/4828
#
set -euo pipefail
LOCKFILE="${1:-package-lock.json}"
fail=0
grep -q '"node_modules/@esbuild/win32-x64"' "$LOCKFILE" || { echo "MISSING: @esbuild/win32-x64"; fail=1; }
grep -q '"node_modules/@esbuild/linux-x64"' "$LOCKFILE" || { echo "MISSING: @esbuild/linux-x64"; fail=1; }
if [ "$fail" -eq 1 ]; then
echo ""
echo "ERROR: package-lock.json is missing cross-platform optional dependencies."
echo "This happens when 'npm install' is run with an existing node_modules/ directory."
echo ""
echo "To fix, run from ui/desktop/:"
echo " rm -rf node_modules package-lock.json"
echo " npm install"
echo ""
echo "Then commit the regenerated package-lock.json."
exit 1
fi
echo "OK: package-lock.json has cross-platform entries"

View file

@ -42,7 +42,7 @@ export const test = base.extend<GooseTestFixtures>({
// Start the electron-forge process with Playwright remote debugging enabled
// Use detached mode on Unix to create a process group we can kill together
appProcess = spawn('npm', ['run', 'start-gui'], {
appProcess = spawn('pnpm', ['run', 'start-gui'], {
cwd: join(__dirname, '../..'),
stdio: 'pipe',
detached: process.platform !== 'win32',