@remnic/plugin-openclaw 9.54.3 → 9.54.4
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/index.js +6 -6
- package/openclaw.plugin.json +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -5870,7 +5870,7 @@ function readUnitAuthToken(source) {
|
|
|
5870
5870
|
}).authToken
|
|
5871
5871
|
};
|
|
5872
5872
|
}
|
|
5873
|
-
function readServiceEndpoints() {
|
|
5873
|
+
function readServiceEndpoints(exists = fileExists) {
|
|
5874
5874
|
const homeDir = resolveHomeDir();
|
|
5875
5875
|
const unitPaths = [
|
|
5876
5876
|
...LAUNCHD_SERVICE_PATHS.map((segments) => {
|
|
@@ -5882,12 +5882,12 @@ function readServiceEndpoints() {
|
|
|
5882
5882
|
...resolveSystemUnitSources(
|
|
5883
5883
|
systemdUserUnitDirs(homeDir),
|
|
5884
5884
|
SYSTEMD_UNIT_NAMES,
|
|
5885
|
-
|
|
5885
|
+
exists
|
|
5886
5886
|
).map((source) => ({ ...source, userScoped: true })),
|
|
5887
5887
|
// For a SYSTEM unit the base file and its overrides can live in different
|
|
5888
5888
|
// load-path directories: a packaged unit under `/usr/lib` customized by
|
|
5889
5889
|
// `systemctl edit`, which writes `/etc/systemd/system/<unit>.d/*.conf`.
|
|
5890
|
-
...resolveSystemUnitSources(SYSTEMD_SYSTEM_UNIT_DIRS, SYSTEMD_SYSTEM_UNIT_NAMES,
|
|
5890
|
+
...resolveSystemUnitSources(SYSTEMD_SYSTEM_UNIT_DIRS, SYSTEMD_SYSTEM_UNIT_NAMES, exists).map(
|
|
5891
5891
|
(source) => ({ ...source, userScoped: false })
|
|
5892
5892
|
)
|
|
5893
5893
|
];
|
|
@@ -6286,7 +6286,7 @@ function readServerBlock(candidate) {
|
|
|
6286
6286
|
...typeof authToken === "string" && authToken.length > 0 ? { authToken } : {}
|
|
6287
6287
|
};
|
|
6288
6288
|
}
|
|
6289
|
-
function daemonEndpointCandidates() {
|
|
6289
|
+
function daemonEndpointCandidates(unitExists) {
|
|
6290
6290
|
const envHost = readCompatEnv("REMNIC_HOST", "ENGRAM_HOST");
|
|
6291
6291
|
const envPort = coerceDaemonPort(readCompatEnv("REMNIC_PORT", "ENGRAM_PORT"));
|
|
6292
6292
|
const candidates = [];
|
|
@@ -6334,7 +6334,7 @@ function daemonEndpointCandidates() {
|
|
|
6334
6334
|
if (server !== void 0) add(server.host, server.port, candidate);
|
|
6335
6335
|
};
|
|
6336
6336
|
if (envConfigPath !== void 0) addConfigCandidate(envConfigPath);
|
|
6337
|
-
for (const unit of readServiceEndpoints()) {
|
|
6337
|
+
for (const unit of readServiceEndpoints(unitExists)) {
|
|
6338
6338
|
const server = unit.configPath === void 0 ? {} : readServerBlock(unit.configPath) ?? {};
|
|
6339
6339
|
add(
|
|
6340
6340
|
unit.host ?? server.host,
|
|
@@ -6363,7 +6363,7 @@ function readDaemonPort() {
|
|
|
6363
6363
|
return readDaemonServerConfig().port ?? DEFAULT_PORT;
|
|
6364
6364
|
}
|
|
6365
6365
|
function detectDaemonBridgeMode(options) {
|
|
6366
|
-
const endpoints = daemonEndpointCandidates();
|
|
6366
|
+
const endpoints = daemonEndpointCandidates(options.unitExists);
|
|
6367
6367
|
const primary = endpoints[0] ?? { host: readDaemonHost(), port: readDaemonPort(), token: "" };
|
|
6368
6368
|
const embedded = {
|
|
6369
6369
|
mode: "embedded",
|