opencode-swarm-plugin 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,45 +0,0 @@
1
- # Docker Compose for opencode-swarm-plugin integration tests
2
- # Services: agent-mail (FastAPI) + test-runner (Bun)
3
-
4
- services:
5
- agent-mail:
6
- build:
7
- context: ./docker/agent-mail
8
- dockerfile: Dockerfile
9
- ports:
10
- - "8765:8765"
11
- environment:
12
- - AGENT_MAIL_HOST=0.0.0.0
13
- - AGENT_MAIL_PORT=8765
14
- healthcheck:
15
- test: ["CMD", "curl", "-f", "http://localhost:8765/health/liveness"]
16
- interval: 5s
17
- timeout: 3s
18
- retries: 10
19
- start_period: 5s
20
- networks:
21
- - test-network
22
-
23
- test-runner:
24
- build:
25
- context: .
26
- dockerfile: Dockerfile
27
- depends_on:
28
- agent-mail:
29
- condition: service_healthy
30
- environment:
31
- - AGENT_MAIL_URL=http://agent-mail:8765
32
- - GIT_AUTHOR_NAME=Test Runner
33
- - GIT_AUTHOR_EMAIL=test@example.com
34
- - GIT_COMMITTER_NAME=Test Runner
35
- - GIT_COMMITTER_EMAIL=test@example.com
36
- volumes:
37
- # Mount source for faster iteration (optional - comment out for clean builds)
38
- - ./src:/app/src:ro
39
- - ./tests:/app/tests:ro
40
- networks:
41
- - test-network
42
-
43
- networks:
44
- test-network:
45
- driver: bridge
@@ -1,54 +0,0 @@
1
- #!/bin/bash
2
- set -e
3
-
4
- # Colors for output
5
- RED='\033[0;31m'
6
- GREEN='\033[0;32m'
7
- YELLOW='\033[1;33m'
8
- NC='\033[0m' # No Color
9
-
10
- log() { echo -e "${GREEN}[entrypoint]${NC} $1"; }
11
- warn() { echo -e "${YELLOW}[entrypoint]${NC} $1"; }
12
- error() { echo -e "${RED}[entrypoint]${NC} $1"; }
13
-
14
- # Initialize git repo if not present (beads requires git)
15
- if [ ! -d ".git" ]; then
16
- log "Initializing git repository..."
17
- git init
18
- git config user.email "test@example.com"
19
- git config user.name "Test Runner"
20
- git add -A
21
- git commit -m "Initial commit for test environment" --allow-empty
22
- fi
23
-
24
- # Initialize beads if not present
25
- if [ ! -d ".beads" ]; then
26
- log "Initializing beads..."
27
- bd init --name "test-project" || warn "beads init failed (may already exist)"
28
- fi
29
-
30
- # Wait for agent-mail to be healthy
31
- AGENT_MAIL_URL="${AGENT_MAIL_URL:-http://agent-mail:8765}"
32
- MAX_RETRIES=30
33
- RETRY_COUNT=0
34
-
35
- log "Waiting for agent-mail at ${AGENT_MAIL_URL}..."
36
-
37
- while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do
38
- if curl -sf "${AGENT_MAIL_URL}/health/liveness" > /dev/null 2>&1; then
39
- log "agent-mail is healthy!"
40
- break
41
- fi
42
- RETRY_COUNT=$((RETRY_COUNT + 1))
43
- if [ $RETRY_COUNT -eq $MAX_RETRIES ]; then
44
- error "agent-mail failed to become healthy after ${MAX_RETRIES} attempts"
45
- exit 1
46
- fi
47
- warn "Waiting for agent-mail... (attempt ${RETRY_COUNT}/${MAX_RETRIES})"
48
- sleep 1
49
- done
50
-
51
- log "Starting integration tests..."
52
-
53
- # Execute the command passed to the container
54
- exec "$@"