Skip to content
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,4 @@ dmypy.json
*.bak
*.swp

.DS_Store
51 changes: 51 additions & 0 deletions mcp-agents/mcp-booking-main/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Google Maps API Configuration
# Get your API key from: https://console.cloud.google.com/
# Required APIs: Places API, Places API (New), Geocoding API
GOOGLE_MAPS_API_KEY=your_google_maps_api_key_here

# Yelp Fusion API (optional) — adds Yelp profile + menu links on search results
# Create an app + API key: https://docs.developer.yelp.com/docs/fusion-intro
YELP_API_KEY=

# Default Search Location (Taiwan)
# These coordinates will be used when latitude/longitude are not specified
DEFAULT_LATITUDE=xx
DEFAULT_LONGITUDE=xx

# Optional: Server Configuration
PORT=3000
# NODE_ENV=development

# Optional: Set log level (debug, info, warn, error)
LOG_LEVEL=info

# Optional: Default search radius in meters (default: 20000 = 20km)
DEFAULT_SEARCH_RADIUS=2000

# Restaurant recommendation agent (npm run agent)
AGENT_DEFAULT_PLACE=xx
AGENT_LOCALE=en
MCP_SERVER_URL=xx

# Fetch.ai uAgent wrapper (python src/fetch_uagent.py)
FETCH_UAGENT_NAME=restaurant_recommendation_uagent
FETCH_UAGENT_PORT=8000
FETCH_UAGENT_SEED=replace-this-with-your-own-strong-seed-phrase-please
FETCH_UAGENT_MAILBOX=true
# Optional public endpoint if self-hosting with a domain/IP
# FETCH_UAGENT_ENDPOINT=https://your-public-endpoint.example

# Agent Payment Protocol + Stripe (after FREE_REQUEST_LIMIT successful chat requests)
# PAYWALL_SCOPE: global = one counter for all chats (fixes Agentverse changing sender per message).
# sender = count per uAgent `sender` (stricter multi-user).
PAYWALL_SCOPE=global
FREE_REQUEST_LIMIT=3
STRIPE_SECRET_KEY=
STRIPE_PUBLISHABLE_KEY=
STRIPE_AMOUNT_CENTS=50
STRIPE_CURRENCY=usd
STRIPE_PRODUCT_NAME=Restaurant discovery
STRIPE_SUCCESS_URL=https://agentverse.ai
# Paywall uses hosted Checkout first (clickable link in chat), then embedded as fallback.
# Stripe Checkout API ui_mode for embedded fallback (default embedded_page)
# STRIPE_API_UI_MODE=embedded_page
57 changes: 57 additions & 0 deletions mcp-agents/mcp-booking-main/.github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
name: Bug report
about: Create a report to help us improve
title: '[BUG] '
labels: 'bug'
assignees: ''
---

## 🐛 Bug Description
A clear and concise description of what the bug is.

## 🔄 To Reproduce
Steps to reproduce the behavior:
1. Call API endpoint '...'
2. With parameters '....'
3. See error

## ✅ Expected Behavior
A clear and concise description of what you expected to happen.

## 🖼️ Screenshots
If applicable, add screenshots to help explain your problem.

## 🌐 Environment
- Node.js version: [e.g. 18.17.0]
- npm version: [e.g. 9.6.7]
- Operating System: [e.g. macOS 13.4]
- MCP Booking version: [e.g. 1.0.0]

## 📋 API Request Details (if applicable)
```json
{
"searchParams": {
"location": { "latitude": 25.033, "longitude": 121.5654 },
"cuisineTypes": ["Italian"],
"mood": "romantic",
"event": "dating"
}
}
```

## 📊 Performance Impact
- [ ] Performance regression
- [ ] Memory leak
- [ ] Increased API calls
- [ ] Timeout issues
- [ ] Other: ___________

## 🔗 Additional Context
Add any other context about the problem here.

## 🧪 Test Case
If possible, provide a minimal test case that reproduces the issue.

```typescript
// Test case code here
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
name: Feature request
about: Suggest an idea for this project
title: '[FEATURE] '
labels: 'enhancement'
assignees: ''
---

## 🚀 Feature Request

### 📝 Summary
A clear and concise description of what the feature is.

### 🎯 Motivation
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when...

### 💡 Proposed Solution
**Describe the solution you'd like**
A clear and concise description of what you want to happen.

### 🔄 Alternatives Considered
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

### 📊 Impact Assessment
- [ ] Performance improvement
- [ ] New API functionality
- [ ] UI/UX enhancement
- [ ] Developer experience improvement
- [ ] Integration with external services

### 🏗️ Implementation Ideas
If you have ideas on how this could be implemented, please share them here.

```typescript
// Pseudo-code or API design ideas
```

### 📋 Acceptance Criteria
- [ ] Criteria 1
- [ ] Criteria 2
- [ ] Criteria 3

### 🧪 Testing Requirements
How should this feature be tested?

### 📚 Documentation Requirements
What documentation needs to be updated or created?

### 🔗 Additional Context
Add any other context or screenshots about the feature request here.
11 changes: 11 additions & 0 deletions mcp-agents/mcp-booking-main/.github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
46 changes: 46 additions & 0 deletions mcp-agents/mcp-booking-main/.github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
## 📋 Pull Request Description

### What does this PR do?
<!-- Brief description of the changes -->

### Type of Change
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] 📚 Documentation update
- [ ] 🔧 Refactoring (no functional changes)
- [ ] ⚡ Performance improvement
- [ ] 🧪 Test coverage improvement

### 🧪 Testing
- [ ] Tests pass locally
- [ ] New tests added for new functionality
- [ ] Performance tests pass
- [ ] Integration tests pass

### 📈 Performance Impact
<!-- If applicable, describe any performance implications -->
- [ ] No performance impact
- [ ] Performance improvement
- [ ] Potential performance regression (explained below)

### 🔗 Related Issues
<!-- Link to related issues -->
Fixes #(issue_number)

### 📷 Screenshots/Videos
<!-- If applicable, add screenshots or videos -->

### 🧬 Additional Context
<!-- Add any other context about the pull request here -->

---

### ✅ Pre-flight Checklist
- [ ] Code follows the existing style guidelines
- [ ] Self-review of the code has been performed
- [ ] Code has been commented, particularly in hard-to-understand areas
- [ ] Corresponding changes to documentation have been made
- [ ] Changes generate no new warnings
- [ ] New and existing unit tests pass locally
- [ ] Any dependent changes have been merged and published
107 changes: 107 additions & 0 deletions mcp-agents/mcp-booking-main/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: CI Pipeline

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]

jobs:
test:
name: Test Suite
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run linter
run: npm run lint

- name: Run type check
run: npm run build

- name: Run tests
run: npm test
env:
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY_TEST }}

- name: Run tests with coverage
run: npm run test:coverage
env:
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY_TEST }}

- name: Upload coverage reports
uses: codecov/codecov-action@v3
with:
file: ./coverage/lcov.info
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false

build:
name: Build Check
runs-on: ubuntu-latest
needs: test

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build project
run: npm run build

- name: Check build artifacts
run: |
if [ ! -d "dist" ]; then
echo "Build failed - dist directory not created"
exit 1
fi
echo "Build successful - artifacts created"
ls -la dist/

security:
name: Security Audit
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run security audit
run: npm audit --audit-level=high

- name: Check for known vulnerabilities
run: npx audit-ci --config ./audit-ci.json
continue-on-error: true
Loading
Loading