Skip to content

Commit 684cd84

Browse files
author
Security Level 5
committed
Initial commit
0 parents  commit 684cd84

36 files changed

Lines changed: 7353 additions & 0 deletions

.cargo/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[env]
2+
SQLX_OFFLINE = "true"

.dockerignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/.git
2+
/.cursor
3+
/target
4+
/certs
5+
/agent_gateway_demo
6+
/logs.txt
7+
/*.log
8+
/*.jsonl

.env.example

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Copy to .env and fill in your values. Never commit the real .env.
2+
ANTHROPIC_API_KEY=sk-ant-your-key-here
3+
4+
# Optional: override default ports if they conflict
5+
# GATEWAY_PORT=8443
6+
# DEMO_ADMIN_PORT=8000
7+
# DASHBOARD_PORT=3000

.github/workflows/gateway.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Gateway
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
tags:
9+
- "v*"
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
packages: write
15+
16+
env:
17+
CARGO_TERM_COLOR: always
18+
REGISTRY: ghcr.io
19+
IMAGE_NAME: ${{ github.repository }}
20+
21+
jobs:
22+
test:
23+
runs-on: ubuntu-latest
24+
services:
25+
postgres:
26+
image: postgres:16
27+
env:
28+
POSTGRES_DB: agent_gateway_test
29+
POSTGRES_USER: agent_gateway_admin
30+
POSTGRES_PASSWORD: agent_gateway_dev
31+
ports:
32+
- 5432:5432
33+
options: >-
34+
--health-cmd "pg_isready -U agent_gateway_admin -d agent_gateway_test"
35+
--health-interval 5s
36+
--health-timeout 5s
37+
--health-retries 12
38+
env:
39+
TEST_DATABASE_URL: postgres://agent_gateway_admin:agent_gateway_dev@localhost:5432/agent_gateway_test
40+
SQLX_OFFLINE: true
41+
steps:
42+
- uses: actions/checkout@v5
43+
- uses: dtolnay/rust-toolchain@stable
44+
- uses: Swatinem/rust-cache@v2
45+
- run: cargo install sqlx-cli --version 0.8.6 --locked --no-default-features --features postgres
46+
- run: SQLX_OFFLINE=false DATABASE_URL="$TEST_DATABASE_URL" cargo sqlx database setup
47+
- run: SQLX_OFFLINE=false DATABASE_URL="$TEST_DATABASE_URL" cargo sqlx prepare --check -- --all-targets --locked
48+
- run: cargo clippy --locked --all-targets
49+
- run: cargo test --locked
50+
51+
image:
52+
runs-on: ubuntu-latest
53+
needs: test
54+
if: github.event_name != 'pull_request'
55+
steps:
56+
- uses: actions/checkout@v5
57+
- uses: docker/setup-buildx-action@v3
58+
- uses: docker/login-action@v3
59+
with:
60+
registry: ${{ env.REGISTRY }}
61+
username: ${{ github.actor }}
62+
password: ${{ secrets.GITHUB_TOKEN }}
63+
- id: meta
64+
uses: docker/metadata-action@v5
65+
with:
66+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
67+
tags: |
68+
type=ref,event=branch
69+
type=ref,event=tag
70+
type=sha
71+
- uses: docker/build-push-action@v6
72+
with:
73+
context: .
74+
push: true
75+
tags: ${{ steps.meta.outputs.tags }}
76+
labels: ${{ steps.meta.outputs.labels }}

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/target
2+
.cursor/
3+
__pycache__/
4+
5+
# Local secrets / environment
6+
.env
7+
.env.*
8+
!.env.example

.sqlx/query-2e5bfa8b38514ea1eb638c158622d5345cb1bcd943017773493f3ce555c09710.json

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-3535f76a2186e39edf59d8e40879b7f4ac530e3a18295b3b32a9da7c7b65b7c8.json

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-3e49d130c02ac882e0c36f80b8258fb7beba42c39921be0287db22b4a79a0b46.json

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-47cff29e5dcfc88d719d162f656cbf02672645bc5c2565b39d8949e2a2212909.json

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.sqlx/query-5ec9ac85b3956ecac884f312e7a8f21540c6f986aec6c6cc0f4b7ff53ffcc68a.json

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)