The open-source app everyone uses to manage agents at work
TypeScript acpxagent-orchestrationagent-skillsagentic-aiai-agentsai-engineeringai-governanceai-toolsautonomous-agentsclaudeclaude-codeclaude-skillscodexhermesllmmcpmulti-agentopenclawproject-managementworkflow-automation
add app version label
Sai Shankar02bf0dd8622d
diff --git a/server/src/__tests__/health.test.ts b/server/src/__tests__/health.test.tsindex 5583955f71..1511b95ea1 100644--- a/server/src/__tests__/health.test.ts+++ b/server/src/__tests__/health.test.ts@@ -2,6 +2,7 @@ import { describe, it, expect } from "vitest";import express from "express";import request from "supertest";import { healthRoutes } from "../routes/health.js";+import { serverVersion } from "../version.js";describe("GET /health", () => {const app = express();@@ -10,6 +11,6 @@ describe("GET /health", () => {it("returns 200 with status ok", async () => {const res = await request(app).get("/health");expect(res.status).toBe(200);- expect(res.body).toEqual({ status: "ok" });+ expect(res.body).toEqual({ status: "ok", version: serverVersion });});});diff --git a/server/src/routes/health.ts b/server/src/routes/health.tsindex ddc7c4410b..59897a89d4 100644--- a/server/src/routes/health.ts+++ b/server/src/routes/health.ts@@ -3,6 +3,7 @@ import type { Db } from "@paperclipai/db";import { and, count, eq, gt, isNull, sql } from "drizzle-orm";import { instanceUserRoles, invites } from "@paperclipai/db";import type { DeploymentExposure, DeploymentMode } from "@paperclipai/shared";+import { serverVersion } from "../version.js";export function healthRoutes(db?: Db,@@ -22,7 +23,7 @@ export function healthRoutes(router.get("/", async (_req, res) => {if (!db) {- res.json({ status: "ok" });+ res.json({ status: "ok", version: serverVersion });return;}@@ -56,6 +57,7 @@ export function healthRoutes(res.json({status: "ok",+ version: serverVersion,deploymentMode: opts.deploymentMode,deploymentExposure: opts.deploymentExposure,authReady: opts.authReady,diff --git a/server/src/version.ts b/server/src/version.tsnew file mode 100644index 0000000000..39a16a4cfe--- /dev/null+++ b/server/src/version.ts@@ -0,0 +1,10 @@+import { createRequire } from "node:module";++type PackageJson = {+ version?: string;+};++const require = createRequire(import.meta.url);+const pkg = require("../package.json") as PackageJson;++export const serverVersion = pkg.version ?? "0.0.0";diff --git a/ui/src/api/health.ts b/ui/src/api/health.tsindex cb1b1374e6..b1573805a2 100644--- a/ui/src/api/health.ts+++ b/ui/src/api/health.ts@@ -1,5 +1,6 @@export type HealthStatus = {status: "ok";+ version?: string;deploymentMode?: "local_trusted" | "authenticated";deploymentExposure?: "private" | "public";authReady?: boolean;diff --git a/ui/src/components/Layout.tsx b/ui/src/components/Layout.tsxindex 43094b51c3..5c8f43d611 100644--- a/ui/src/components/Layout.tsx+++ b/ui/src/components/Layout.tsx@@ -268,6 +268,9 @@ export function Layout() {<BookOpen className="h-4 w-4 shrink-0" /><span className="truncate">Documentation</span></a>+ <span className="px-2 text-xs text-muted-foreground shrink-0">+ {health?.version ? `v${health.version}` : "v?.?.?"}+ </span><Button variant="ghost" size="icon-sm" className="text-muted-foreground shrink-0" asChild><Linkto="/instance/settings"@@ -318,6 +321,9 @@ export function Layout() {<BookOpen className="h-4 w-4 shrink-0" /><span className="truncate">Documentation</span></a>+ <span className="px-2 text-xs text-muted-foreground shrink-0">+ {health?.version ? `v${health.version}` : "v?.?.?"}+ </span><Button variant="ghost" size="icon-sm" className="text-muted-foreground shrink-0" asChild><Linkto="/instance/settings"