From dd89c0525f38a62e6917668f8b867817ffb3a154 Mon Sep 17 00:00:00 2001 From: yunyingk Date: Sat, 13 Jun 2026 17:44:39 +0800 Subject: [PATCH] Read runtime version from package metadata --- README.md | 2 -- skills/seal-home/references/cli.md | 2 +- src/cli.ts | 2 +- src/server.ts | 3 ++- src/version.ts | 3 +++ 5 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 src/version.ts diff --git a/README.md b/README.md index e10c839..2d90b9a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # seal-home -Version: `0.3.3` - Bun + TypeScript CLI and optional local service for pulling Seal enterprise approval context from provider credentials. The first provider is Hose/合思: `key`, `password`, `corpId`, `staffId`, and an optional Hose domain. The provider exchanges those credentials for a Seal enterprise session, then the Seal domain tools can read and maintain approval rules, approval documents, and approval style preferences. diff --git a/skills/seal-home/references/cli.md b/skills/seal-home/references/cli.md index 78355c3..b808f0c 100644 --- a/skills/seal-home/references/cli.md +++ b/skills/seal-home/references/cli.md @@ -47,7 +47,7 @@ seal-home simulation batch-records ```json { "name": "seal-home", - "version": "0.3.3" + "version": "" } ``` diff --git a/src/cli.ts b/src/cli.ts index 4457466..a46e1e7 100755 --- a/src/cli.ts +++ b/src/cli.ts @@ -13,8 +13,8 @@ import { sealTools, type SealTool } from "./domains/seal/tools.js"; import { CorpConfig } from "./core/config/types.js"; import { clearCorpTokenCache } from "./core/auth/token-store.js"; import { getHoseProvisionalAuthLink } from "./core/auth/hose.js"; +import { VERSION } from "./version.js"; -const VERSION = "0.3.3"; const APP_ROOT = dirname(dirname(fileURLToPath(import.meta.url))); const STATE_DIR = join(homedir(), ".config", "seal-home"); const SERVICE_PID_FILE = join(STATE_DIR, "service.pid"); diff --git a/src/server.ts b/src/server.ts index 2316d4f..c8f6293 100644 --- a/src/server.ts +++ b/src/server.ts @@ -10,6 +10,7 @@ import { CorpContext } from "./core/config/manager.js"; import { createSealClient } from "./core/http/factory.js"; import { resolveLiveSealEnterpriseConfig } from "./domains/seal/source.js"; import { findSealMcpTool, findSealTool, sealMcpTools } from "./domains/seal/tools.js"; +import { VERSION } from "./version.js"; async function main() { const corps = loadCorpConfigs(); @@ -18,7 +19,7 @@ async function main() { const server = new Server( { name: "seal-home", - version: "0.3.3" + version: VERSION }, { capabilities: { diff --git a/src/version.ts b/src/version.ts new file mode 100644 index 0000000..1a27327 --- /dev/null +++ b/src/version.ts @@ -0,0 +1,3 @@ +import packageJson from "../package.json" with { type: "json" }; + +export const VERSION = packageJson.version;