Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

refactor(external-rest-api): r2-l4 drop duplicate discovery response type

Josué9f0aa0845e26
diff --git a/external-rest-api/package-lock.json b/external-rest-api/package-lock.json
index 8871fc8a4..9b5ee500c 100644
--- a/external-rest-api/package-lock.json
+++ b/external-rest-api/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-external-rest-api",
- "version": "0.1.87",
+ "version": "0.1.88",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-external-rest-api",
- "version": "0.1.87",
+ "version": "0.1.88",
"dependencies": {
"cors": "^2.8.5",
"express": "^4.21.2",
diff --git a/external-rest-api/package.json b/external-rest-api/package.json
index af99d812a..6215a84d3 100644
--- a/external-rest-api/package.json
+++ b/external-rest-api/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-external-rest-api",
- "version": "0.1.87",
+ "version": "0.1.88",
"description": "External REST API for profile, team management, and RPC token brokerage",
"main": "dist/main.js",
"engines": {
diff --git a/external-rest-api/src/releaseManifest.ts b/external-rest-api/src/releaseManifest.ts
index 2ffe044d3..aaff4d1de 100644
--- a/external-rest-api/src/releaseManifest.ts
+++ b/external-rest-api/src/releaseManifest.ts
@@ -8,7 +8,7 @@ export type ReleaseManifest = {
export const releaseManifest: ReleaseManifest = {
releaseId: 'v0.10.0',
- externalRestApiVersion: '0.1.87',
+ externalRestApiVersion: '0.1.88',
rpcProxyVersion: '0.1.94',
desktopVersion: '0.10.0',
minimumDesktopVersion: '0.1.252',
diff --git a/external-rest-api/src/routes/desktop.ts b/external-rest-api/src/routes/desktop.ts
index 3361a8a6a..60024f0c0 100644
--- a/external-rest-api/src/routes/desktop.ts
+++ b/external-rest-api/src/routes/desktop.ts
@@ -2,7 +2,6 @@ import { Router } from 'express'
import { config } from '../config.js'
import { requireAuth } from '../middleware/auth.js'
import { releaseManifest } from '../releaseManifest.js'
-import { buildDesktopEnvironmentResponse } from './desktopEnvironmentResponse.js'
export function createDesktopRouter(): Router {
const router = Router()
@@ -10,13 +9,11 @@ export function createDesktopRouter(): Router {
// Public discovery only: returns non-secret tenant URLs so setup can resolve
// the RPC proxy after the user confirms the External REST API host.
router.get('/desktop/environment', (_req, res) => {
- res.status(200).json(
- buildDesktopEnvironmentResponse({
- desktopAppName: config.desktopAppName,
- publicBaseUrl: config.publicBaseUrl,
- desktopRpcProxyBaseUrl: config.desktopRpcProxyBaseUrl,
- })
- )
+ res.status(200).json({
+ appName: config.desktopAppName,
+ externalRestApiBaseUrl: config.publicBaseUrl,
+ rpcProxyBaseUrl: config.desktopRpcProxyBaseUrl,
+ })
})
router.get('/desktop/release', requireAuth, (_req, res) => {
diff --git a/external-rest-api/src/routes/desktopEnvironmentResponse.ts b/external-rest-api/src/routes/desktopEnvironmentResponse.ts
deleted file mode 100644
index 6730ec091..000000000
--- a/external-rest-api/src/routes/desktopEnvironmentResponse.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-export type DesktopEnvironmentConfig = {
- desktopAppName: string
- publicBaseUrl: string
- desktopRpcProxyBaseUrl: string
-}
-
-export type DesktopEnvironmentResponse = {
- appName: string
- externalRestApiBaseUrl: string
- rpcProxyBaseUrl: string
-}
-
-export function buildDesktopEnvironmentResponse(
- config: DesktopEnvironmentConfig
-): DesktopEnvironmentResponse {
- return {
- appName: config.desktopAppName,
- externalRestApiBaseUrl: config.publicBaseUrl,
- rpcProxyBaseUrl: config.desktopRpcProxyBaseUrl,
- }
-}