mirror of
https://github.com/block/goose.git
synced 2026-04-28 03:29:36 +00:00
use pnpm for Desktop Electron App (#7679)
This commit is contained in:
parent
a28c306b23
commit
02bc7ed745
20 changed files with 13856 additions and 21417 deletions
14
.github/copilot-instructions.md
vendored
14
.github/copilot-instructions.md
vendored
|
|
@ -60,17 +60,17 @@
|
||||||
- `just check-openapi-schema` - OpenAPI schema validation
|
- `just check-openapi-schema` - OpenAPI schema validation
|
||||||
|
|
||||||
**Desktop app checks:**
|
**Desktop app checks:**
|
||||||
- `npm ci` - Fresh dependency install (in `ui/desktop/`)
|
- `pnpm install --frozen-lockfile` - Fresh dependency install (in `ui/desktop/`)
|
||||||
- `npm run lint:check` - ESLint + Prettier
|
- `pnpm run lint:check` - ESLint + Prettier
|
||||||
- `npm run test:run` - Vitest tests
|
- `pnpm run test:run` - Vitest tests
|
||||||
|
|
||||||
**Setup steps CI performs:**
|
**Setup steps CI performs:**
|
||||||
- Installs system dependencies (libdbus, gnome-keyring, libxcb)
|
- Installs system dependencies (libdbus, gnome-keyring, libxcb)
|
||||||
- Activates hermit environment (`source bin/activate-hermit`)
|
- Activates hermit environment (`source bin/activate-hermit`)
|
||||||
- Caches Cargo and npm dependencies
|
- Caches Cargo and pnpm dependencies
|
||||||
- Runs `npm ci` before any npm scripts (ensures all packages are installed)
|
- 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)
|
## Skip These (Low Value)
|
||||||
|
|
||||||
|
|
@ -78,7 +78,7 @@ Do not comment on:
|
||||||
- **Style/formatting** - CI handles this (rustfmt, prettier)
|
- **Style/formatting** - CI handles this (rustfmt, prettier)
|
||||||
- **Clippy warnings** - CI handles this (clippy)
|
- **Clippy warnings** - CI handles this (clippy)
|
||||||
- **Test failures** - CI handles this (full test suite)
|
- **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
|
- **Minor naming suggestions** - unless truly confusing
|
||||||
- **Suggestions to add comments** - for self-documenting code
|
- **Suggestions to add comments** - for self-documenting code
|
||||||
- **Refactoring suggestions** - unless there's a clear bug or maintainability issue
|
- **Refactoring suggestions** - unless there's a clear bug or maintainability issue
|
||||||
|
|
|
||||||
14
.github/workflows/bundle-desktop-intel.yml
vendored
14
.github/workflows/bundle-desktop-intel.yml
vendored
|
|
@ -60,7 +60,7 @@ jobs:
|
||||||
# Update version in package.json
|
# Update version in package.json
|
||||||
source ./bin/activate-hermit
|
source ./bin/activate-hermit
|
||||||
cd ui/desktop
|
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
|
- name: Cache Rust dependencies
|
||||||
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
|
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
|
||||||
|
|
@ -94,18 +94,18 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cp target/x86_64-apple-darwin/release/goosed ui/desktop/src/bin/goosed
|
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
|
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
ui/desktop/node_modules
|
ui/desktop/node_modules
|
||||||
.hermit/node/cache
|
.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: |
|
restore-keys: |
|
||||||
intel-npm-cache-v1-${{ runner.os }}-
|
intel-pnpm-cache-v1-${{ runner.os }}-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: source ../../bin/activate-hermit && npm ci
|
run: source ../../bin/activate-hermit && pnpm install --frozen-lockfile
|
||||||
working-directory: ui/desktop
|
working-directory: ui/desktop
|
||||||
|
|
||||||
# Configure Electron builder for Intel architecture
|
# Configure Electron builder for Intel architecture
|
||||||
|
|
@ -125,7 +125,7 @@ jobs:
|
||||||
attempt=0
|
attempt=0
|
||||||
max_attempts=2
|
max_attempts=2
|
||||||
until [ $attempt -ge $max_attempts ]; do
|
until [ $attempt -ge $max_attempts ]; do
|
||||||
npm run bundle:intel && break
|
pnpm run bundle:intel && break
|
||||||
attempt=$((attempt + 1))
|
attempt=$((attempt + 1))
|
||||||
echo "Attempt $attempt failed. Retrying..."
|
echo "Attempt $attempt failed. Retrying..."
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
|
||||||
15
.github/workflows/bundle-desktop-linux.yml
vendored
15
.github/workflows/bundle-desktop-linux.yml
vendored
|
|
@ -37,8 +37,9 @@ jobs:
|
||||||
rm -f Cargo.toml.bak
|
rm -f Cargo.toml.bak
|
||||||
|
|
||||||
# Update version in package.json
|
# Update version in package.json
|
||||||
|
source ./bin/activate-hermit
|
||||||
cd ui/desktop
|
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
|
- name: Debug workflow info
|
||||||
env:
|
env:
|
||||||
|
|
@ -120,21 +121,21 @@ jobs:
|
||||||
chmod +x ui/desktop/src/bin/goosed
|
chmod +x ui/desktop/src/bin/goosed
|
||||||
ls -la ui/desktop/src/bin/
|
ls -la ui/desktop/src/bin/
|
||||||
|
|
||||||
- name: Cache npm dependencies
|
- name: Cache pnpm dependencies
|
||||||
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
|
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
ui/desktop/node_modules
|
ui/desktop/node_modules
|
||||||
.hermit/node/cache
|
.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: |
|
restore-keys: |
|
||||||
linux-npm-cache-v1-${{ runner.os }}-
|
linux-pnpm-cache-v1-${{ runner.os }}-
|
||||||
|
|
||||||
- name: Install npm dependencies
|
- name: Install pnpm dependencies
|
||||||
run: |
|
run: |
|
||||||
source ./bin/activate-hermit
|
source ./bin/activate-hermit
|
||||||
cd ui/desktop
|
cd ui/desktop
|
||||||
npm ci
|
pnpm install --frozen-lockfile
|
||||||
# Verify installation
|
# Verify installation
|
||||||
ls -la node_modules/.bin/ | head -5
|
ls -la node_modules/.bin/ | head -5
|
||||||
|
|
||||||
|
|
@ -145,7 +146,7 @@ jobs:
|
||||||
echo "Building Linux packages (.deb, .rpm, and .flatpak)..."
|
echo "Building Linux packages (.deb, .rpm, and .flatpak)..."
|
||||||
|
|
||||||
# Build all configured packages
|
# Build all configured packages
|
||||||
npm run make -- --platform=linux --arch=x64
|
pnpm run make -- --platform=linux --arch=x64
|
||||||
|
|
||||||
echo "Build completed. Checking output..."
|
echo "Build completed. Checking output..."
|
||||||
ls -la out/
|
ls -la out/
|
||||||
|
|
|
||||||
13
.github/workflows/bundle-desktop-windows.yml
vendored
13
.github/workflows/bundle-desktop-windows.yml
vendored
|
|
@ -55,6 +55,9 @@ jobs:
|
||||||
with:
|
with:
|
||||||
node-version: 24.10.0
|
node-version: 24.10.0
|
||||||
|
|
||||||
|
- name: Install pnpm
|
||||||
|
run: npm install -g pnpm@10.30.3
|
||||||
|
|
||||||
- name: Cache node_modules
|
- name: Cache node_modules
|
||||||
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
|
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
|
||||||
with:
|
with:
|
||||||
|
|
@ -62,9 +65,9 @@ jobs:
|
||||||
node_modules
|
node_modules
|
||||||
ui/desktop/node_modules
|
ui/desktop/node_modules
|
||||||
.hermit/node/cache
|
.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: |
|
restore-keys: |
|
||||||
windows-npm-cache-v1-${{ runner.os }}-node24-
|
windows-pnpm-cache-v1-${{ runner.os }}-node24-
|
||||||
|
|
||||||
- name: Cache Rust dependencies
|
- name: Cache Rust dependencies
|
||||||
uses: Swatinem/rust-cache@v2
|
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@github.com:"
|
||||||
git config --global url."https://github.com/".insteadOf "git+ssh://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
|
shell: bash
|
||||||
env:
|
env:
|
||||||
ELECTRON_PLATFORM: win32
|
ELECTRON_PLATFORM: win32
|
||||||
run: |
|
run: |
|
||||||
cd ui/desktop
|
cd ui/desktop
|
||||||
|
|
||||||
npm ci
|
pnpm install --frozen-lockfile
|
||||||
node scripts/build-main.js
|
node scripts/build-main.js
|
||||||
node scripts/prepare-platform-binaries.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
|
- name: Copy exe to final out folder and prepare flat distribution
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
||||||
12
.github/workflows/bundle-desktop.yml
vendored
12
.github/workflows/bundle-desktop.yml
vendored
|
|
@ -105,7 +105,7 @@ jobs:
|
||||||
source ./bin/activate-hermit
|
source ./bin/activate-hermit
|
||||||
# Update version in package.json
|
# Update version in package.json
|
||||||
cd ui/desktop
|
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
|
- name: Cache Rust dependencies
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
|
|
@ -131,18 +131,18 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cp target/release/goosed ui/desktop/src/bin/goosed
|
cp target/release/goosed ui/desktop/src/bin/goosed
|
||||||
|
|
||||||
- name: Cache npm dependencies
|
- name: Cache pnpm dependencies
|
||||||
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
|
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
ui/desktop/node_modules
|
ui/desktop/node_modules
|
||||||
.hermit/node/cache
|
.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: |
|
restore-keys: |
|
||||||
macos-npm-cache-v1-${{ runner.os }}-
|
macos-pnpm-cache-v1-${{ runner.os }}-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: source ../../bin/activate-hermit && npm ci
|
run: source ../../bin/activate-hermit && pnpm install --frozen-lockfile
|
||||||
working-directory: ui/desktop
|
working-directory: ui/desktop
|
||||||
|
|
||||||
# Check disk space before bundling
|
# Check disk space before bundling
|
||||||
|
|
@ -155,7 +155,7 @@ jobs:
|
||||||
attempt=0
|
attempt=0
|
||||||
max_attempts=2
|
max_attempts=2
|
||||||
until [ $attempt -ge $max_attempts ]; do
|
until [ $attempt -ge $max_attempts ]; do
|
||||||
npm run bundle:default && break
|
pnpm run bundle:default && break
|
||||||
attempt=$((attempt + 1))
|
attempt=$((attempt + 1))
|
||||||
echo "Attempt $attempt failed. Retrying..."
|
echo "Attempt $attempt failed. Retrying..."
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
|
||||||
18
.github/workflows/ci.yml
vendored
18
.github/workflows/ci.yml
vendored
|
|
@ -120,7 +120,7 @@ jobs:
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
- name: Install Node.js Dependencies for OpenAPI Check
|
- 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
|
working-directory: ui/desktop
|
||||||
|
|
||||||
- name: Check OpenAPI Schema is Up-to-Date
|
- name: Check OpenAPI Schema is Up-to-Date
|
||||||
|
|
@ -141,28 +141,24 @@ jobs:
|
||||||
# Temporarily disabled due to GitHub Actions bug on macOS runners
|
# Temporarily disabled due to GitHub Actions bug on macOS runners
|
||||||
# https://github.com/actions/runner-images/issues/13341
|
# https://github.com/actions/runner-images/issues/13341
|
||||||
# https://github.com/actions/runner/issues/4134
|
# https://github.com/actions/runner/issues/4134
|
||||||
# - name: Cache npm dependencies
|
# - name: Cache pnpm dependencies
|
||||||
# uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
|
# uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
|
||||||
# with:
|
# with:
|
||||||
# path: |
|
# path: |
|
||||||
# ui/desktop/node_modules
|
# ui/desktop/node_modules
|
||||||
# .hermit/node/cache
|
# .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: |
|
# restore-keys: |
|
||||||
# ci-npm-cache-v1-${{ runner.os }}-
|
# ci-pnpm-cache-v1-${{ runner.os }}-
|
||||||
|
|
||||||
- name: Check lockfile has cross-platform entries
|
|
||||||
run: ./scripts/check-lockfile-platforms.sh
|
|
||||||
working-directory: ui/desktop
|
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: source ../../bin/activate-hermit && npm ci
|
run: source ../../bin/activate-hermit && pnpm install --frozen-lockfile
|
||||||
working-directory: ui/desktop
|
working-directory: ui/desktop
|
||||||
|
|
||||||
- name: Run Lint
|
- 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
|
working-directory: ui/desktop
|
||||||
|
|
||||||
- name: Run Tests
|
- 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
|
working-directory: ui/desktop
|
||||||
|
|
|
||||||
4
.github/workflows/pr-smoke-test.yml
vendored
4
.github/workflows/pr-smoke-test.yml
vendored
|
|
@ -267,7 +267,7 @@ jobs:
|
||||||
run: chmod +x target/debug/goosed
|
run: chmod +x target/debug/goosed
|
||||||
|
|
||||||
- name: Install Node.js Dependencies
|
- 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
|
working-directory: ui/desktop
|
||||||
|
|
||||||
- name: Run Integration Tests
|
- name: Run Integration Tests
|
||||||
|
|
@ -279,5 +279,5 @@ jobs:
|
||||||
SHELL: /bin/bash
|
SHELL: /bin/bash
|
||||||
run: |
|
run: |
|
||||||
echo 'export PATH=/some/fake/path:$PATH' >> $HOME/.bash_profile
|
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
|
working-directory: ui/desktop
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# Only auto-format desktop TS code if relevant files are modified
|
# Only auto-format desktop TS code if relevant files are modified
|
||||||
if git diff --cached --name-only | grep -q "^ui/desktop/"; then
|
if git diff --cached --name-only | grep -q "^ui/desktop/"; then
|
||||||
if [ -d "ui/desktop" ]; then
|
if [ -d "ui/desktop" ]; then
|
||||||
cd ui/desktop && npx lint-staged
|
cd ui/desktop && pnpm exec lint-staged
|
||||||
else
|
else
|
||||||
echo "Warning: ui/desktop directory does not exist, skipping lint-staged"
|
echo "Warning: ui/desktop directory does not exist, skipping lint-staged"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ cargo clippy --all-targets -- -D warnings
|
||||||
```bash
|
```bash
|
||||||
just generate-openapi # after server changes
|
just generate-openapi # after server changes
|
||||||
just run-ui # start desktop
|
just run-ui # start desktop
|
||||||
cd ui/desktop && npm test # test UI
|
cd ui/desktop && pnpm test # test UI
|
||||||
```
|
```
|
||||||
|
|
||||||
## Structure
|
## Structure
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ pkg install cmake protobuf clang build-essential
|
||||||
|
|
||||||
- **Rust**: Install via [rustup](https://rustup.rs/)
|
- **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)
|
- **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
|
## Build Process
|
||||||
|
|
||||||
|
|
@ -61,7 +61,7 @@ cargo build --release -p goose-server
|
||||||
### 3. Prepare the Desktop Application
|
### 3. Prepare the Desktop Application
|
||||||
```bash
|
```bash
|
||||||
cd ui/desktop
|
cd ui/desktop
|
||||||
npm install
|
pnpm install
|
||||||
|
|
||||||
# Copy the server binary to the expected location
|
# Copy the server binary to the expected location
|
||||||
mkdir -p src/bin
|
mkdir -p src/bin
|
||||||
|
|
@ -73,7 +73,7 @@ cp ../../target/release/goosed src/bin/
|
||||||
#### Option A: ZIP Distribution (Recommended)
|
#### Option A: ZIP Distribution (Recommended)
|
||||||
Works on all Linux distributions:
|
Works on all Linux distributions:
|
||||||
```bash
|
```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`
|
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
|
#### Option B: DEB Package
|
||||||
For Debian/Ubuntu systems:
|
For Debian/Ubuntu systems:
|
||||||
```bash
|
```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`
|
Output: `out/make/deb/x64/goose_{version}_amd64.deb`
|
||||||
|
|
||||||
#### Option C: Both Formats
|
#### Option C: Both Formats
|
||||||
```bash
|
```bash
|
||||||
npm run make
|
pnpm run make
|
||||||
```
|
```
|
||||||
|
|
||||||
### 5. Run the Application
|
### 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:
|
If you see "Could not find goosed binary", ensure you've:
|
||||||
1. Built the Rust backend: `cargo build --release -p goose-server`
|
1. Built the Rust backend: `cargo build --release -p goose-server`
|
||||||
2. Copied it to the right location: `cp ../../target/release/goosed src/bin/`
|
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
|
### 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
|
flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||||
|
|
||||||
# Build with Electron Forge
|
# 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`
|
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:
|
For active development:
|
||||||
|
|
||||||
1. **Backend changes**: Rebuild with `cargo build --release -p goose-server` and copy the binary
|
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
|
3. **Full rebuild**: Run the complete build process above
|
||||||
|
|
||||||
## Creating System Integration
|
## Creating System Integration
|
||||||
|
|
|
||||||
48
Justfile
48
Justfile
|
|
@ -14,7 +14,7 @@ check-everything:
|
||||||
@echo " → Checking for banned TLS crates..."
|
@echo " → Checking for banned TLS crates..."
|
||||||
./scripts/check-no-native-tls.sh
|
./scripts/check-no-native-tls.sh
|
||||||
@echo " → Checking UI code formatting..."
|
@echo " → Checking UI code formatting..."
|
||||||
cd ui/desktop && npm run lint:check
|
cd ui/desktop && pnpm run lint:check
|
||||||
@echo " → Validating OpenAPI schema..."
|
@echo " → Validating OpenAPI schema..."
|
||||||
./scripts/check-openapi-schema.sh
|
./scripts/check-openapi-schema.sh
|
||||||
@echo ""
|
@echo ""
|
||||||
|
|
@ -125,7 +125,7 @@ copy-binary-windows:
|
||||||
run-ui:
|
run-ui:
|
||||||
@just release-binary
|
@just release-binary
|
||||||
@echo "Running UI..."
|
@echo "Running UI..."
|
||||||
cd ui/desktop && npm ci && npm run start-gui
|
cd ui/desktop && pnpm install && pnpm run start-gui
|
||||||
|
|
||||||
run-ui-playwright:
|
run-ui-playwright:
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
@ -134,11 +134,11 @@ run-ui-playwright:
|
||||||
RUN_DIR="$HOME/goose-runs/$(date +%Y%m%d-%H%M%S)"
|
RUN_DIR="$HOME/goose-runs/$(date +%Y%m%d-%H%M%S)"
|
||||||
mkdir -p "$RUN_DIR"
|
mkdir -p "$RUN_DIR"
|
||||||
echo "Using isolated directory: $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:
|
run-ui-only:
|
||||||
@echo "Running UI..."
|
@echo "Running UI..."
|
||||||
cd ui/desktop && npm ci && npm run start-gui
|
cd ui/desktop && pnpm install && pnpm run start-gui
|
||||||
|
|
||||||
debug-ui *alpha:
|
debug-ui *alpha:
|
||||||
@echo "🚀 Starting goose frontend in external backend mode{{ if alpha == "alpha" { " with alpha features enabled" } else { "" } }}"
|
@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_EXTERNAL_BACKEND=true && \
|
||||||
export GOOSE_SERVER__SECRET_KEY="${GOOSE_SERVER__SECRET_KEY:-test}" && \
|
export GOOSE_SERVER__SECRET_KEY="${GOOSE_SERVER__SECRET_KEY:-test}" && \
|
||||||
{{ if alpha == "alpha" { "export ALPHA=true &&" } else { "" } }} \
|
{{ if alpha == "alpha" { "export ALPHA=true &&" } else { "" } }} \
|
||||||
npm ci && \
|
pnpm install && \
|
||||||
npm run {{ if alpha == "alpha" { "start-alpha-gui" } else { "start-gui" } }}
|
pnpm run {{ if alpha == "alpha" { "start-alpha-gui" } else { "start-gui" } }}
|
||||||
|
|
||||||
# Run UI with main process debugging enabled
|
# Run UI with main process debugging enabled
|
||||||
# To debug main process:
|
# To debug main process:
|
||||||
|
|
@ -160,15 +160,15 @@ debug-ui-main-process:
|
||||||
@echo "🔍 Starting goose UI with main process debugging enabled"
|
@echo "🔍 Starting goose UI with main process debugging enabled"
|
||||||
@just release-binary
|
@just release-binary
|
||||||
cd ui/desktop && \
|
cd ui/desktop && \
|
||||||
npm ci && \
|
pnpm install && \
|
||||||
npm run start-gui-debug
|
pnpm run start-gui-debug
|
||||||
|
|
||||||
# Package the desktop app locally for testing (macOS)
|
# Package the desktop app locally for testing (macOS)
|
||||||
# Applies ad-hoc code signing with entitlements (needed for mic access, etc.)
|
# Applies ad-hoc code signing with entitlements (needed for mic access, etc.)
|
||||||
package-ui:
|
package-ui:
|
||||||
@just release-binary
|
@just release-binary
|
||||||
@echo "Packaging desktop app..."
|
@echo "Packaging desktop app..."
|
||||||
cd ui/desktop && npm ci && npm run package
|
cd ui/desktop && pnpm install && pnpm run package
|
||||||
@echo "Signing with entitlements..."
|
@echo "Signing with entitlements..."
|
||||||
codesign --force --deep --sign - --entitlements ui/desktop/entitlements.plist ui/desktop/out/Goose-darwin-arm64/Goose.app
|
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"
|
@echo "Done! Launch with: open ui/desktop/out/Goose-darwin-arm64/Goose.app"
|
||||||
|
|
@ -177,14 +177,14 @@ package-ui:
|
||||||
run-ui-alpha:
|
run-ui-alpha:
|
||||||
@just release-binary
|
@just release-binary
|
||||||
@echo "Running UI with alpha features..."
|
@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 with latest (Windows version)
|
||||||
run-ui-windows:
|
run-ui-windows:
|
||||||
@just release-windows
|
@just release-windows
|
||||||
@powershell.exe -Command "Write-Host 'Copying Windows binary...'"
|
@powershell.exe -Command "Write-Host 'Copying Windows binary...'"
|
||||||
@just copy-binary-windows
|
@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 Docusaurus server for documentation
|
||||||
run-docs:
|
run-docs:
|
||||||
|
|
@ -215,17 +215,17 @@ generate-manpages:
|
||||||
|
|
||||||
# make GUI with latest binary
|
# make GUI with latest binary
|
||||||
lint-ui:
|
lint-ui:
|
||||||
cd ui/desktop && npm run lint:check
|
cd ui/desktop && pnpm run lint:check
|
||||||
|
|
||||||
# make GUI with latest binary
|
# make GUI with latest binary
|
||||||
make-ui:
|
make-ui:
|
||||||
@just release-binary
|
@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 GUI with latest binary and alpha features enabled
|
||||||
make-ui-alpha:
|
make-ui-alpha:
|
||||||
@just release-binary
|
@just release-binary
|
||||||
cd ui/desktop && npm run bundle:alpha
|
cd ui/desktop && pnpm run bundle:alpha
|
||||||
|
|
||||||
# make GUI with latest Windows binary
|
# make GUI with latest Windows binary
|
||||||
make-ui-windows:
|
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/goosed.exe ./ui/desktop/src/bin/ && \
|
||||||
cp -f ./target/x86_64-pc-windows-gnu/release/*.dll ./ui/desktop/src/bin/ && \
|
cp -f ./target/x86_64-pc-windows-gnu/release/*.dll ./ui/desktop/src/bin/ && \
|
||||||
echo "Starting Windows package build..." && \
|
echo "Starting Windows package build..." && \
|
||||||
(cd ui/desktop && npm run bundle:windows) && \
|
(cd ui/desktop && pnpm run bundle:windows) && \
|
||||||
echo "Windows package build complete!"; \
|
echo "Windows package build complete!"; \
|
||||||
else \
|
else \
|
||||||
echo "Windows binary not found."; \
|
echo "Windows binary not found."; \
|
||||||
|
|
@ -250,7 +250,7 @@ make-ui-windows:
|
||||||
# make GUI with latest binary
|
# make GUI with latest binary
|
||||||
make-ui-intel:
|
make-ui-intel:
|
||||||
@just release-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
|
cargo build
|
||||||
@just copy-binary debug
|
@just copy-binary debug
|
||||||
@echo "Running UI..."
|
@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 all dependencies (run once after fresh clone)
|
||||||
install-deps:
|
install-deps:
|
||||||
cd ui/desktop && npm install
|
cd ui/desktop && pnpm install
|
||||||
cd documentation && yarn
|
cd documentation && yarn
|
||||||
|
|
||||||
ensure-release-branch:
|
ensure-release-branch:
|
||||||
|
|
@ -313,7 +313,7 @@ prepare-release version:
|
||||||
@git switch -c "release/{{ version }}"
|
@git switch -c "release/{{ version }}"
|
||||||
@uvx --from=toml-cli toml set --toml-path=Cargo.toml "workspace.package.version" {{ 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
|
# 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
|
# used to update Cargo.lock after we've bumped versions in Cargo.toml
|
||||||
|
|
@ -324,7 +324,7 @@ prepare-release version:
|
||||||
Cargo.toml \
|
Cargo.toml \
|
||||||
Cargo.lock \
|
Cargo.lock \
|
||||||
ui/desktop/package.json \
|
ui/desktop/package.json \
|
||||||
ui/desktop/package-lock.json \
|
ui/desktop/pnpm-lock.yaml \
|
||||||
ui/desktop/openapi.json \
|
ui/desktop/openapi.json \
|
||||||
crates/goose/src/providers/canonical/data/canonical_models.json \
|
crates/goose/src/providers/canonical/data/canonical_models.json \
|
||||||
crates/goose/src/providers/canonical/data/canonical_mapping_report.json
|
crates/goose/src/providers/canonical/data/canonical_mapping_report.json
|
||||||
|
|
@ -385,9 +385,9 @@ win-bld-rls:
|
||||||
win-bld-rls-all:
|
win-bld-rls-all:
|
||||||
just win-bld "--release" "--workspace --all-targets --all-features"
|
just win-bld "--release" "--workspace --all-targets --all-features"
|
||||||
|
|
||||||
### Install npm stuff
|
### Install pnpm stuff
|
||||||
win-app-deps:
|
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
|
### Windows copy {release|debug} files to ui\desktop\src\bin
|
||||||
### s = os dependent file separator
|
### s = os dependent file separator
|
||||||
|
|
@ -407,13 +407,13 @@ win-copy-oth profile:
|
||||||
win-app-copy profile="release":
|
win-app-copy profile="release":
|
||||||
just win-copy-{{ if os() == "windows" { "win" } else { "oth" } }} {{profile}}
|
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
|
### profile = release or debug
|
||||||
### s = os dependent file separator
|
### s = os dependent file separator
|
||||||
win-app-run profile:
|
win-app-run profile:
|
||||||
just win-app-copy {{profile}}
|
just win-app-copy {{profile}}
|
||||||
just win-app-deps
|
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
|
### Only run debug desktop, no build
|
||||||
win-run-dbg:
|
win-run-dbg:
|
||||||
|
|
|
||||||
1
bin/.pnpm-10.30.3.pkg
Symbolic link
1
bin/.pnpm-10.30.3.pkg
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
hermit
|
||||||
1
bin/pnpm
Symbolic link
1
bin/pnpm
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
.pnpm-10.30.3.pkg
|
||||||
|
|
@ -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
|
||||||
|
|
@ -10,8 +10,8 @@ git clone git@github.com:block/goose.git
|
||||||
cd goose
|
cd goose
|
||||||
source ./bin/activate-hermit
|
source ./bin/activate-hermit
|
||||||
cd ui/desktop
|
cd ui/desktop
|
||||||
npm install
|
pnpm install
|
||||||
npm run start
|
pnpm run start
|
||||||
```
|
```
|
||||||
|
|
||||||
## Platform-specific build requirements
|
## 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
|
## Building for different platforms
|
||||||
|
|
||||||
### macOS
|
### 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
|
```python
|
||||||
f" process.env.GOOSE_PROVIDER__TYPE = '{os.getenv("GOOSE_BUNDLE_TYPE")}';",
|
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:
|
3. Build the application:
|
||||||
```bash
|
```bash
|
||||||
# For ZIP distribution (works on all Linux distributions)
|
# 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)
|
# 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)
|
# 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:
|
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`.
|
Set `VITE_START_EMBEDDED_SERVER=yes` to no in `.env`.
|
||||||
Run `cargo run -p goose-server` from parent dir.
|
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`
|
You can try server directly with `./test.sh`
|
||||||
|
|
|
||||||
21277
ui/desktop/package-lock.json
generated
21277
ui/desktop/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -5,30 +5,30 @@
|
||||||
"description": "Goose App",
|
"description": "Goose App",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^24.10.0",
|
"node": "^24.10.0",
|
||||||
"npm": "^11.6.1"
|
"pnpm": ">=10.30.0"
|
||||||
},
|
},
|
||||||
"main": ".vite/build/main.js",
|
"main": ".vite/build/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"typecheck": "tsc --noEmit",
|
"typecheck": "tsc --noEmit",
|
||||||
"generate-api": "openapi-ts",
|
"generate-api": "openapi-ts",
|
||||||
"start-gui": "npm run generate-api && electron-forge start",
|
"start-gui": "pnpm run generate-api && electron-forge start",
|
||||||
"start-gui-debug": "npm run generate-api && electron-forge start -- --inspect=9229",
|
"start-gui-debug": "pnpm run generate-api && electron-forge start -- --inspect=9229",
|
||||||
"start": "cd ../.. && just run-ui",
|
"start": "cd ../.. && just run-ui",
|
||||||
"start:test-error": "GOOSE_TEST_ERROR=true electron-forge start",
|
"start:test-error": "GOOSE_TEST_ERROR=true electron-forge start",
|
||||||
"package": "electron-forge package",
|
"package": "electron-forge package",
|
||||||
"make": "electron-forge make",
|
"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: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 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: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 && 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: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\"",
|
"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": "pnpm run generate-api && playwright test",
|
||||||
"test-e2e:dev": "npm run generate-api && playwright test --reporter=list --retries=0 --max-failures=1",
|
"test-e2e:dev": "pnpm run generate-api && playwright test --reporter=list --retries=0 --max-failures=1",
|
||||||
"test-e2e:ui": "npm run generate-api && playwright test --ui",
|
"test-e2e:ui": "pnpm run generate-api && playwright test --ui",
|
||||||
"test-e2e:debug": "npm run generate-api && playwright test --debug",
|
"test-e2e:debug": "pnpm run generate-api && playwright test --debug",
|
||||||
"test-e2e:report": "playwright show-report",
|
"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": "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": "prettier --write \"src/**/*.{ts,tsx,css,json}\"",
|
||||||
"format:check": "prettier --check \"src/**/*.{ts,tsx,css,json}\"",
|
"format:check": "prettier --check \"src/**/*.{ts,tsx,css,json}\"",
|
||||||
"test": "vitest",
|
"test": "vitest",
|
||||||
|
|
@ -39,10 +39,9 @@
|
||||||
"test:integration:watch": "vitest --config vitest.integration.config.ts",
|
"test:integration:watch": "vitest --config vitest.integration.config.ts",
|
||||||
"test:integration:debug": "DEBUG=1 vitest run --config vitest.integration.config.ts",
|
"test:integration:debug": "DEBUG=1 vitest run --config vitest.integration.config.ts",
|
||||||
"prepare": "husky",
|
"prepare": "husky",
|
||||||
"start-alpha-gui": "ALPHA=true npm run start-gui"
|
"start-alpha-gui": "ALPHA=true pnpm run start-gui"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"goose-acp-types": "file:../acp",
|
|
||||||
"@mcp-ui/client": "^6.1.0",
|
"@mcp-ui/client": "^6.1.0",
|
||||||
"@modelcontextprotocol/ext-apps": "^1.1.1",
|
"@modelcontextprotocol/ext-apps": "^1.1.1",
|
||||||
"@radix-ui/react-accordion": "^1.2.12",
|
"@radix-ui/react-accordion": "^1.2.12",
|
||||||
|
|
@ -56,7 +55,7 @@
|
||||||
"@radix-ui/react-slot": "^1.2.4",
|
"@radix-ui/react-slot": "^1.2.4",
|
||||||
"@radix-ui/react-tabs": "^1.1.13",
|
"@radix-ui/react-tabs": "^1.1.13",
|
||||||
"@radix-ui/themes": "^3.3.0",
|
"@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",
|
"@types/react-router-dom": "^5.3.3",
|
||||||
"class-variance-authority": "^0.7.1",
|
"class-variance-authority": "^0.7.1",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
|
|
@ -71,7 +70,8 @@
|
||||||
"electron-window-state": "^5.0.3",
|
"electron-window-state": "^5.0.3",
|
||||||
"express": "^5.2.1",
|
"express": "^5.2.1",
|
||||||
"framer-motion": "^12.34.3",
|
"framer-motion": "^12.34.3",
|
||||||
"katex": "0.16.33",
|
"goose-acp-types": "file:../acp",
|
||||||
|
"katex": "^0.16.33",
|
||||||
"lodash": "^4.17.23",
|
"lodash": "^4.17.23",
|
||||||
"lucide-react": "^0.575.0",
|
"lucide-react": "^0.575.0",
|
||||||
"qrcode.react": "^4.2.0",
|
"qrcode.react": "^4.2.0",
|
||||||
|
|
@ -110,7 +110,7 @@
|
||||||
"@electron/fuses": "^1.8.0",
|
"@electron/fuses": "^1.8.0",
|
||||||
"@electron/remote": "^2.1.3",
|
"@electron/remote": "^2.1.3",
|
||||||
"@eslint/js": "^9.39.2",
|
"@eslint/js": "^9.39.2",
|
||||||
"@hey-api/openapi-ts": "0.93.0",
|
"@hey-api/openapi-ts": "^0.93.0",
|
||||||
"@modelcontextprotocol/sdk": "^1.27.0",
|
"@modelcontextprotocol/sdk": "^1.27.0",
|
||||||
"@playwright/test": "^1.58.2",
|
"@playwright/test": "^1.58.2",
|
||||||
"@tailwindcss/line-clamp": "^0.4.4",
|
"@tailwindcss/line-clamp": "^0.4.4",
|
||||||
|
|
@ -152,13 +152,21 @@
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"overrides": {
|
"pnpm": {
|
||||||
"react": "^19.2.4",
|
"overrides": {
|
||||||
"react-dom": "^19.2.4"
|
"react": "^19.2.4",
|
||||||
|
"react-dom": "^19.2.4"
|
||||||
|
},
|
||||||
|
"onlyBuiltDependencies": [
|
||||||
|
"@modelcontextprotocol/ext-apps",
|
||||||
|
"electron",
|
||||||
|
"electron-winstaller",
|
||||||
|
"esbuild"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"src/**/*.{ts,tsx}": [
|
"src/**/*.{ts,tsx}": [
|
||||||
"bash -c 'npm run typecheck'",
|
"bash -c 'pnpm run typecheck'",
|
||||||
"eslint --fix --max-warnings 0 --no-warn-ignored",
|
"eslint --fix --max-warnings 0 --no-warn-ignored",
|
||||||
"prettier --write"
|
"prettier --write"
|
||||||
],
|
],
|
||||||
|
|
|
||||||
13733
ui/desktop/pnpm-lock.yaml
generated
Normal file
13733
ui/desktop/pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -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"
|
|
||||||
|
|
@ -42,7 +42,7 @@ export const test = base.extend<GooseTestFixtures>({
|
||||||
|
|
||||||
// Start the electron-forge process with Playwright remote debugging enabled
|
// Start the electron-forge process with Playwright remote debugging enabled
|
||||||
// Use detached mode on Unix to create a process group we can kill together
|
// 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, '../..'),
|
cwd: join(__dirname, '../..'),
|
||||||
stdio: 'pipe',
|
stdio: 'pipe',
|
||||||
detached: process.platform !== 'win32',
|
detached: process.platform !== 'win32',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue