@alfe.ai/gateway 0.0.37 → 0.0.39
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 +23 -3
- package/package.json +2 -2
package/dist/health.js
CHANGED
|
@@ -3,7 +3,7 @@ import { createRequire } from "node:module";
|
|
|
3
3
|
import { mkdir, readFile, unlink, writeFile } from "node:fs/promises";
|
|
4
4
|
import { execFile, execSync, spawn } from "node:child_process";
|
|
5
5
|
import { promisify } from "node:util";
|
|
6
|
-
import { join } from "node:path";
|
|
6
|
+
import { dirname, join } from "node:path";
|
|
7
7
|
import { homedir } from "node:os";
|
|
8
8
|
import pino from "pino";
|
|
9
9
|
import { chmodSync, existsSync, readFileSync, unlinkSync } from "node:fs";
|
|
@@ -83,6 +83,10 @@ const ID_PREFIXES = {
|
|
|
83
83
|
knowledgeTriple: "kgt",
|
|
84
84
|
accessCode: "acc",
|
|
85
85
|
pendingInject: "pij",
|
|
86
|
+
identity: "idn",
|
|
87
|
+
identityNote: "ino",
|
|
88
|
+
identityTag: "itg",
|
|
89
|
+
identityAlias: "ial",
|
|
86
90
|
attachment: "att",
|
|
87
91
|
run: "run",
|
|
88
92
|
request: "req",
|
|
@@ -4946,9 +4950,25 @@ function getAlfeBinPath() {
|
|
|
4946
4950
|
}
|
|
4947
4951
|
}
|
|
4948
4952
|
/**
|
|
4953
|
+
* Build the PATH for the launchd plist, ensuring the directory containing the
|
|
4954
|
+
* resolved alfe binary is included (e.g. /opt/homebrew/bin on Apple Silicon).
|
|
4955
|
+
*/
|
|
4956
|
+
function buildLaunchdPath(alfeBin) {
|
|
4957
|
+
const basePaths = [
|
|
4958
|
+
"/usr/local/bin",
|
|
4959
|
+
"/usr/bin",
|
|
4960
|
+
"/bin",
|
|
4961
|
+
join(homedir(), ".local", "bin")
|
|
4962
|
+
];
|
|
4963
|
+
const binDir = dirname(alfeBin);
|
|
4964
|
+
if (binDir && !basePaths.includes(binDir)) basePaths.unshift(binDir);
|
|
4965
|
+
return basePaths.join(":");
|
|
4966
|
+
}
|
|
4967
|
+
/**
|
|
4949
4968
|
* Generate a launchd plist for macOS.
|
|
4950
4969
|
*/
|
|
4951
4970
|
function generateLaunchdPlist() {
|
|
4971
|
+
const alfeBin = getAlfeBinPath();
|
|
4952
4972
|
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
4953
4973
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
4954
4974
|
<plist version="1.0">
|
|
@@ -4957,7 +4977,7 @@ function generateLaunchdPlist() {
|
|
|
4957
4977
|
<string>${LAUNCHD_LABEL}</string>
|
|
4958
4978
|
<key>ProgramArguments</key>
|
|
4959
4979
|
<array>
|
|
4960
|
-
<string>${
|
|
4980
|
+
<string>${alfeBin}</string>
|
|
4961
4981
|
<string>gateway</string>
|
|
4962
4982
|
<string>daemon</string>
|
|
4963
4983
|
</array>
|
|
@@ -4976,7 +4996,7 @@ function generateLaunchdPlist() {
|
|
|
4976
4996
|
<key>NODE_ENV</key>
|
|
4977
4997
|
<string>production</string>
|
|
4978
4998
|
<key>PATH</key>
|
|
4979
|
-
<string
|
|
4999
|
+
<string>${buildLaunchdPath(alfeBin)}</string>
|
|
4980
5000
|
</dict>
|
|
4981
5001
|
</dict>
|
|
4982
5002
|
</plist>`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfe.ai/gateway",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.39",
|
|
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.7",
|
|
26
26
|
"@alfe.ai/config": "^0.0.7",
|
|
27
27
|
"@alfe.ai/integration-manifest": "^0.0.9",
|
|
28
|
-
"@alfe.ai/integrations": "^0.0.
|
|
28
|
+
"@alfe.ai/integrations": "^0.0.25"
|
|
29
29
|
},
|
|
30
30
|
"license": "UNLICENSED",
|
|
31
31
|
"scripts": {
|