Skip to content

Commit e09b4fa

Browse files
authored
Merge pull request #980 from openabdev/fix/agy-acp-db-format
fix(agy-acp): support .db conversation format (agy v1.0.4)
2 parents 33288ba + 7135a16 commit e09b4fa

7 files changed

Lines changed: 939 additions & 294 deletions

File tree

.github/workflows/ci-agy-acp.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: "CI: agy-acp"
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "agy-acp/**"
7+
workflow_dispatch:
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
ci:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v6
17+
18+
- name: Install Rust
19+
uses: dtolnay/rust-toolchain@stable
20+
21+
- name: Cache cargo
22+
uses: actions/cache@v4
23+
with:
24+
path: |
25+
~/.cargo/registry
26+
~/.cargo/git
27+
agy-acp/target
28+
key: agy-acp-${{ runner.os }}-${{ hashFiles('agy-acp/Cargo.lock') }}
29+
30+
- name: Build
31+
working-directory: agy-acp
32+
run: cargo build --release
33+
34+
- name: Run tests
35+
working-directory: agy-acp
36+
run: cargo test -- --include-ignored --skip e2e

.github/workflows/docker-smoke-test.yml

Lines changed: 3 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,7 @@ on:
88
- 'Cargo.*'
99

1010
jobs:
11-
build-binary:
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@v6
15-
16-
- name: Build openab binary (once)
17-
run: |
18-
mkdir -p .binaries
19-
DOCKER_BUILDKIT=1 docker build --target builder -t openab-builder -f Dockerfile .
20-
CID=$(docker create openab-builder)
21-
docker cp "$CID:/build/target/release/openab" .binaries/openab
22-
docker rm "$CID"
23-
24-
- name: Build agy-acp adapter (for Dockerfile.antigravity)
25-
run: |
26-
if [ -f Dockerfile.antigravity ]; then
27-
DOCKER_BUILDKIT=1 docker build --target adapter-builder -t agy-acp-builder -f Dockerfile.antigravity .
28-
CID=$(docker create agy-acp-builder)
29-
docker cp "$CID:/build/target/release/agy-acp" .binaries/agy-acp
30-
docker rm "$CID"
31-
fi
32-
33-
- name: Upload binaries
34-
uses: actions/upload-artifact@v4
35-
with:
36-
name: openab-binary
37-
path: .binaries/
38-
retention-days: 1
39-
4011
smoke-test:
41-
needs: build-binary
4212
strategy:
4313
fail-fast: false
4414
matrix:
@@ -59,39 +29,8 @@ jobs:
5929
steps:
6030
- uses: actions/checkout@v6
6131

62-
- name: Download pre-built binary
63-
uses: actions/download-artifact@v4
64-
with:
65-
name: openab-binary
66-
path: .pre-built
67-
68-
- name: Build image (skip Rust compilation)
69-
run: |
70-
chmod +x .pre-built/*
71-
DF="${{ matrix.variant.dockerfile }}"
72-
73-
if grep -q "FROM rust" "$DF"; then
74-
# Create fake builder context with pre-built binary at the expected path
75-
mkdir -p .fake-builder/build/target/release
76-
cp .pre-built/openab .fake-builder/build/target/release/openab
77-
78-
BUILD_CONTEXTS="--build-context builder=.fake-builder"
79-
80-
# Handle additional named Rust stages (e.g. adapter-builder)
81-
grep -i '^FROM rust' "$DF" | sed -n 's/.*AS \([a-zA-Z0-9_-]*\).*/\1/p' | grep -v '^builder$' | while read stage; do
82-
mkdir -p ".fake-${stage}/build/target/release"
83-
cp .pre-built/* ".fake-${stage}/build/target/release/"
84-
echo "--build-context ${stage}=.fake-${stage}"
85-
done > /tmp/extra-contexts.txt
86-
87-
if [ -s /tmp/extra-contexts.txt ]; then
88-
BUILD_CONTEXTS="$BUILD_CONTEXTS $(cat /tmp/extra-contexts.txt | tr '\n' ' ')"
89-
fi
90-
91-
docker buildx build $BUILD_CONTEXTS -t openab-test${{ matrix.variant.suffix }} -f "$DF" .
92-
else
93-
docker buildx build -t openab-test${{ matrix.variant.suffix }} -f "$DF" .
94-
fi
32+
- name: Build image
33+
run: docker build -t openab-test${{ matrix.variant.suffix }} -f ${{ matrix.variant.dockerfile }} .
9534

9635
- name: Verify openab CMD does not crash
9736
run: |
@@ -109,6 +48,7 @@ jobs:
10948
run: |
11049
INIT='{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","clientCapabilities":{},"clientInfo":{"name":"ci-test","version":"0.0.1"}}}'
11150
51+
# Start agent in background, send init, capture output with timeout
11252
CID=$(docker run -d -i --entrypoint sh openab-test${{ matrix.variant.suffix }} -c 'exec ${{ matrix.variant.agent }} ${{ matrix.variant.agent_args }} 2>/dev/null')
11353
echo "$INIT" | docker attach --no-stdin=false "$CID" &
11454
sleep 5

Dockerfile.antigravity

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ RUN touch src/main.rs && cargo build --release
1818
FROM debian:bookworm-slim
1919
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl procps tini unzip && rm -rf /var/lib/apt/lists/*
2020

21-
# Install agy (Google Antigravity CLI)
21+
# Install agy (Google Antigravity CLI) — pinned to v1.0.4
22+
ENV AGY_VERSION=1.0.4
2223
RUN ARCH=$(dpkg --print-architecture) && \
2324
case "$ARCH" in \
24-
amd64) PLATFORM="linux_amd64" ;; \
25-
arm64) PLATFORM="linux_arm64" ;; \
25+
amd64) ASSET="agy_cli_linux_x64.tar.gz" ;; \
26+
arm64) ASSET="agy_cli_linux_arm64.tar.gz" ;; \
2627
*) echo "unsupported arch: $ARCH" && exit 1 ;; \
2728
esac && \
28-
MANIFEST_URL="https://antigravity-cli-auto-updater-974169037036.us-central1.run.app/manifests/${PLATFORM}.json" && \
29-
DOWNLOAD_URL=$(curl -fsSL "$MANIFEST_URL" | grep -o '"url": *"[^"]*"' | cut -d'"' -f4) && \
30-
curl -fsSL "$DOWNLOAD_URL" | tar -xz -C /usr/local/bin && \
29+
curl -fsSL "https://github.com/google-antigravity/antigravity-cli/releases/download/${AGY_VERSION}/${ASSET}" \
30+
| tar -xz -C /usr/local/bin && \
3131
mv /usr/local/bin/antigravity /usr/local/bin/agy && \
3232
chmod +x /usr/local/bin/agy
3333

0 commit comments

Comments
 (0)