@vtxmacro/cli 2026.9.65 → 2026.9.66

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,7 +16,7 @@ import { fileURLToPath } from "node:url";
16
16
  // agent-cli-release.json
17
17
  var agent_cli_release_default = {
18
18
  package_name: "@vtxmacro/cli",
19
- package_version: "2026.9.65",
19
+ package_version: "2026.9.66",
20
20
  codex_package_name: "@openai/codex",
21
21
  codex_version: "0.155.0",
22
22
  copilot_sdk_package_name: "@github/copilot-sdk",
package/bin/vtx.js CHANGED
@@ -77,7 +77,7 @@ var init_agent_cli_release = __esm({
77
77
  "agent-cli-release.json"() {
78
78
  agent_cli_release_default = {
79
79
  package_name: "@vtxmacro/cli",
80
- package_version: "2026.9.65",
80
+ package_version: "2026.9.66",
81
81
  codex_package_name: "@openai/codex",
82
82
  codex_version: "0.155.0",
83
83
  copilot_sdk_package_name: "@github/copilot-sdk",
@@ -52346,6 +52346,17 @@ var init_screener = __esm({
52346
52346
  }
52347
52347
  });
52348
52348
 
52349
+ // lib/api/client-host-commands.ts
52350
+ var init_client_host_commands = __esm({
52351
+ "lib/api/client-host-commands.ts"() {
52352
+ "use strict";
52353
+ init_define_VTX_EXO_POLICY();
52354
+ init_define_VTX_GROK_POLICY();
52355
+ init_define_VTX_PI_MODEL_POLICY();
52356
+ init_shared();
52357
+ }
52358
+ });
52359
+
52349
52360
  // lib/runtime/server-runtime-lease.ts
52350
52361
  var CLIENT_RUNTIME_SERVER_LEASE_STORAGE_KEY, canUseStorage, normalizeProfileId, normalizeLeaseGeneration, parseLeaseRecord, readPersistedLeaseMap, writePersistedLeaseMap, isLeaseExpired, getPersistedClientRuntimeServerLease, persistExistingClientRuntimeServerLease, persistClientRuntimeServerLease, clearPersistedClientRuntimeServerLease;
52351
52362
  var init_server_runtime_lease = __esm({
@@ -53054,6 +53065,7 @@ var init_api2 = __esm({
53054
53065
  init_billing();
53055
53066
  init_market_data();
53056
53067
  init_screener();
53068
+ init_client_host_commands();
53057
53069
  init_server_runtime_lease();
53058
53070
  preferencesWriteQueue = Promise.resolve();
53059
53071
  CLIENT_SUPPORTED_PROMPT_CONTRACT_VERSION = String(
@@ -87412,7 +87424,7 @@ var init_browser_trading = __esm({
87412
87424
  throwIfAborted(input.signal);
87413
87425
  const signingKey = await resolveSigningKey(input);
87414
87426
  throwIfAborted(input.signal);
87415
- const mutation = createExchangeMutationIdentity(false);
87427
+ const mutation = createExchangeMutationIdentity(false, input);
87416
87428
  const payload = await buildHyperliquidUpdateLeveragePayload({
87417
87429
  config: input.config ?? null,
87418
87430
  publicRequestPriority: input.publicRequestPriority,
@@ -87655,6 +87667,8 @@ var init_browser_trading = __esm({
87655
87667
  const side = positionSize > 0 ? "sell" : "buy";
87656
87668
  return executeClientMarketOrder({
87657
87669
  profileId,
87670
+ mutationId: input.mutationId,
87671
+ clientOrderId: input.clientOrderId,
87658
87672
  runtimeSessionId: input.runtimeSessionId,
87659
87673
  runtimeLeaseToken: input.runtimeLeaseToken,
87660
87674
  runtimeDeviceId: input.runtimeDeviceId,
@@ -89139,11 +89153,16 @@ var init_runtime_execution = __esm({
89139
89153
  }
89140
89154
  return reports;
89141
89155
  }
89156
+ const { sz_decimals: assetSizeDecimals } = await resolveHyperliquidAsset({
89157
+ symbol: symbol2,
89158
+ config: request.config,
89159
+ publicRequestPriority: "trading_reduce"
89160
+ });
89142
89161
  const candidates = allocatedCandidates.map((candidate) => ({
89143
89162
  ...candidate,
89144
89163
  triggerPrice: Number(formatHyperliquidTriggerPriceWire(
89145
89164
  candidate.triggerPrice,
89146
- request.executionContext.sizeDecimals
89165
+ assetSizeDecimals
89147
89166
  ))
89148
89167
  }));
89149
89168
  const positionTpsl = candidates.length === 2;
@@ -91412,6 +91431,15 @@ var init_runtime_execution = __esm({
91412
91431
  retained.push(record5);
91413
91432
  }
91414
91433
  }
91434
+ if (eligible.length === 0) {
91435
+ writeTrackedTrailingStops(profileId, symbol2, retained);
91436
+ return [];
91437
+ }
91438
+ const { sz_decimals: assetSizeDecimals } = await resolveHyperliquidAsset({
91439
+ symbol: symbol2,
91440
+ config: request.config,
91441
+ publicRequestPriority: "trading_reduce"
91442
+ });
91415
91443
  const reports = [];
91416
91444
  const updated = [...retained];
91417
91445
  let remainingExposure = Math.abs(currentPositionSize);
@@ -91460,7 +91488,7 @@ var init_runtime_execution = __esm({
91460
91488
  const rawCandidatePrice = buildTriggerPrice(currentPrice, riskPct, isLong, false);
91461
91489
  const candidatePrice = rawCandidatePrice > 0 ? Number(formatHyperliquidTriggerPriceWire(
91462
91490
  rawCandidatePrice,
91463
- request.executionContext.sizeDecimals
91491
+ assetSizeDecimals
91464
91492
  )) : 0;
91465
91493
  const tightens = candidatePrice > 0 && (isLong ? candidatePrice > record5.triggerPrice : candidatePrice < record5.triggerPrice);
91466
91494
  const canonicalRecordSize = roundAssetSize(
@@ -91874,6 +91902,12 @@ var init_runtime_execution = __esm({
91874
91902
  if (!context.tpSlEnabled || context.stopLossEnabled === false || context.stopLossType !== "trailing" || !Number.isFinite(age) || age < 0 || !Number.isFinite(maxAge) || maxAge <= 0 || age > maxAge || !Number.isFinite(context.currentPositionSize) || context.currentPositionSize === 0 || !Number.isFinite(context.lastPrice) || context.lastPrice <= 0) return [];
91875
91903
  const groups = readFreshClientProtectiveGroups(String(request.profileId).trim(), context.symbol);
91876
91904
  if (hasClientProtectiveGroupReadFailure(String(request.profileId).trim(), context.symbol) || groups.some((group) => group.walletAddress !== String(context.walletAddress ?? "").trim().toLowerCase() || group.pendingEntry || group.attachmentJournal || group.cleanupRequired || group.legs.some((leg) => leg.replacement))) return [];
91905
+ if (!groups.some((group) => group.legs.some((leg) => leg.isTrailing && typeof leg.orderId === "number"))) return [];
91906
+ const { sz_decimals: assetSizeDecimals } = await resolveHyperliquidAsset({
91907
+ symbol: context.symbol,
91908
+ config: request.config,
91909
+ publicRequestPriority: "trading_reduce"
91910
+ });
91877
91911
  const isLong = context.currentPositionSize > 0;
91878
91912
  const improves = groups.some((group) => group.isLong === isLong && group.legs.some((leg) => {
91879
91913
  if (!leg.isTrailing || typeof leg.orderId !== "number") return false;
@@ -91881,7 +91915,7 @@ var init_runtime_execution = __esm({
91881
91915
  if (!(size > 0)) return false;
91882
91916
  const risk = resolveRiskPct(context.stopLossMode, context.stopLossPct, context.stopLossUsdc, context.lastPrice * size);
91883
91917
  const raw = buildTriggerPrice(context.lastPrice, risk, isLong, false);
91884
- const candidate = raw > 0 ? Number(formatHyperliquidTriggerPriceWire(raw, context.sizeDecimals)) : 0;
91918
+ const candidate = raw > 0 ? Number(formatHyperliquidTriggerPriceWire(raw, assetSizeDecimals)) : 0;
91885
91919
  return candidate > 0 && (isLong ? candidate > leg.triggerPrice : candidate < leg.triggerPrice);
91886
91920
  }));
91887
91921
  if (!improves) return [];
@@ -92754,12 +92788,17 @@ var init_runtime_execution = __esm({
92754
92788
  }
92755
92789
  const mutationId = createRuntimeId().toLowerCase();
92756
92790
  const clientOrderId = `0x${mutationId.replaceAll("-", "")}`;
92791
+ const { sz_decimals: assetSizeDecimals } = await resolveHyperliquidAsset({
92792
+ symbol: input.executionContext.symbol,
92793
+ config: input.config,
92794
+ publicRequestPriority: "trading_reduce"
92795
+ });
92757
92796
  const provisionalLeg = {
92758
92797
  kind,
92759
92798
  orderId: clientOrderId,
92760
92799
  triggerPrice: Number(formatHyperliquidTriggerPriceWire(
92761
92800
  triggerInput.triggerPrice,
92762
- input.executionContext.sizeDecimals
92801
+ assetSizeDecimals
92763
92802
  )),
92764
92803
  size: legSize,
92765
92804
  isTrailing: !triggerInput.isTakeProfit && input.executionContext.stopLossType === "trailing"
@@ -92844,7 +92883,7 @@ var init_runtime_execution = __esm({
92844
92883
  orderId: triggerOrderId,
92845
92884
  triggerPrice: Number(formatHyperliquidTriggerPriceWire(
92846
92885
  triggerInput.triggerPrice,
92847
- input.executionContext.sizeDecimals
92886
+ assetSizeDecimals
92848
92887
  )),
92849
92888
  size: legSize,
92850
92889
  isTrailing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtxmacro/cli",
3
- "version": "2026.9.65",
3
+ "version": "2026.9.66",
4
4
  "description": "VTX Macro CLI, MCP server, and durable external inference host.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",