@alfe.ai/gateway 0.0.10 → 0.0.11
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.
- package/dist/health.js +22 -8
- package/package.json +2 -2
package/dist/health.js
CHANGED
|
@@ -20103,18 +20103,32 @@ let shuttingDown = false;
|
|
|
20103
20103
|
let resolvedCliVersion;
|
|
20104
20104
|
/**
|
|
20105
20105
|
* Resolve the installed @alfe.ai/cli version.
|
|
20106
|
-
*
|
|
20107
|
-
*
|
|
20106
|
+
*
|
|
20107
|
+
* Strategy (in order):
|
|
20108
|
+
* 1. ALFE_CLI_VERSION env var (set by CLI entry point when run directly)
|
|
20109
|
+
* 2. Walk up from this file to find @alfe.ai/cli/package.json
|
|
20110
|
+
* (works when systemd runs the gateway binary directly, since
|
|
20111
|
+
* the path is .../cli/node_modules/@alfe.ai/gateway/dist/...)
|
|
20108
20112
|
*/
|
|
20109
20113
|
async function getCliVersion() {
|
|
20110
20114
|
if (process.env.ALFE_CLI_VERSION) return process.env.ALFE_CLI_VERSION;
|
|
20111
20115
|
try {
|
|
20112
|
-
const
|
|
20113
|
-
|
|
20114
|
-
|
|
20115
|
-
|
|
20116
|
-
|
|
20117
|
-
|
|
20116
|
+
const { fileURLToPath } = await import("node:url");
|
|
20117
|
+
const { dirname } = await import("node:path");
|
|
20118
|
+
let dir = dirname(fileURLToPath(import.meta.url));
|
|
20119
|
+
for (let i = 0; i < 10; i++) {
|
|
20120
|
+
const candidate = join(dir, "package.json");
|
|
20121
|
+
try {
|
|
20122
|
+
const raw = await readFile(candidate, "utf-8");
|
|
20123
|
+
const pkg = JSON.parse(raw);
|
|
20124
|
+
if (pkg.name === "@alfe.ai/cli") return pkg.version;
|
|
20125
|
+
} catch {}
|
|
20126
|
+
const parent = dirname(dir);
|
|
20127
|
+
if (parent === dir) break;
|
|
20128
|
+
dir = parent;
|
|
20129
|
+
}
|
|
20130
|
+
} catch {}
|
|
20131
|
+
logger$1.debug("Could not resolve @alfe.ai/cli version");
|
|
20118
20132
|
}
|
|
20119
20133
|
/**
|
|
20120
20134
|
* Flush pino's async transport and exit.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfe.ai/gateway",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "Alfe local gateway daemon — persistent control plane for agent integrations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@alfe.ai/ai-proxy-local": "^0.0.2",
|
|
26
26
|
"@alfe.ai/config": "^0.0.2",
|
|
27
27
|
"@alfe.ai/doctor": "^0.0.2",
|
|
28
|
-
"@alfe.ai/integrations": "^0.0.
|
|
28
|
+
"@alfe.ai/integrations": "^0.0.4"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/ws": "^8.5.13",
|