@hermespilot/link 0.4.1 → 0.4.2

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.
@@ -3977,7 +3977,7 @@ import os2 from "os";
3977
3977
  import path5 from "path";
3978
3978
 
3979
3979
  // src/constants.ts
3980
- var LINK_VERSION = "0.4.1";
3980
+ var LINK_VERSION = "0.4.2";
3981
3981
  var LINK_COMMAND = "hermeslink";
3982
3982
  var LINK_DEFAULT_PORT = 52379;
3983
3983
  var LINK_RUNTIME_DIR_NAME = ".hermeslink";
@@ -2,5 +2,6 @@
2
2
  import { R as RuntimePaths } from '../paths-CmAiZsna.js';
3
3
 
4
4
  declare function waitForPairingOrShutdown(sessionId: string, expiresAt: string, paths: RuntimePaths): Promise<'claimed' | 'expired' | 'shutdown'>;
5
+ declare function isCliEntrypoint(entry?: string, moduleUrl?: string): boolean;
5
6
 
6
- export { waitForPairingOrShutdown };
7
+ export { isCliEntrypoint, waitForPairingOrShutdown };
package/dist/cli/index.js CHANGED
@@ -34,12 +34,14 @@ import {
34
34
  startDaemonProcess,
35
35
  startLinkService,
36
36
  stopDaemonProcess
37
- } from "../chunk-476X63MC.js";
37
+ } from "../chunk-YSSZPVBP.js";
38
38
 
39
39
  // src/cli/index.ts
40
40
  import { Command } from "commander";
41
+ import { realpathSync } from "fs";
41
42
  import path3 from "path";
42
43
  import { createInterface } from "readline/promises";
44
+ import { pathToFileURL } from "url";
43
45
  import qrcode from "qrcode-terminal";
44
46
 
45
47
  // src/autostart/autostart.ts
@@ -1156,10 +1158,17 @@ function printPostPairingNetworkNotice(environment, config, t) {
1156
1158
  console.log(t("pair.relayOnlyLanHostHint"));
1157
1159
  console.log(t("pair.relayOnlySafetyHint"));
1158
1160
  }
1159
- function isCliEntrypoint() {
1160
- const entry = process.argv[1];
1161
- return Boolean(entry && import.meta.url === new URL(`file://${path3.resolve(entry)}`).href);
1161
+ function isCliEntrypoint(entry = process.argv[1], moduleUrl = import.meta.url) {
1162
+ if (!entry) {
1163
+ return false;
1164
+ }
1165
+ try {
1166
+ return moduleUrl === pathToFileURL(realpathSync(path3.resolve(entry))).href;
1167
+ } catch {
1168
+ return moduleUrl === pathToFileURL(path3.resolve(entry)).href;
1169
+ }
1162
1170
  }
1163
1171
  export {
1172
+ isCliEntrypoint,
1164
1173
  waitForPairingOrShutdown
1165
1174
  };
package/dist/http/app.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createApp
3
- } from "../chunk-476X63MC.js";
3
+ } from "../chunk-YSSZPVBP.js";
4
4
  export {
5
5
  createApp
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hermespilot/link",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "private": false,
5
5
  "description": "Hermes Link companion service and CLI for connecting hermes-agent through HermesPilot",
6
6
  "license": "MIT",