Update agent-router: Integrate apidog Services and Use Distributed Specs
Objective
Update agent-router to integrate migrated apidog services and load OpenAPI specs from distributed project locations instead of technical-guide.
Tasks
Integrate apidog Services
-
Add apidog service routes to main server -
Configure gRPC server for batch import -
Integrate OpenTelemetry tracing -
Integrate Prometheus metrics -
Add health checks for apidog endpoints -
Update OpenAPI spec with apidog endpoints
Update PlatformAPILoader
-
Load specs from npm package dependencies -
Read from `node_modules/@ossa/studio-ui/openapi/openapi.yaml` -
Read from `node_modules/@bluefly/agent-mesh/openapi/openapi.yaml` -
Alternatively: query services at `/openapi.json` endpoints -
Maintain backward compatibility during transition
Add Dependencies
-
Add `@bluefly/technical-guide` dependency -
Import design tokens from technical-guide -
Import API registry for service discovery -
Add npm dependencies for service packages
Update Configuration
-
Update `apidog-automation.sh` scripts → use new apidog service -
Update `scripts/apidog-automation.sh` to call new endpoints -
Remove references to old technical-guide/apidog-sync paths
Testing
-
Test apidog batch import functionality -
Test gRPC streaming -
Test spec loading from distributed locations -
Verify all 15+ microservices still route correctly -
Contract tests against new OpenAPI aggregation
Usage Example
```typescript // Import from technical-guide import { colors, typography } from '@bluefly/technical-guide/tokens'; import { getAPIRegistry } from '@bluefly/technical-guide/registry';
// Use in configuration const registry = await getAPIRegistry(); for (const api of registry.apis) { loadSpec(api.package, api.specPath); } ```
Related
- Epic: #1
- Depends on: #2 (apidog migration), #4 (decentralized specs), #8 (npm package)
- Next: #10 (update studio-ui)
Files to Update
- `src/api/servers/production-gateway-server.ts`
- `src/api/servers/platform-gateway-server.ts`
- `src/services/platform-api-loader.ts`
- `package.json` (add dependencies)
- `openapi/openapi.yaml` (add apidog endpoints)