Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions .github/workflows/build-and-push-tutorial-agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,9 @@ jobs:

echo "### 🔄 Rebuilding All Tutorial Agents" >> $GITHUB_STEP_SUMMARY
else
# Determine the base branch for comparison
if [ "${{ github.event_name }}" = "pull_request" ]; then
BASE_BRANCH="origin/${{ github.base_ref }}"
echo "Comparing against PR base branch: $BASE_BRANCH"
else
BASE_BRANCH="HEAD~1"
echo "Comparing against previous commit: $BASE_BRANCH"
fi
# Always compare against main branch
BASE_BRANCH="origin/main"
echo "Comparing against main branch: $BASE_BRANCH"

# Check each agent directory for changes
for agent_dir in $all_agents; do
Expand Down Expand Up @@ -107,6 +102,12 @@ jobs:
echo "agents=$agents_json" >> $GITHUB_OUTPUT
echo "has_agents=true" >> $GITHUB_OUTPUT

# Debug outputs
echo "DEBUG: Setting has_agents=true"
echo "DEBUG: agents_json=$agents_json"
echo "DEBUG: GITHUB_OUTPUT contents:"
cat $GITHUB_OUTPUT

echo "" >> $GITHUB_STEP_SUMMARY
for agent in "${agents_to_build[@]}"; do
echo "- \`$agent\`" >> $GITHUB_STEP_SUMMARY
Expand All @@ -126,6 +127,12 @@ jobs:

name: build-${{ matrix.agent_path }}
steps:
- name: Debug inputs from find-agents
run: |
echo "DEBUG: Received has_agents = '${{ needs.find-agents.outputs.has_agents }}'"
echo "DEBUG: Received agents = '${{ needs.find-agents.outputs.agents }}'"
echo "DEBUG: Current matrix agent = '${{ matrix.agent_path }}'"

- name: Checkout repository
uses: actions/checkout@v4

Expand Down Expand Up @@ -178,7 +185,7 @@ jobs:
echo "🚀 Building and pushing agent: ${{ matrix.agent_path }}"
else
SHOULD_PUSH=false
VERSION_TAG="${{ github.commit.sha }}"
VERSION_TAG="${{ github.sha }}"
echo "🔍 Validating build for agent: ${{ matrix.agent_path }}"
fi

Expand Down
1 change: 1 addition & 0 deletions examples/tutorials/00_sync/000_hello_acp/project/acp.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ async def handle_message_send(
) -> Union[TaskMessageContent, AsyncGenerator[TaskMessageUpdate, None]]:
"""Default message handler with streaming support"""
# Extract content safely from the message
logger.info("msg 2", params)
message_text = ""
if hasattr(params.content, "content"):
content_val = getattr(params.content, "content", "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,27 @@

# === DEBUG SETUP (AgentEx CLI Debug Support) ===
if os.getenv("AGENTEX_DEBUG_ENABLED") == "true":
print("test me")
try:
import debugpy

debug_port = int(os.getenv("AGENTEX_DEBUG_PORT", "5679"))
debug_type = os.getenv("AGENTEX_DEBUG_TYPE", "acp")
wait_for_attach = os.getenv("AGENTEX_DEBUG_WAIT_FOR_ATTACH", "false").lower() == "true"

# Configure debugpy
debugpy.configure(subProcess=False)
debugpy.listen(debug_port)

print(f"🐛 [{debug_type.upper()}] Debug server listening on port {debug_port}")

if wait_for_attach:
print(f"⏳ [{debug_type.upper()}] Waiting for debugger to attach...")
debugpy.wait_for_client()
print(f"✅ [{debug_type.upper()}] Debugger attached!")
else:
print(f"📡 [{debug_type.upper()}] Ready for debugger attachment")

except ImportError:
print("❌ debugpy not available. Install with: pip install debugpy")
sys.exit(1)
Expand Down Expand Up @@ -52,8 +54,8 @@
type="temporal",
temporal_address=os.getenv("TEMPORAL_ADDRESS", "localhost:7233"),
plugins=[OpenAIAgentsPlugin(model_provider=temporal_streaming_model_provider)],
interceptors=[context_interceptor]
)
interceptors=[context_interceptor],
),
)


Expand All @@ -69,4 +71,5 @@

# @acp.on_task_cancel
# This does not need to be handled by your workflow.
# It is automatically handled by the temporal client which cancels the workflow directly
# It is automatically handled by the temporal client which cancels the workflow directly

Loading