Files
kandev/apps/backend/dockerfiles/augment-agent/agent.sh
T
jcfs 20f5f43fb3 feat: complete acp-go-sdk integration with task state updates
- Use acp-go-sdk for all ACP communication in agentctl
- Mark agent as completed when Prompt() returns successfully
- Update task state to COMPLETED when agent completes
- Update task state to FAILED when agent fails and retries exhausted
- Enhanced E2E test to verify agent actually creates files
- E2E test now validates full flow: task creation -> agent work -> file creation -> task completion
2026-01-10 16:46:35 +00:00

32 lines
915 B
Bash

#!/bin/bash
# Augment Agent - Runs in ACP (Agent Client Protocol) mode
# Uses JSON-RPC 2.0 over stdin/stdout for bidirectional communication
set -e
# Check if auggie is available
if ! command -v auggie &> /dev/null; then
echo '{"jsonrpc":"2.0","method":"error","params":{"message":"Auggie CLI not found"}}' >&2
exit 1
fi
# Check for authentication
if [ -z "$AUGMENT_SESSION_AUTH" ]; then
echo '{"jsonrpc":"2.0","method":"error","params":{"message":"AUGMENT_SESSION_AUTH required"}}' >&2
exit 1
fi
# Export for auggie to use
export AUGMENT_SESSION_AUTH
# Build auggie command
AUGGIE_ARGS="--acp"
# Add workspace root if we're in a workspace with files
if [ -d "/workspace" ] && [ "$(ls -A /workspace 2>/dev/null)" ]; then
AUGGIE_ARGS="$AUGGIE_ARGS --workspace-root /workspace"
fi
# Execute auggie in ACP mode - stdin/stdout will be used for JSON-RPC communication
exec auggie $AUGGIE_ARGS