Skip to content

Commit af13d14

Browse files
committed
feat(backend): add satellite_url field to team satellites endpoint
Add satellite_url to GET /api/teams/:teamId/satellites response to expose publicly accessible satellite URLs for both global and team-specific satellites.
1 parent 6ec441c commit af13d14

File tree

3 files changed

+35
-2
lines changed

3 files changed

+35
-2
lines changed

services/backend/api-spec.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13528,6 +13528,10 @@
1352813528
],
1352913529
"description": "Team ID (null for global satellites)"
1353013530
},
13531+
"satellite_url": {
13532+
"type": "string",
13533+
"description": "Publicly accessible satellite URL"
13534+
},
1353113535
"last_heartbeat": {
1353213536
"type": [
1353313537
"null",
@@ -13542,7 +13546,8 @@
1354213546
"satellite_type",
1354313547
"status",
1354413548
"capabilities",
13545-
"team_id"
13549+
"team_id",
13550+
"satellite_url"
1354613551
]
1354713552
},
1354813553
"description": "Array of available satellites (global and team-specific)"
@@ -34546,6 +34551,10 @@
3454634551
],
3454734552
"description": "Satellite capabilities"
3454834553
},
34554+
"satellite_url": {
34555+
"type": "string",
34556+
"description": "Publicly accessible satellite URL (optional - auto-detected if not provided)"
34557+
},
3454934558
"system_info": {
3455034559
"type": "object",
3455134560
"properties": {
@@ -35319,6 +35328,10 @@
3531935328
"version": {
3532035329
"type": "string",
3532135330
"description": "Satellite software version"
35331+
},
35332+
"satellite_url": {
35333+
"type": "string",
35334+
"description": "Publicly accessible satellite URL (optional - only sent on first heartbeat after startup)"
3532235335
}
3532335336
},
3532435337
"required": [

services/backend/api-spec.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9443,6 +9443,9 @@ paths:
94439443
- "null"
94449444
- string
94459445
description: Team ID (null for global satellites)
9446+
satellite_url:
9447+
type: string
9448+
description: Publicly accessible satellite URL
94469449
last_heartbeat:
94479450
type:
94489451
- "null"
@@ -9455,6 +9458,7 @@ paths:
94559458
- status
94569459
- capabilities
94579460
- team_id
9461+
- satellite_url
94589462
description: Array of available satellites (global and team-specific)
94599463
total_count:
94609464
type: number
@@ -24459,6 +24463,10 @@ paths:
2445924463
- http
2446024464
- sse
2446124465
description: Satellite capabilities
24466+
satellite_url:
24467+
type: string
24468+
description: Publicly accessible satellite URL (optional - auto-detected if not
24469+
provided)
2446224470
system_info:
2446324471
type: object
2446424472
properties:
@@ -24996,6 +25004,10 @@ paths:
2499625004
version:
2499725005
type: string
2499825006
description: Satellite software version
25007+
satellite_url:
25008+
type: string
25009+
description: Publicly accessible satellite URL (optional - only sent on first
25010+
heartbeat after startup)
2499925011
required:
2500025012
- status
2500125013
- system_metrics

services/backend/src/routes/teams/satellites.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,16 @@ const SATELLITE_SCHEMA = {
4848
type: ['string', 'null'],
4949
description: 'Team ID (null for global satellites)'
5050
},
51+
satellite_url: {
52+
type: 'string',
53+
description: 'Publicly accessible satellite URL'
54+
},
5155
last_heartbeat: {
5256
type: ['string', 'null'],
5357
description: 'ISO 8601 timestamp of last communication'
5458
}
5559
},
56-
required: ['id', 'name', 'satellite_type', 'status', 'capabilities', 'team_id']
60+
required: ['id', 'name', 'satellite_type', 'status', 'capabilities', 'team_id', 'satellite_url']
5761
} as const;
5862

5963
const SATELLITES_SUCCESS_RESPONSE_SCHEMA = {
@@ -111,6 +115,7 @@ interface Satellite {
111115
status: 'active';
112116
capabilities: string[];
113117
team_id: string | null;
118+
satellite_url: string;
114119
last_heartbeat: string | null;
115120
}
116121

@@ -136,6 +141,7 @@ interface SatelliteRecord {
136141
status: 'active' | 'inactive' | 'maintenance' | 'error';
137142
capabilities: string;
138143
team_id: string | null;
144+
satellite_url: string;
139145
last_heartbeat: Date | null;
140146
}
141147

@@ -201,6 +207,7 @@ export default async function getTeamSatellitesRoute(server: FastifyInstance) {
201207
status: satellites.status,
202208
capabilities: satellites.capabilities,
203209
team_id: satellites.team_id,
210+
satellite_url: satellites.satellite_url,
204211
last_heartbeat: satellites.last_heartbeat
205212
})
206213
.from(satellites)
@@ -244,6 +251,7 @@ export default async function getTeamSatellitesRoute(server: FastifyInstance) {
244251
status: 'active' as const,
245252
capabilities: capabilitiesArray,
246253
team_id: sat.team_id,
254+
satellite_url: sat.satellite_url,
247255
last_heartbeat: sat.last_heartbeat ? sat.last_heartbeat.toISOString() : null
248256
};
249257
});

0 commit comments

Comments
 (0)