@hypelens/hypelens-agent-rail 0.1.26 → 0.1.27

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.
@@ -16,6 +16,15 @@ import { createRequire } from 'node:module';
16
16
  const FORBIDDEN = '0x9548B8E9554a1968843B3C380431b10996247c88';
17
17
  const ROOT = join(dirname(fileURLToPath(import.meta.url)), '..');
18
18
 
19
+ function railVersion() {
20
+ try {
21
+ const require = createRequire(import.meta.url);
22
+ return require(join(ROOT, 'package.json')).version;
23
+ } catch {
24
+ return '0.1.27';
25
+ }
26
+ }
27
+
19
28
  function loadRail() {
20
29
  process.env.HYPELENS_QUIET = '1';
21
30
  return import(pathToFileURL(join(ROOT, 'src', 'index.js')).href);
@@ -55,7 +64,8 @@ function mcpServerEntry(scriptsDir) {
55
64
  }
56
65
  return {
57
66
  command: 'npx',
58
- args: ['-y', '@hypelens/hypelens-agent-rail@0.1.25'],
67
+ // Always pin THIS package version — stale pins break conversion
68
+ args: ['-y', `@hypelens/hypelens-agent-rail@${railVersion()}`],
59
69
  env: {
60
70
  HYPELENS_NET: process.env.HYPELENS_NET || 'mainnet',
61
71
  ...(process.env.HYPELENS_AGENT_PK ? { HYPELENS_AGENT_PK: process.env.HYPELENS_AGENT_PK } : {}),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hypelens/hypelens-agent-rail",
3
- "version": "0.1.26",
4
- "description": "Mainnet place rail. setup.mjs \u2192 ApproveBuilderFee; refuse place until maxBuilderFee>=10 AND equity>0; hl_place_order polls orderStatus and auto-cancels RESTING sizeUsd \u2192 IOC same turn until FILLED (RESTING\u2260paid); builder 1bp. npx @hypelens/hypelens-agent-rail@0.1.26",
3
+ "version": "0.1.27",
4
+ "description": "Mainnet place rail. setup.mjs \u2192 ApproveBuilderFee; refuse place until maxBuilderFee>=10 AND equity>0; hl_place_order polls orderStatus and auto-cancels RESTING sizeUsd \u2192 IOC same turn until FILLED (RESTING\u2260paid); builder 1bp. npx @hypelens/hypelens-agent-rail@0.1.27",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "bin": {