@dexto/server 1.6.2 → 1.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,6 +23,7 @@ __export(hono_exports, {
23
23
  module.exports = __toCommonJS(hono_exports);
24
24
  var import_zod_openapi = require("@hono/zod-openapi");
25
25
  var import_core = require("@dexto/core");
26
+ var import_agent_management = require("@dexto/agent-management");
26
27
  var import_health = require("./routes/health.js");
27
28
  var import_greeting = require("./routes/greeting.js");
28
29
  var import_messages = require("./routes/messages.js");
@@ -59,7 +60,35 @@ var import_node_path = require("node:path");
59
60
  const import_meta = {};
60
61
  const __filename = (0, import_node_url.fileURLToPath)(import_meta.url);
61
62
  const __dirname = (0, import_node_path.dirname)(__filename);
62
- const packageJson = JSON.parse((0, import_node_fs.readFileSync)((0, import_node_path.join)(__dirname, "../../package.json"), "utf-8"));
63
+ function readPackageVersion(packageJsonPath) {
64
+ if (!(0, import_node_fs.existsSync)(packageJsonPath)) {
65
+ return void 0;
66
+ }
67
+ try {
68
+ const content = (0, import_node_fs.readFileSync)(packageJsonPath, "utf-8");
69
+ const packageJson = JSON.parse(content);
70
+ if (typeof packageJson.version === "string" && packageJson.version.length > 0) {
71
+ return packageJson.version;
72
+ }
73
+ } catch {
74
+ }
75
+ return void 0;
76
+ }
77
+ function resolveServerVersion() {
78
+ const localVersion = readPackageVersion((0, import_node_path.join)(__dirname, "../../package.json"));
79
+ if (localVersion) {
80
+ return localVersion;
81
+ }
82
+ const packageRoot = (0, import_agent_management.getDextoPackageRoot)();
83
+ if (packageRoot) {
84
+ const standaloneVersion = readPackageVersion((0, import_node_path.join)(packageRoot, "package.json"));
85
+ if (standaloneVersion) {
86
+ return standaloneVersion;
87
+ }
88
+ }
89
+ return process.env.DEXTO_CLI_VERSION ?? "0.0.0";
90
+ }
91
+ const serverVersion = resolveServerVersion();
63
92
  const dummyAgentsContext = {
64
93
  switchAgentById: async () => {
65
94
  throw new Error("Multi-agent features not available in single-agent mode");
@@ -119,7 +148,7 @@ function createDextoApp(options) {
119
148
  openapi: "3.0.0",
120
149
  info: {
121
150
  title: "Dexto API",
122
- version: packageJson.version,
151
+ version: serverVersion,
123
152
  description: "OpenAPI spec for the Dexto REST API server"
124
153
  },
125
154
  servers: [
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hono/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAkBzD,OAAO,EAAsB,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AASlF,OAAO,EAGH,KAAK,kBAAkB,EAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAKxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AA+B1E,MAAM,MAAM,UAAU,GAAG,CAAC,GAAG,EAAE,OAAO,KAAK,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAC5E,MAAM,MAAM,oBAAoB,GAAG,CAC/B,GAAG,EAAE,OAAO,KACX,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;AAEtD,MAAM,MAAM,qBAAqB,GAAG;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,UAAU,CAAC;IACrB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,oBAAoB,CAAC;IAC1C,YAAY,EAAE,MAAM,SAAS,CAAC;IAC9B,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,iBAAiB,EAAE,sBAAsB,CAAC;IAC1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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBA2QvC;AAID,MAAM,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAGxD,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { OpenAPIHono } from "@hono/zod-openapi";
2
2
  import { logger } from "@dexto/core";
3
+ import { getDextoPackageRoot } from "@dexto/agent-management";
3
4
  import { createHealthRouter } from "./routes/health.js";
4
5
  import { createGreetingRouter } from "./routes/greeting.js";
5
6
  import { createMessagesRouter } from "./routes/messages.js";
@@ -33,12 +34,40 @@ import { handleHonoError } from "./middleware/error.js";
33
34
  import { prettyJsonMiddleware, redactionMiddleware } from "./middleware/redaction.js";
34
35
  import { createCorsMiddleware } from "./middleware/cors.js";
35
36
  import { createAuthMiddleware } from "./middleware/auth.js";
36
- import { readFileSync } from "node:fs";
37
+ import { existsSync, readFileSync } from "node:fs";
37
38
  import { fileURLToPath } from "node:url";
38
39
  import { dirname, join } from "node:path";
39
40
  const __filename = fileURLToPath(import.meta.url);
40
41
  const __dirname = dirname(__filename);
41
- const packageJson = JSON.parse(readFileSync(join(__dirname, "../../package.json"), "utf-8"));
42
+ function readPackageVersion(packageJsonPath) {
43
+ if (!existsSync(packageJsonPath)) {
44
+ return void 0;
45
+ }
46
+ try {
47
+ const content = readFileSync(packageJsonPath, "utf-8");
48
+ const packageJson = JSON.parse(content);
49
+ if (typeof packageJson.version === "string" && packageJson.version.length > 0) {
50
+ return packageJson.version;
51
+ }
52
+ } catch {
53
+ }
54
+ return void 0;
55
+ }
56
+ function resolveServerVersion() {
57
+ const localVersion = readPackageVersion(join(__dirname, "../../package.json"));
58
+ if (localVersion) {
59
+ return localVersion;
60
+ }
61
+ const packageRoot = getDextoPackageRoot();
62
+ if (packageRoot) {
63
+ const standaloneVersion = readPackageVersion(join(packageRoot, "package.json"));
64
+ if (standaloneVersion) {
65
+ return standaloneVersion;
66
+ }
67
+ }
68
+ return process.env.DEXTO_CLI_VERSION ?? "0.0.0";
69
+ }
70
+ const serverVersion = resolveServerVersion();
42
71
  const dummyAgentsContext = {
43
72
  switchAgentById: async () => {
44
73
  throw new Error("Multi-agent features not available in single-agent mode");
@@ -98,7 +127,7 @@ function createDextoApp(options) {
98
127
  openapi: "3.0.0",
99
128
  info: {
100
129
  title: "Dexto API",
101
- version: packageJson.version,
130
+ version: serverVersion,
102
131
  description: "OpenAPI spec for the Dexto REST API server"
103
132
  },
104
133
  servers: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dexto/server",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -30,13 +30,13 @@
30
30
  "hono": "^4.11.10",
31
31
  "ws": "^8.18.1",
32
32
  "yaml": "^2.7.1",
33
- "@modelcontextprotocol/sdk": "^1.25.2",
34
- "@dexto/agent-config": "1.6.2",
35
- "@dexto/agent-management": "1.6.2",
36
- "@dexto/core": "1.6.2",
37
- "@dexto/image-local": "1.6.2",
38
- "@dexto/storage": "1.6.2",
39
- "@dexto/tools-scheduler": "1.6.2"
33
+ "@modelcontextprotocol/sdk": "^1.26.0",
34
+ "@dexto/agent-config": "1.6.3",
35
+ "@dexto/agent-management": "1.6.3",
36
+ "@dexto/core": "1.6.3",
37
+ "@dexto/image-local": "1.6.3",
38
+ "@dexto/storage": "1.6.3",
39
+ "@dexto/tools-scheduler": "1.6.3"
40
40
  },
41
41
  "files": [
42
42
  "dist",