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
28 changes: 10 additions & 18 deletions .github/workflows/use-visitor-counter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,38 +57,30 @@ jobs:
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"

# Commit and push logic for PR events (merge, not rebase)
- name: Commit and push changes (PR)
if: github.event_name == 'pull_request'
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git fetch origin
git checkout -b ${{ github.event.pull_request.head.ref }} origin/${{ github.event.pull_request.head.ref }}
git add "*.md" metrics.json
git checkout ${{ github.head_ref }}
git pull origin ${{ github.head_ref }} || echo "No merge needed"
git add -A
git commit -m "Update visitor count" || echo "No changes to commit"
git remote set-url origin https://x-access-token:${TOKEN}@github.com/${{ github.repository }}
git pull --rebase origin ${{ github.event.pull_request.head.ref }} || echo "No rebase needed"
git push origin HEAD:${{ github.event.pull_request.head.ref }}
git push origin HEAD:${{ github.head_ref }}

# Commit and push logic for non-PR events (merge, not rebase)
- name: Commit and push changes (non-PR)
if: github.event_name != 'pull_request'
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git fetch origin
git checkout ${{ github.event.pull_request.head.ref }} || git checkout -b ${{ github.event.pull_request.head.ref }} origin/${{ github.event.pull_request.head.ref }}
git add "*.md" metrics.json
git checkout ${{ github.ref_name }} || git checkout -b ${{ github.ref_name }} origin/${{ github.ref_name }}
git pull origin ${{ github.ref_name }} || echo "No merge needed"
git add -A
git commit -m "Update visitor count" || echo "No changes to commit"
git remote set-url origin https://x-access-token:${TOKEN}@github.com/${{ github.repository }}
git pull --rebase origin ${{ github.event.pull_request.head.ref }} || echo "No rebase needed"
git push origin HEAD:${{ github.event.pull_request.head.ref }}

- name: Create Pull Request (non-PR)
if: github.event_name != 'pull_request'
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update-visitor-count
title: "Update visitor count"
body: "Automated update of visitor count"
base: main
git push origin HEAD:${{ github.ref_name }}
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Costa Rica
[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/)
[brown9804](https://github.com/brown9804)

Last updated: 2026-01-12
Last updated: 2026-01-29

----------

Expand Down Expand Up @@ -153,7 +153,7 @@ graph TD
- Configures delegation relationships between Product Manager and specialized agents.
- Saves the unique Agent IDs, delegation endpoints, and A2A configuration to the `.env` file.

> E.g `Old UI`
> E.g `Classic UI`

<img width="1881" height="1000" alt="image" src="https://github.com/user-attachments/assets/59a9dcaf-9291-403c-b8b0-1195c1375aac" />

Expand All @@ -171,7 +171,7 @@ graph TD
- Visit `https://<your-app-name>.azurewebsites.net`.
- You should see the Zava chat interface with A2A protocol support.

> E.g `Old UI`
> E.g `Classic UI`

<https://github.com/user-attachments/assets/a1139528-6b37-4ac2-a1cb-771788ff45a4>

Expand All @@ -187,7 +187,7 @@ graph TD
- Core agents: Cora, Interior Design, Inventory, Loyalty, Cart Manager
- Product Management Specialist with delegation capabilities

> E.g `Old UI`
> E.g `Classic UI`

<https://github.com/user-attachments/assets/3c562ccd-cff3-4a30-b9f8-44111fb71113>

Expand All @@ -202,7 +202,7 @@ graph TD

<!-- START BADGE -->
<div align="center">
<img src="https://img.shields.io/badge/Total%20views-1324-limegreen" alt="Total views">
<p>Refresh Date: 2026-01-12</p>
<img src="https://img.shields.io/badge/Total%20views-1329-limegreen" alt="Total views">
<p>Refresh Date: 2026-01-29</p>
</div>
<!-- END BADGE -->
4 changes: 2 additions & 2 deletions TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ terraform apply

<!-- START BADGE -->
<div align="center">
<img src="https://img.shields.io/badge/Total%20views-1324-limegreen" alt="Total views">
<p>Refresh Date: 2026-01-12</p>
<img src="https://img.shields.io/badge/Total%20views-1329-limegreen" alt="Total views">
<p>Refresh Date: 2026-01-29</p>
</div>
<!-- END BADGE -->
2 changes: 1 addition & 1 deletion src/a2a/status_automation.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if () {

# Check automation endpoint
try {
= Invoke-RestMethod -Uri "https://zava-4f64ebdc-app.azurewebsites.net/a2a/automation/status" -TimeoutSec 5
= Invoke-RestMethod -Uri "https://zava-63f59c9f-app.azurewebsites.net/a2a/automation/status" -TimeoutSec 5
Write-Host "Automation Status: "
} catch {
Write-Host "Automation endpoint not accessible"
Expand Down
30 changes: 26 additions & 4 deletions src/app/agents/agent_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
try:
from azure.ai.projects import AIProjectClient # type: ignore
from azure.identity import DefaultAzureCredential # type: ignore
from services.azure_auth import get_default_credential, get_inference_credential # type: ignore
_REMOTE_AVAILABLE = True
except Exception:
_REMOTE_AVAILABLE = False
Expand Down Expand Up @@ -112,11 +113,32 @@ def __init__(self, agent_id: str, project_endpoint: str = None):
project_endpoint: Optional project endpoint (reads from env if not provided)
"""
self.agent_id = agent_id
self.project_endpoint = project_endpoint or os.environ.get("AZURE_AI_AGENT_ENDPOINT")

if not self.project_endpoint or not _REMOTE_AVAILABLE:

raw_endpoint = (
project_endpoint
or os.environ.get("AZURE_AI_AGENT_ENDPOINT")
or os.environ.get("AZURE_AI_PROJECT_ENDPOINT")
or os.environ.get("AZURE_AI_FOUNDRY_ENDPOINT")
)
if not raw_endpoint or not _REMOTE_AVAILABLE:
raise ValueError("Remote agent support unavailable (endpoint or SDK missing)")
self.client = AIProjectClient(endpoint=self.project_endpoint, credential=DefaultAzureCredential())

# The Azure AI Projects SDK expects: https://<hub>.services.ai.azure.com/api/projects/<project>
project_name = os.environ.get("AZURE_AI_PROJECT_NAME")
normalized = raw_endpoint.replace("cognitiveservices.azure.com", "services.ai.azure.com")

if "/api/projects/" in normalized:
# Already a full project endpoint
full_project_endpoint = normalized.rstrip("/")
elif project_name:
base_endpoint = normalized.split("/api/")[0].rstrip("/")
full_project_endpoint = f"{base_endpoint}/api/projects/{project_name}"
else:
# Best-effort fallback (may still work if the caller provided a full endpoint)
full_project_endpoint = normalized.rstrip("/")

self.project_endpoint = full_project_endpoint
self.client = AIProjectClient(endpoint=self.project_endpoint, credential=get_default_credential())

def run_conversation_with_text_stream(
self,
Expand Down
Loading