mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 01:03:49 +00:00
Fix tool call ID normalization for cross-provider switches to Anthropic/GitHub Copilot
This commit is contained in:
parent
3690137ecc
commit
3c60ffa677
6 changed files with 131 additions and 7 deletions
40
scripts/gh-build-docker.sh
Executable file
40
scripts/gh-build-docker.sh
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
echo "=== Versions ==="
|
||||
node --version
|
||||
bun --version
|
||||
npm --version
|
||||
|
||||
echo "=== Install dependencies ==="
|
||||
npm ci
|
||||
|
||||
echo "=== Install cross-platform bindings ==="
|
||||
npm install --no-save --force \
|
||||
@mariozechner/clipboard-darwin-arm64@0.3.0 \
|
||||
@mariozechner/clipboard-darwin-x64@0.3.0 \
|
||||
@mariozechner/clipboard-linux-x64-gnu@0.3.0 \
|
||||
@mariozechner/clipboard-linux-arm64-gnu@0.3.0 \
|
||||
@mariozechner/clipboard-win32-x64-msvc@0.3.0
|
||||
|
||||
npm install --no-save --force \
|
||||
@img/sharp-darwin-arm64@0.34.5 \
|
||||
@img/sharp-darwin-x64@0.34.5 \
|
||||
@img/sharp-linux-x64@0.34.5 \
|
||||
@img/sharp-linux-arm64@0.34.5 \
|
||||
@img/sharp-win32-x64@0.34.5 \
|
||||
@img/sharp-libvips-darwin-arm64@1.2.4 \
|
||||
@img/sharp-libvips-darwin-x64@1.2.4 \
|
||||
@img/sharp-libvips-linux-x64@1.2.4 \
|
||||
@img/sharp-libvips-linux-arm64@1.2.4
|
||||
|
||||
echo "=== Build all packages ==="
|
||||
npm run build
|
||||
|
||||
echo "=== Build darwin-arm64 binary ==="
|
||||
mkdir -p /repo/.tmp
|
||||
cd packages/coding-agent
|
||||
bun build --compile --target=bun-darwin-arm64 ./dist/cli.js --outfile /repo/.tmp/pi-darwin-arm64
|
||||
|
||||
echo "=== Done ==="
|
||||
ls -la /repo/.tmp/pi-darwin-arm64
|
||||
45
scripts/test-gh-build.sh
Normal file
45
scripts/test-gh-build.sh
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Simulate GH Actions build locally
|
||||
|
||||
cd /Users/badlogic/workspaces/pi-mono
|
||||
|
||||
echo "=== Cleaning node_modules ==="
|
||||
rm -rf node_modules packages/*/node_modules
|
||||
|
||||
echo "=== npm ci ==="
|
||||
npm ci
|
||||
|
||||
echo "=== Install cross-platform bindings (like GH Actions) ==="
|
||||
npm install --no-save --force \
|
||||
@mariozechner/clipboard-darwin-arm64@0.3.0 \
|
||||
@mariozechner/clipboard-darwin-x64@0.3.0 \
|
||||
@mariozechner/clipboard-linux-x64-gnu@0.3.0 \
|
||||
@mariozechner/clipboard-linux-arm64-gnu@0.3.0 \
|
||||
@mariozechner/clipboard-win32-x64-msvc@0.3.0
|
||||
|
||||
npm install --no-save --force \
|
||||
@img/sharp-darwin-arm64@0.34.5 \
|
||||
@img/sharp-darwin-x64@0.34.5 \
|
||||
@img/sharp-linux-x64@0.34.5 \
|
||||
@img/sharp-linux-arm64@0.34.5 \
|
||||
@img/sharp-win32-x64@0.34.5 \
|
||||
@img/sharp-libvips-darwin-arm64@1.2.4 \
|
||||
@img/sharp-libvips-darwin-x64@1.2.4 \
|
||||
@img/sharp-libvips-linux-x64@1.2.4 \
|
||||
@img/sharp-libvips-linux-arm64@1.2.4
|
||||
|
||||
echo "=== Build all packages ==="
|
||||
npm run build
|
||||
|
||||
echo "=== Build binary with cross-compile flag ==="
|
||||
cd packages/coding-agent
|
||||
bun build --compile --target=bun-darwin-arm64 ./dist/cli.js --outfile /tmp/pi-gh-sim/pi
|
||||
cp package.json /tmp/pi-gh-sim/
|
||||
|
||||
echo "=== Test the binary ==="
|
||||
/tmp/pi-gh-sim/pi -e /Users/badlogic/workspaces/pi-doom --help 2>&1 | head -5
|
||||
|
||||
echo "=== Binary size ==="
|
||||
ls -la /tmp/pi-gh-sim/pi
|
||||
Loading…
Add table
Add a link
Reference in a new issue