@vtxmacro/cli 2026.10.74 → 2026.10.75

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/bin/vtx-mcp.js CHANGED
@@ -43,7 +43,7 @@ var init_define_VTX_PI_MODEL_POLICY = __esm({
43
43
  var agent_cli_release_default;
44
44
  var init_agent_cli_release = __esm({
45
45
  "agent-cli-release.json"() {
46
- agent_cli_release_default = { package_name: "@vtxmacro/cli", package_version: "2026.10.74", codex_package_name: "@openai/codex", codex_version: "0.155.0", copilot_sdk_package_name: "@github/copilot-sdk", copilot_sdk_version: "1.0.0-beta.8", copilot_cli_package_name: "@github/copilot", copilot_cli_version: "1.0.80", deepseek_harness_version: "0.1.1-rc.2", deepseek_harness_packages: ["@deepseek-ai/dsh-agent", "@deepseek-ai/dsh-agent-instructions", "@deepseek-ai/dsh-agent-loop", "@deepseek-ai/dsh-agent-spine-demo", "@deepseek-ai/dsh-anonymous-user-id", "@deepseek-ai/dsh-atomic-write", "@deepseek-ai/dsh-attachment", "@deepseek-ai/dsh-brand", "@deepseek-ai/dsh-code-runtime", "@deepseek-ai/dsh-credentials", "@deepseek-ai/dsh-fs", "@deepseek-ai/dsh-goal", "@deepseek-ai/dsh-goal-round-driver", "@deepseek-ai/dsh-home-paths", "@deepseek-ai/dsh-invariants", "@deepseek-ai/dsh-jobs", "@deepseek-ai/dsh-jobs-local", "@deepseek-ai/dsh-launch-environment", "@deepseek-ai/dsh-llm", "@deepseek-ai/dsh-llm-deepseek", "@deepseek-ai/dsh-llm-retry", "@deepseek-ai/dsh-output-retention", "@deepseek-ai/dsh-sandbox", "@deepseek-ai/dsh-sandbox-policy", "@deepseek-ai/dsh-scope", "@deepseek-ai/dsh-session", "@deepseek-ai/dsh-session-checkpoint-policy", "@deepseek-ai/dsh-session-persistence", "@deepseek-ai/dsh-session-persistence-jsonl", "@deepseek-ai/dsh-session-projection", "@deepseek-ai/dsh-session-title", "@deepseek-ai/dsh-settings", "@deepseek-ai/dsh-shell", "@deepseek-ai/dsh-shell-env", "@deepseek-ai/dsh-skill", "@deepseek-ai/dsh-skill-filesystem", "@deepseek-ai/dsh-subprocess", "@deepseek-ai/dsh-system-prompt", "@deepseek-ai/dsh-timeout", "@deepseek-ai/dsh-tool-bash", "@deepseek-ai/dsh-tool-goal", "@deepseek-ai/dsh-tool-jobs", "@deepseek-ai/dsh-tool-skill", "@deepseek-ai/dsh-tools", "@deepseek-ai/dsh-typert-protocol", "@deepseek-ai/dsh-user-approval"], deepseek_cordis_package_name: "@deepseek-ai/cordis", deepseek_cordis_version: "4.0.1", deepseek_support_packages: { "@deepseek-ai/cordis-plugin-timer": "1.1.3" }, platforms: { "linux-x64": { package_name: "@openai/codex-linux-x64", target: "x86_64-unknown-linux-musl", binary_name: "codex", sha256: "660e159a49e823ac8e5986cb238f73158ce4b957d40d9292f8de90862644b501" }, "win32-x64": { package_name: "@openai/codex-win32-x64", target: "x86_64-pc-windows-msvc", binary_name: "codex.exe", sha256: "e4c11374bd9de8ad5c3b7617fd4654bb7839901edb0863f9930666863c7a021b" } }, pi_coding_agent_package_name: "@earendil-works/pi-coding-agent", pi_ai_package_name: "@earendil-works/pi-ai", pi_version: "0.85.1", pi_support_packages: ["@earendil-works/pi-agent-core", "@earendil-works/pi-telemetry", "@earendil-works/pi-tui", "@earendil-works/chord"], grok_version: "1.0.30", grok_platforms: { "linux-x64": { package_name: "@xai-official/grok-linux-x64", binary_name: "grok", sha256: "504dd6546ab991b75d36698242875ce461489cd1f8cd84285873cb55bd5c7d54" }, "win32-x64": { package_name: "@xai-official/grok-win32-x64", binary_name: "grok.exe", sha256: "48736d1a4342a801ea26d0ecde4c516b653f791399065adaa55973f83abd8867" } } };
46
+ agent_cli_release_default = { package_name: "@vtxmacro/cli", package_version: "2026.10.75", codex_package_name: "@openai/codex", codex_version: "0.155.0", copilot_sdk_package_name: "@github/copilot-sdk", copilot_sdk_version: "1.0.0-beta.8", copilot_cli_package_name: "@github/copilot", copilot_cli_version: "1.0.80", deepseek_harness_version: "0.1.1-rc.2", deepseek_harness_packages: ["@deepseek-ai/dsh-agent", "@deepseek-ai/dsh-agent-instructions", "@deepseek-ai/dsh-agent-loop", "@deepseek-ai/dsh-agent-spine-demo", "@deepseek-ai/dsh-anonymous-user-id", "@deepseek-ai/dsh-atomic-write", "@deepseek-ai/dsh-attachment", "@deepseek-ai/dsh-brand", "@deepseek-ai/dsh-code-runtime", "@deepseek-ai/dsh-credentials", "@deepseek-ai/dsh-fs", "@deepseek-ai/dsh-goal", "@deepseek-ai/dsh-goal-round-driver", "@deepseek-ai/dsh-home-paths", "@deepseek-ai/dsh-invariants", "@deepseek-ai/dsh-jobs", "@deepseek-ai/dsh-jobs-local", "@deepseek-ai/dsh-launch-environment", "@deepseek-ai/dsh-llm", "@deepseek-ai/dsh-llm-deepseek", "@deepseek-ai/dsh-llm-retry", "@deepseek-ai/dsh-output-retention", "@deepseek-ai/dsh-sandbox", "@deepseek-ai/dsh-sandbox-policy", "@deepseek-ai/dsh-scope", "@deepseek-ai/dsh-session", "@deepseek-ai/dsh-session-checkpoint-policy", "@deepseek-ai/dsh-session-persistence", "@deepseek-ai/dsh-session-persistence-jsonl", "@deepseek-ai/dsh-session-projection", "@deepseek-ai/dsh-session-title", "@deepseek-ai/dsh-settings", "@deepseek-ai/dsh-shell", "@deepseek-ai/dsh-shell-env", "@deepseek-ai/dsh-skill", "@deepseek-ai/dsh-skill-filesystem", "@deepseek-ai/dsh-subprocess", "@deepseek-ai/dsh-system-prompt", "@deepseek-ai/dsh-timeout", "@deepseek-ai/dsh-tool-bash", "@deepseek-ai/dsh-tool-goal", "@deepseek-ai/dsh-tool-jobs", "@deepseek-ai/dsh-tool-skill", "@deepseek-ai/dsh-tools", "@deepseek-ai/dsh-typert-protocol", "@deepseek-ai/dsh-user-approval"], deepseek_cordis_package_name: "@deepseek-ai/cordis", deepseek_cordis_version: "4.0.1", deepseek_support_packages: { "@deepseek-ai/cordis-plugin-timer": "1.1.3" }, platforms: { "linux-x64": { package_name: "@openai/codex-linux-x64", target: "x86_64-unknown-linux-musl", binary_name: "codex", sha256: "660e159a49e823ac8e5986cb238f73158ce4b957d40d9292f8de90862644b501" }, "win32-x64": { package_name: "@openai/codex-win32-x64", target: "x86_64-pc-windows-msvc", binary_name: "codex.exe", sha256: "e4c11374bd9de8ad5c3b7617fd4654bb7839901edb0863f9930666863c7a021b" } }, pi_coding_agent_package_name: "@earendil-works/pi-coding-agent", pi_ai_package_name: "@earendil-works/pi-ai", pi_version: "0.85.1", pi_support_packages: ["@earendil-works/pi-agent-core", "@earendil-works/pi-telemetry", "@earendil-works/pi-tui", "@earendil-works/chord"], grok_version: "1.0.30", grok_platforms: { "linux-x64": { package_name: "@xai-official/grok-linux-x64", binary_name: "grok", sha256: "504dd6546ab991b75d36698242875ce461489cd1f8cd84285873cb55bd5c7d54" }, "win32-x64": { package_name: "@xai-official/grok-win32-x64", binary_name: "grok.exe", sha256: "48736d1a4342a801ea26d0ecde4c516b653f791399065adaa55973f83abd8867" } } };
47
47
  }
48
48
  });
49
49
 
@@ -14,7 +14,7 @@ import { dirname as dirname4, relative as relative4, resolve as resolve4 } from
14
14
  import { fileURLToPath } from "node:url";
15
15
 
16
16
  // agent-cli-release.json
17
- var agent_cli_release_default = { package_name: "@vtxmacro/cli", package_version: "2026.10.74", codex_package_name: "@openai/codex", codex_version: "0.155.0", copilot_sdk_package_name: "@github/copilot-sdk", copilot_sdk_version: "1.0.0-beta.8", copilot_cli_package_name: "@github/copilot", copilot_cli_version: "1.0.80", deepseek_harness_version: "0.1.1-rc.2", deepseek_harness_packages: ["@deepseek-ai/dsh-agent", "@deepseek-ai/dsh-agent-instructions", "@deepseek-ai/dsh-agent-loop", "@deepseek-ai/dsh-agent-spine-demo", "@deepseek-ai/dsh-anonymous-user-id", "@deepseek-ai/dsh-atomic-write", "@deepseek-ai/dsh-attachment", "@deepseek-ai/dsh-brand", "@deepseek-ai/dsh-code-runtime", "@deepseek-ai/dsh-credentials", "@deepseek-ai/dsh-fs", "@deepseek-ai/dsh-goal", "@deepseek-ai/dsh-goal-round-driver", "@deepseek-ai/dsh-home-paths", "@deepseek-ai/dsh-invariants", "@deepseek-ai/dsh-jobs", "@deepseek-ai/dsh-jobs-local", "@deepseek-ai/dsh-launch-environment", "@deepseek-ai/dsh-llm", "@deepseek-ai/dsh-llm-deepseek", "@deepseek-ai/dsh-llm-retry", "@deepseek-ai/dsh-output-retention", "@deepseek-ai/dsh-sandbox", "@deepseek-ai/dsh-sandbox-policy", "@deepseek-ai/dsh-scope", "@deepseek-ai/dsh-session", "@deepseek-ai/dsh-session-checkpoint-policy", "@deepseek-ai/dsh-session-persistence", "@deepseek-ai/dsh-session-persistence-jsonl", "@deepseek-ai/dsh-session-projection", "@deepseek-ai/dsh-session-title", "@deepseek-ai/dsh-settings", "@deepseek-ai/dsh-shell", "@deepseek-ai/dsh-shell-env", "@deepseek-ai/dsh-skill", "@deepseek-ai/dsh-skill-filesystem", "@deepseek-ai/dsh-subprocess", "@deepseek-ai/dsh-system-prompt", "@deepseek-ai/dsh-timeout", "@deepseek-ai/dsh-tool-bash", "@deepseek-ai/dsh-tool-goal", "@deepseek-ai/dsh-tool-jobs", "@deepseek-ai/dsh-tool-skill", "@deepseek-ai/dsh-tools", "@deepseek-ai/dsh-typert-protocol", "@deepseek-ai/dsh-user-approval"], deepseek_cordis_package_name: "@deepseek-ai/cordis", deepseek_cordis_version: "4.0.1", deepseek_support_packages: { "@deepseek-ai/cordis-plugin-timer": "1.1.3" }, platforms: { "linux-x64": { package_name: "@openai/codex-linux-x64", target: "x86_64-unknown-linux-musl", binary_name: "codex", sha256: "660e159a49e823ac8e5986cb238f73158ce4b957d40d9292f8de90862644b501" }, "win32-x64": { package_name: "@openai/codex-win32-x64", target: "x86_64-pc-windows-msvc", binary_name: "codex.exe", sha256: "e4c11374bd9de8ad5c3b7617fd4654bb7839901edb0863f9930666863c7a021b" } }, pi_coding_agent_package_name: "@earendil-works/pi-coding-agent", pi_ai_package_name: "@earendil-works/pi-ai", pi_version: "0.85.1", pi_support_packages: ["@earendil-works/pi-agent-core", "@earendil-works/pi-telemetry", "@earendil-works/pi-tui", "@earendil-works/chord"], grok_version: "1.0.30", grok_platforms: { "linux-x64": { package_name: "@xai-official/grok-linux-x64", binary_name: "grok", sha256: "504dd6546ab991b75d36698242875ce461489cd1f8cd84285873cb55bd5c7d54" }, "win32-x64": { package_name: "@xai-official/grok-win32-x64", binary_name: "grok.exe", sha256: "48736d1a4342a801ea26d0ecde4c516b653f791399065adaa55973f83abd8867" } } };
17
+ var agent_cli_release_default = { package_name: "@vtxmacro/cli", package_version: "2026.10.75", codex_package_name: "@openai/codex", codex_version: "0.155.0", copilot_sdk_package_name: "@github/copilot-sdk", copilot_sdk_version: "1.0.0-beta.8", copilot_cli_package_name: "@github/copilot", copilot_cli_version: "1.0.80", deepseek_harness_version: "0.1.1-rc.2", deepseek_harness_packages: ["@deepseek-ai/dsh-agent", "@deepseek-ai/dsh-agent-instructions", "@deepseek-ai/dsh-agent-loop", "@deepseek-ai/dsh-agent-spine-demo", "@deepseek-ai/dsh-anonymous-user-id", "@deepseek-ai/dsh-atomic-write", "@deepseek-ai/dsh-attachment", "@deepseek-ai/dsh-brand", "@deepseek-ai/dsh-code-runtime", "@deepseek-ai/dsh-credentials", "@deepseek-ai/dsh-fs", "@deepseek-ai/dsh-goal", "@deepseek-ai/dsh-goal-round-driver", "@deepseek-ai/dsh-home-paths", "@deepseek-ai/dsh-invariants", "@deepseek-ai/dsh-jobs", "@deepseek-ai/dsh-jobs-local", "@deepseek-ai/dsh-launch-environment", "@deepseek-ai/dsh-llm", "@deepseek-ai/dsh-llm-deepseek", "@deepseek-ai/dsh-llm-retry", "@deepseek-ai/dsh-output-retention", "@deepseek-ai/dsh-sandbox", "@deepseek-ai/dsh-sandbox-policy", "@deepseek-ai/dsh-scope", "@deepseek-ai/dsh-session", "@deepseek-ai/dsh-session-checkpoint-policy", "@deepseek-ai/dsh-session-persistence", "@deepseek-ai/dsh-session-persistence-jsonl", "@deepseek-ai/dsh-session-projection", "@deepseek-ai/dsh-session-title", "@deepseek-ai/dsh-settings", "@deepseek-ai/dsh-shell", "@deepseek-ai/dsh-shell-env", "@deepseek-ai/dsh-skill", "@deepseek-ai/dsh-skill-filesystem", "@deepseek-ai/dsh-subprocess", "@deepseek-ai/dsh-system-prompt", "@deepseek-ai/dsh-timeout", "@deepseek-ai/dsh-tool-bash", "@deepseek-ai/dsh-tool-goal", "@deepseek-ai/dsh-tool-jobs", "@deepseek-ai/dsh-tool-skill", "@deepseek-ai/dsh-tools", "@deepseek-ai/dsh-typert-protocol", "@deepseek-ai/dsh-user-approval"], deepseek_cordis_package_name: "@deepseek-ai/cordis", deepseek_cordis_version: "4.0.1", deepseek_support_packages: { "@deepseek-ai/cordis-plugin-timer": "1.1.3" }, platforms: { "linux-x64": { package_name: "@openai/codex-linux-x64", target: "x86_64-unknown-linux-musl", binary_name: "codex", sha256: "660e159a49e823ac8e5986cb238f73158ce4b957d40d9292f8de90862644b501" }, "win32-x64": { package_name: "@openai/codex-win32-x64", target: "x86_64-pc-windows-msvc", binary_name: "codex.exe", sha256: "e4c11374bd9de8ad5c3b7617fd4654bb7839901edb0863f9930666863c7a021b" } }, pi_coding_agent_package_name: "@earendil-works/pi-coding-agent", pi_ai_package_name: "@earendil-works/pi-ai", pi_version: "0.85.1", pi_support_packages: ["@earendil-works/pi-agent-core", "@earendil-works/pi-telemetry", "@earendil-works/pi-tui", "@earendil-works/chord"], grok_version: "1.0.30", grok_platforms: { "linux-x64": { package_name: "@xai-official/grok-linux-x64", binary_name: "grok", sha256: "504dd6546ab991b75d36698242875ce461489cd1f8cd84285873cb55bd5c7d54" }, "win32-x64": { package_name: "@xai-official/grok-win32-x64", binary_name: "grok.exe", sha256: "48736d1a4342a801ea26d0ecde4c516b653f791399065adaa55973f83abd8867" } } };
18
18
 
19
19
  // lib/runtime-policy.generated.json
20
20
  var runtime_policy_generated_default = {
package/bin/vtx.js CHANGED
@@ -122,7 +122,7 @@ var init_routing = __esm({
122
122
  var agent_cli_release_default;
123
123
  var init_agent_cli_release = __esm({
124
124
  "agent-cli-release.json"() {
125
- agent_cli_release_default = { package_name: "@vtxmacro/cli", package_version: "2026.10.74", codex_package_name: "@openai/codex", codex_version: "0.155.0", copilot_sdk_package_name: "@github/copilot-sdk", copilot_sdk_version: "1.0.0-beta.8", copilot_cli_package_name: "@github/copilot", copilot_cli_version: "1.0.80", deepseek_harness_version: "0.1.1-rc.2", deepseek_harness_packages: ["@deepseek-ai/dsh-agent", "@deepseek-ai/dsh-agent-instructions", "@deepseek-ai/dsh-agent-loop", "@deepseek-ai/dsh-agent-spine-demo", "@deepseek-ai/dsh-anonymous-user-id", "@deepseek-ai/dsh-atomic-write", "@deepseek-ai/dsh-attachment", "@deepseek-ai/dsh-brand", "@deepseek-ai/dsh-code-runtime", "@deepseek-ai/dsh-credentials", "@deepseek-ai/dsh-fs", "@deepseek-ai/dsh-goal", "@deepseek-ai/dsh-goal-round-driver", "@deepseek-ai/dsh-home-paths", "@deepseek-ai/dsh-invariants", "@deepseek-ai/dsh-jobs", "@deepseek-ai/dsh-jobs-local", "@deepseek-ai/dsh-launch-environment", "@deepseek-ai/dsh-llm", "@deepseek-ai/dsh-llm-deepseek", "@deepseek-ai/dsh-llm-retry", "@deepseek-ai/dsh-output-retention", "@deepseek-ai/dsh-sandbox", "@deepseek-ai/dsh-sandbox-policy", "@deepseek-ai/dsh-scope", "@deepseek-ai/dsh-session", "@deepseek-ai/dsh-session-checkpoint-policy", "@deepseek-ai/dsh-session-persistence", "@deepseek-ai/dsh-session-persistence-jsonl", "@deepseek-ai/dsh-session-projection", "@deepseek-ai/dsh-session-title", "@deepseek-ai/dsh-settings", "@deepseek-ai/dsh-shell", "@deepseek-ai/dsh-shell-env", "@deepseek-ai/dsh-skill", "@deepseek-ai/dsh-skill-filesystem", "@deepseek-ai/dsh-subprocess", "@deepseek-ai/dsh-system-prompt", "@deepseek-ai/dsh-timeout", "@deepseek-ai/dsh-tool-bash", "@deepseek-ai/dsh-tool-goal", "@deepseek-ai/dsh-tool-jobs", "@deepseek-ai/dsh-tool-skill", "@deepseek-ai/dsh-tools", "@deepseek-ai/dsh-typert-protocol", "@deepseek-ai/dsh-user-approval"], deepseek_cordis_package_name: "@deepseek-ai/cordis", deepseek_cordis_version: "4.0.1", deepseek_support_packages: { "@deepseek-ai/cordis-plugin-timer": "1.1.3" }, platforms: { "linux-x64": { package_name: "@openai/codex-linux-x64", target: "x86_64-unknown-linux-musl", binary_name: "codex", sha256: "660e159a49e823ac8e5986cb238f73158ce4b957d40d9292f8de90862644b501" }, "win32-x64": { package_name: "@openai/codex-win32-x64", target: "x86_64-pc-windows-msvc", binary_name: "codex.exe", sha256: "e4c11374bd9de8ad5c3b7617fd4654bb7839901edb0863f9930666863c7a021b" } }, pi_coding_agent_package_name: "@earendil-works/pi-coding-agent", pi_ai_package_name: "@earendil-works/pi-ai", pi_version: "0.85.1", pi_support_packages: ["@earendil-works/pi-agent-core", "@earendil-works/pi-telemetry", "@earendil-works/pi-tui", "@earendil-works/chord"], grok_version: "1.0.30", grok_platforms: { "linux-x64": { package_name: "@xai-official/grok-linux-x64", binary_name: "grok", sha256: "504dd6546ab991b75d36698242875ce461489cd1f8cd84285873cb55bd5c7d54" }, "win32-x64": { package_name: "@xai-official/grok-win32-x64", binary_name: "grok.exe", sha256: "48736d1a4342a801ea26d0ecde4c516b653f791399065adaa55973f83abd8867" } } };
125
+ agent_cli_release_default = { package_name: "@vtxmacro/cli", package_version: "2026.10.75", codex_package_name: "@openai/codex", codex_version: "0.155.0", copilot_sdk_package_name: "@github/copilot-sdk", copilot_sdk_version: "1.0.0-beta.8", copilot_cli_package_name: "@github/copilot", copilot_cli_version: "1.0.80", deepseek_harness_version: "0.1.1-rc.2", deepseek_harness_packages: ["@deepseek-ai/dsh-agent", "@deepseek-ai/dsh-agent-instructions", "@deepseek-ai/dsh-agent-loop", "@deepseek-ai/dsh-agent-spine-demo", "@deepseek-ai/dsh-anonymous-user-id", "@deepseek-ai/dsh-atomic-write", "@deepseek-ai/dsh-attachment", "@deepseek-ai/dsh-brand", "@deepseek-ai/dsh-code-runtime", "@deepseek-ai/dsh-credentials", "@deepseek-ai/dsh-fs", "@deepseek-ai/dsh-goal", "@deepseek-ai/dsh-goal-round-driver", "@deepseek-ai/dsh-home-paths", "@deepseek-ai/dsh-invariants", "@deepseek-ai/dsh-jobs", "@deepseek-ai/dsh-jobs-local", "@deepseek-ai/dsh-launch-environment", "@deepseek-ai/dsh-llm", "@deepseek-ai/dsh-llm-deepseek", "@deepseek-ai/dsh-llm-retry", "@deepseek-ai/dsh-output-retention", "@deepseek-ai/dsh-sandbox", "@deepseek-ai/dsh-sandbox-policy", "@deepseek-ai/dsh-scope", "@deepseek-ai/dsh-session", "@deepseek-ai/dsh-session-checkpoint-policy", "@deepseek-ai/dsh-session-persistence", "@deepseek-ai/dsh-session-persistence-jsonl", "@deepseek-ai/dsh-session-projection", "@deepseek-ai/dsh-session-title", "@deepseek-ai/dsh-settings", "@deepseek-ai/dsh-shell", "@deepseek-ai/dsh-shell-env", "@deepseek-ai/dsh-skill", "@deepseek-ai/dsh-skill-filesystem", "@deepseek-ai/dsh-subprocess", "@deepseek-ai/dsh-system-prompt", "@deepseek-ai/dsh-timeout", "@deepseek-ai/dsh-tool-bash", "@deepseek-ai/dsh-tool-goal", "@deepseek-ai/dsh-tool-jobs", "@deepseek-ai/dsh-tool-skill", "@deepseek-ai/dsh-tools", "@deepseek-ai/dsh-typert-protocol", "@deepseek-ai/dsh-user-approval"], deepseek_cordis_package_name: "@deepseek-ai/cordis", deepseek_cordis_version: "4.0.1", deepseek_support_packages: { "@deepseek-ai/cordis-plugin-timer": "1.1.3" }, platforms: { "linux-x64": { package_name: "@openai/codex-linux-x64", target: "x86_64-unknown-linux-musl", binary_name: "codex", sha256: "660e159a49e823ac8e5986cb238f73158ce4b957d40d9292f8de90862644b501" }, "win32-x64": { package_name: "@openai/codex-win32-x64", target: "x86_64-pc-windows-msvc", binary_name: "codex.exe", sha256: "e4c11374bd9de8ad5c3b7617fd4654bb7839901edb0863f9930666863c7a021b" } }, pi_coding_agent_package_name: "@earendil-works/pi-coding-agent", pi_ai_package_name: "@earendil-works/pi-ai", pi_version: "0.85.1", pi_support_packages: ["@earendil-works/pi-agent-core", "@earendil-works/pi-telemetry", "@earendil-works/pi-tui", "@earendil-works/chord"], grok_version: "1.0.30", grok_platforms: { "linux-x64": { package_name: "@xai-official/grok-linux-x64", binary_name: "grok", sha256: "504dd6546ab991b75d36698242875ce461489cd1f8cd84285873cb55bd5c7d54" }, "win32-x64": { package_name: "@xai-official/grok-win32-x64", binary_name: "grok.exe", sha256: "48736d1a4342a801ea26d0ecde4c516b653f791399065adaa55973f83abd8867" } } };
126
126
  }
127
127
  });
128
128
 
@@ -3262,7 +3262,8 @@ var init_shared_contracts_generated = __esm({
3262
3262
  "position_changed": "Your {symbol} position changed just before VTX sent this, so nothing was sent. Check the position and try again.",
3263
3263
  "trailing_stop_unavailable": "MetaTrader 5 has no trailing stop loss.",
3264
3264
  "trading_unavailable": "Trading on MetaTrader 5 is not available yet.",
3265
- "action_unavailable": "This action isn't available for MetaTrader 5 bots."
3265
+ "action_unavailable": "This action isn't available for MetaTrader 5 bots.",
3266
+ "account_currency_unavailable": "VTX bots trade MetaTrader 5 accounts in US dollars. Connect an account in US dollars to run this bot."
3266
3267
  };
3267
3268
  }
3268
3269
  });
@@ -62129,6 +62130,17 @@ var init_open_orders = __esm({
62129
62130
  }
62130
62131
  });
62131
62132
 
62133
+ // lib/api/positions.ts
62134
+ var init_positions = __esm({
62135
+ "lib/api/positions.ts"() {
62136
+ "use strict";
62137
+ init_define_VTX_CLAUDE_CODE_POLICY();
62138
+ init_define_VTX_EXO_POLICY();
62139
+ init_define_VTX_GROK_POLICY();
62140
+ init_define_VTX_PI_MODEL_POLICY();
62141
+ }
62142
+ });
62143
+
62132
62144
  // lib/api/screener.ts
62133
62145
  var init_screener = __esm({
62134
62146
  "lib/api/screener.ts"() {
@@ -100534,6 +100546,7 @@ var init_api2 = __esm({
100534
100546
  init_billing();
100535
100547
  init_market_data();
100536
100548
  init_open_orders();
100549
+ init_positions();
100537
100550
  init_screener();
100538
100551
  init_client_host_commands();
100539
100552
  init_client_exchange_mutation_begin();
@@ -104646,7 +104659,7 @@ var init_rejection = __esm({
104646
104659
  });
104647
104660
 
104648
104661
  // lib/runtime/exchange-executor/mt5/market.ts
104649
- var mt5AccountOf, decimalPlaces, fixedDecimals, toScaled, fromScaled, multiplyDecimals, addDecimals, negateDecimal, lotsToUnits, roundSteps, unitsToLots, formatLots, lotsWithinLimits, formatMt5Price, symbolRefused, readMt5Market;
104662
+ var mt5AccountOf, decimalPlaces, fixedDecimals, toScaled, fromScaled, multiplyDecimals, addDecimals, negateDecimal, lotsToUnits, roundSteps, unitsToLots, formatLots, lotsWithinLimits, formatMt5Price, symbolRefused, mt5QuoteRate, mt5ValuationRefused, readMt5Market;
104650
104663
  var init_market = __esm({
104651
104664
  "lib/runtime/exchange-executor/mt5/market.ts"() {
104652
104665
  "use strict";
@@ -104715,15 +104728,18 @@ var init_market = __esm({
104715
104728
  return fromScaled(BigInt(ticks) * BigInt(tickScaled), market.priceDecimals);
104716
104729
  };
104717
104730
  symbolRefused = (message, reason = "invalid_order") => new Mt5RefusalError(message, { definitive: true, reason, metadataRetry: null }, { applied: false });
104731
+ mt5QuoteRate = (calc, pricedInAccountCurrency) => {
104732
+ if (pricedInAccountCurrency) return 1;
104733
+ const rate = Number(calc.tick_value) / (Number(calc.tick_size) * Number(calc.contract_size));
104734
+ return Number.isFinite(rate) && rate > 0 ? rate : null;
104735
+ };
104736
+ mt5ValuationRefused = (name) => symbolRefused(`MetaTrader 5 cannot value ${name} in the account's currency.`, "other");
104718
104737
  readMt5Market = async (profileId, symbol2, accountState, signal) => {
104719
104738
  const [[listed], state2] = await Promise.all([getMt5Markets(profileId, signal, symbol2), accountState(signal)]);
104720
104739
  if (!listed) throw symbolRefused(`MetaTrader 5 does not list ${symbol2} for this account.`);
104721
104740
  const name = listed.symbol;
104722
104741
  const accountCurrency = String(state2.account.currency ?? "").trim();
104723
- const profitCurrency = String(listed.quote_symbol ?? "").trim();
104724
- if (!accountCurrency || profitCurrency !== accountCurrency) {
104725
- throw symbolRefused(`${name} is not quoted in the account's currency; VTX trades only such MetaTrader 5 symbols.`, "other");
104726
- }
104742
+ const pricedInAccountCurrency = accountCurrency !== "" && String(listed.quote_symbol ?? "").trim() === accountCurrency;
104727
104743
  const stepDecimals = Number(listed.sz_decimals);
104728
104744
  if (!Number.isInteger(stepDecimals) || stepDecimals < 0) {
104729
104745
  throw new RuntimeReasonError(`MetaTrader 5 market figures for ${name} are malformed.`, "internal_data_error");
@@ -104735,6 +104751,7 @@ var init_market = __esm({
104735
104751
  if (!(contractSize > 0) || !(Number(calc.volume_step) > 0) || !(Number(calc.tick_size) > 0)) {
104736
104752
  throw new RuntimeReasonError(`MetaTrader 5 market figures for ${name} are malformed.`, "internal_data_error");
104737
104753
  }
104754
+ if (mt5QuoteRate(calc, pricedInAccountCurrency) === null) throw mt5ValuationRefused(name);
104738
104755
  return {
104739
104756
  exchange: "mt5",
104740
104757
  // The name the bridge reads and writes the market by.
@@ -104755,6 +104772,7 @@ var init_market = __esm({
104755
104772
  point: DECIMAL_RADIX ** -priceDecimals,
104756
104773
  stopsLevel: Number.isSafeInteger(calc.stops_level) && calc.stops_level > 0 ? calc.stops_level : 0,
104757
104774
  accountCurrency,
104775
+ pricedInAccountCurrency,
104758
104776
  marginMode: state2.account.margin_mode
104759
104777
  };
104760
104778
  };
@@ -104763,7 +104781,7 @@ var init_market = __esm({
104763
104781
 
104764
104782
  // lib/runtime/exchange-executor/mt5/positions.ts
104765
104783
  var OPENED_EARLIER, LOOKBACK_MS, CLOCK_ALLOWANCE_MS, CLOSING_ENTRIES, signed2, heldLots, readLookbackDeals, lookbackOnce, isTrade, mt5PositionOwners, vtxTradeDeals, mt5LegClosedBy, walkMt5Positions, mergeDeals, symbolTickets, createMt5Positions;
104766
- var init_positions = __esm({
104784
+ var init_positions2 = __esm({
104767
104785
  "lib/runtime/exchange-executor/mt5/positions.ts"() {
104768
104786
  "use strict";
104769
104787
  init_define_VTX_CLAUDE_CODE_POLICY();
@@ -105257,7 +105275,7 @@ var init_refusal_messages = __esm({
105257
105275
  });
105258
105276
 
105259
105277
  // lib/runtime/exchange-executor/mt5/reads.ts
105260
- var mt5MarketKey, accountAndMarket, LEG_ORDER_TYPES, MT5_LEGS, vtxTickets, vtxOrders, legLevel, closingSide, signed3, signedUnits, latestUpdateMs, ticketsPosition, readMt5Position, readLeg, shownLevel, legRow, mt5HistoryBehindMessage, heldOpening, readMt5OpenOrders, terminalStatuses, evidence, unresolved, unknownOrder, legEnded, readHeldLegStatus, opensElsewhere, beginsInside, readLegStatus, HISTORY_ORDER_STATUSES, orderShape, filledEvidence, readTicketStatus, readClientIdStatus, readMt5OrderStatus, lookbackTradeDeals, readMt5Fills, readMt5Mark, readMt5BidAsk, readMt5Quote;
105278
+ var mt5MarketKey, accountAndMarket, LEG_ORDER_TYPES, MT5_LEGS, vtxTickets, vtxOrders, legLevel, closingSide, signed3, signedUnits, latestUpdateMs, ticketsPosition, readMt5Position, readLeg, shownLevel, legRow, mt5HistoryBehindMessage, heldOpening, readMt5OpenOrders, terminalStatuses, evidence, unresolved, unknownOrder, legEnded, readHeldLegStatus, opensElsewhere, beginsInside, readLegStatus, HISTORY_ORDER_STATUSES, orderShape, filledEvidence, readTicketStatus, readClientIdStatus, readMt5OrderStatus, lookbackTradeDeals, readMt5Fills, readMt5Mark, readMt5BidAsk, readMt5QuoteRate, readMt5Quote;
105261
105279
  var init_reads = __esm({
105262
105280
  "lib/runtime/exchange-executor/mt5/reads.ts"() {
105263
105281
  "use strict";
@@ -105276,7 +105294,7 @@ var init_reads = __esm({
105276
105294
  init_deal_fills();
105277
105295
  init_refusal_messages();
105278
105296
  init_market();
105279
- init_positions();
105297
+ init_positions2();
105280
105298
  mt5MarketKey = (name) => normalizeHyperliquidMarketSymbol(name);
105281
105299
  accountAndMarket = async (deps, symbol2, signal) => {
105282
105300
  const [state2, market] = await Promise.all([deps.accountState(signal), deps.market(symbol2, signal)]);
@@ -105313,7 +105331,8 @@ var init_reads = __esm({
105313
105331
  };
105314
105332
  readMt5Position = async (deps, symbol2, signal) => {
105315
105333
  const [state2, market] = await accountAndMarket(deps, symbol2, signal);
105316
- return ticketsPosition(state2, market, await vtxTickets(deps, state2, symbol2, signal));
105334
+ const position = ticketsPosition(state2, market, await vtxTickets(deps, state2, symbol2, signal));
105335
+ return { ...position, quoteRate: await readMt5QuoteRate(deps, market, signal) };
105317
105336
  };
105318
105337
  readLeg = async (deps, symbol2, tickets, leg) => {
105319
105338
  const levels = tickets.map((ticket) => legLevel(ticket[leg]));
@@ -105357,6 +105376,7 @@ var init_reads = __esm({
105357
105376
  readMt5OpenOrders = async (deps, symbol2, signal) => {
105358
105377
  const [state2, market] = await accountAndMarket(deps, symbol2, signal);
105359
105378
  const orders = vtxOrders(state2, deps.profileId, symbol2);
105379
+ const rate = orders.length > 0 ? await readMt5QuoteRate(deps, market, signal) : 1;
105360
105380
  const pending3 = mt5OpenOrderRows(orders, market.accountCurrency).map((row) => {
105361
105381
  const order = orders.find((candidate) => candidate.ticket === row.oid);
105362
105382
  const size = Number(lotsToUnits(market, String(order?.volume_current ?? "0")));
@@ -105365,7 +105385,8 @@ var init_reads = __esm({
105365
105385
  coin: mt5MarketKey(row.coin),
105366
105386
  sz: size,
105367
105387
  orig_sz: Number(lotsToUnits(market, String(order?.volume_initial ?? "0"))),
105368
- order_value: row.limit_px * size,
105388
+ // In the account's money (./market.ts mt5QuoteRate).
105389
+ order_value: row.limit_px * size * rate,
105369
105390
  ...row.is_trigger ? { trigger_px: row.limit_px } : {}
105370
105391
  };
105371
105392
  });
@@ -105622,9 +105643,10 @@ var init_reads = __esm({
105622
105643
  hash: "",
105623
105644
  crossed: true
105624
105645
  }));
105646
+ const rate = trades.length > 0 ? await readMt5QuoteRate(deps, market, signal) : 1;
105625
105647
  const tradeHistory = trades.map((trade, index) => {
105626
105648
  const size = Number(rawFills[index].sz);
105627
- return { ...trade, coin: mt5MarketKey(trade.coin), size, value: trade.price * size };
105649
+ return { ...trade, coin: mt5MarketKey(trade.coin), size, value: trade.price * size * rate };
105628
105650
  });
105629
105651
  return {
105630
105652
  rawFills,
@@ -105644,6 +105666,13 @@ var init_reads = __esm({
105644
105666
  const calc = await calcMt5Symbol(deps.profileId, { symbol: market.symbol, side: "buy", volume: market.volumeMin }, signal);
105645
105667
  return { bid: calc.bid, ask: calc.ask };
105646
105668
  };
105669
+ readMt5QuoteRate = async (deps, market, signal) => {
105670
+ if (market.pricedInAccountCurrency) return 1;
105671
+ const calc = await calcMt5Symbol(deps.profileId, { symbol: market.symbol, side: "buy", volume: market.volumeMin }, signal);
105672
+ const rate = mt5QuoteRate(calc, false);
105673
+ if (rate === null) throw mt5ValuationRefused(market.symbol);
105674
+ return rate;
105675
+ };
105647
105676
  readMt5Quote = async (deps, symbol2, signal) => {
105648
105677
  const market = await deps.market(symbol2, signal);
105649
105678
  const calc = await calcMt5Symbol(deps.profileId, { symbol: market.symbol, side: "buy", volume: market.volumeMin }, signal);
@@ -105665,7 +105694,7 @@ var init_account = __esm({
105665
105694
  init_constants();
105666
105695
  init_hyperliquid_account_contract();
105667
105696
  init_market();
105668
- init_positions();
105697
+ init_positions2();
105669
105698
  init_reads();
105670
105699
  amount = (text2) => {
105671
105700
  const value = Number(text2);
@@ -105690,12 +105719,15 @@ var init_account = __esm({
105690
105719
  leverage: state2.account.leverage,
105691
105720
  margin_used: null,
105692
105721
  liquidation_price: null,
105693
- funding_usdc: tickets.reduce((total, ticket) => total + (amount(ticket.swap) ?? 0), 0)
105722
+ funding_usdc: tickets.reduce((total, ticket) => total + (amount(ticket.swap) ?? 0), 0),
105723
+ quote_rate: await readMt5QuoteRate(deps, market, signal)
105694
105724
  };
105695
105725
  };
105696
105726
  tradable = async (deps, freeMargin, symbol2, signal) => {
105697
105727
  const market = await deps.market(symbol2, signal);
105698
105728
  const calc = await calcMt5Symbol(deps.profileId, { symbol: market.symbol, side: "buy", volume: market.volumeStep }, signal);
105729
+ const rate = mt5QuoteRate(calc, market.pricedInAccountCurrency);
105730
+ if (rate === null) throw mt5ValuationRefused(market.symbol);
105699
105731
  const stepMargin = Number(calc.margin);
105700
105732
  const mark = (Number(calc.bid) + Number(calc.ask)) / MIDPOINT_DIVISOR;
105701
105733
  const steps = stepMargin > 0 ? Math.floor(Math.max(0, freeMargin) / stepMargin) : 0;
@@ -105704,11 +105736,12 @@ var init_account = __esm({
105704
105736
  return {
105705
105737
  symbol: mt5MarketKey(market.symbol),
105706
105738
  market_type: "mt5",
105707
- available_to_trade_buy: size * mark,
105708
- available_to_trade_sell: size * mark,
105739
+ available_to_trade_buy: size * mark * rate,
105740
+ available_to_trade_sell: size * mark * rate,
105709
105741
  max_trade_size_buy: size,
105710
105742
  max_trade_size_sell: size,
105711
105743
  mark_price: Number.isFinite(mark) ? mark : 0,
105744
+ quote_rate: rate,
105712
105745
  source: "exchange"
105713
105746
  };
105714
105747
  };
@@ -106070,7 +106103,7 @@ var init_account_scope = __esm({
106070
106103
  init_define_VTX_EXO_POLICY();
106071
106104
  init_define_VTX_GROK_POLICY();
106072
106105
  init_define_VTX_PI_MODEL_POLICY();
106073
- init_positions();
106106
+ init_positions2();
106074
106107
  init_reads();
106075
106108
  init_refusal_messages();
106076
106109
  init_ticket_sides();
@@ -106092,7 +106125,7 @@ var init_account_scope = __esm({
106092
106125
  };
106093
106126
  readMt5AccountPosition = async (deps, symbol2, signal) => {
106094
106127
  const [state2, market] = await accountAndMarket(deps, symbol2, signal);
106095
- return ticketsPosition(state2, market, accountScopeTickets(state2, symbol2));
106128
+ return { ...ticketsPosition(state2, market, accountScopeTickets(state2, symbol2)), quoteRate: await readMt5QuoteRate(deps, market, signal) };
106096
106129
  };
106097
106130
  readMt5AccountOpenOrders = async (deps, symbol2, signal) => {
106098
106131
  const state2 = await deps.accountState(signal);
@@ -106187,7 +106220,7 @@ var init_operations = __esm({
106187
106220
  init_exchange();
106188
106221
  init_identity();
106189
106222
  init_market();
106190
- init_positions();
106223
+ init_positions2();
106191
106224
  init_account_scope();
106192
106225
  init_reads();
106193
106226
  init_stop_distance();
@@ -106463,6 +106496,16 @@ var init_operations = __esm({
106463
106496
  members: placed.members.map((member, index) => index > 0 && refused ? { ...member, state: "rejected", refusal: PARTLY_SET } : member)
106464
106497
  };
106465
106498
  };
106499
+ const valued = async (input, answer2) => {
106500
+ if (!answer2.members.some((member) => member.state === "filled")) return answer2;
106501
+ try {
106502
+ const figures = await deps.market(input.symbol, input.signal);
106503
+ const quoteRate = await readMt5QuoteRate(deps, figures, input.signal);
106504
+ return { ...answer2, members: answer2.members.map((member) => member.state === "filled" ? { ...member, quoteRate } : member) };
106505
+ } catch {
106506
+ return answer2;
106507
+ }
106508
+ };
106466
106509
  const placeOrder = async (input) => {
106467
106510
  const { symbol: symbol2, side, intent } = input;
106468
106511
  if (intent.kind === "trigger") {
@@ -106477,9 +106520,9 @@ var init_operations = __esm({
106477
106520
  }
106478
106521
  if (input.reduceOnly) {
106479
106522
  if (intent.kind !== "market") throw refuseMt5Write("MetaTrader 5 has no reduce-only resting orders.", { reason: "reduce_only" });
106480
- return closeTickets(input, intent);
106523
+ return valued(input, await closeTickets(input, intent));
106481
106524
  }
106482
- return enter(input, intent);
106525
+ return valued(input, await enter(input, intent));
106483
106526
  };
106484
106527
  const placeGroup = async (input) => {
106485
106528
  const legOf = (member) => member.reduceOnly && member.intent.kind === "trigger" ? member.intent.isTakeProfit ? "tp" : "sl" : null;
@@ -106641,7 +106684,8 @@ var init_runtime_writes = __esm({
106641
106684
  memberStatus = (member) => {
106642
106685
  if (member.state === "filled") {
106643
106686
  const oids = member.filledOrderIds ? { oids: member.filledOrderIds.map(Number) } : {};
106644
- return { filled: { totalSz: String(member.filledSize), avgPx: String(member.avgPx), oid: Number(member.orderId), ...oids } };
106687
+ const rate = member.quoteRate != null ? { quote_rate: member.quoteRate } : {};
106688
+ return { filled: { totalSz: String(member.filledSize), avgPx: String(member.avgPx), oid: Number(member.orderId), ...oids, ...rate } };
106645
106689
  }
106646
106690
  if (member.state === "open") return { resting: { oid: Number(member.orderId) } };
106647
106691
  if (member.withheld) return { withheld: member.withheld };
@@ -106896,7 +106940,7 @@ var init_mt5 = __esm({
106896
106940
  init_runtime_writes();
106897
106941
  init_leg_writes();
106898
106942
  init_market();
106899
- init_positions();
106943
+ init_positions2();
106900
106944
  init_account_scope();
106901
106945
  init_reads();
106902
106946
  refuse = refuseMt5Capability;
@@ -107038,7 +107082,8 @@ var init_mt5 = __esm({
107038
107082
  realized_pnl: null,
107039
107083
  leverage: null,
107040
107084
  margin_used: null,
107041
- liquidation_price: null
107085
+ liquidation_price: null,
107086
+ quote_rate: snapshot.quoteRate
107042
107087
  };
107043
107088
  },
107044
107089
  orderStatusEvidence: async (input) => readMt5OrderStatus(deps, await listed(marketOf(input.symbol, "order-status"), input.signal), input.orderId, input.signal),
@@ -108101,6 +108146,24 @@ var init_protective_user_cancels = __esm({
108101
108146
  }
108102
108147
  });
108103
108148
 
108149
+ // lib/runtime/position-value.ts
108150
+ var quoteRateOf;
108151
+ var init_position_value = __esm({
108152
+ "lib/runtime/position-value.ts"() {
108153
+ "use strict";
108154
+ init_define_VTX_CLAUDE_CODE_POLICY();
108155
+ init_define_VTX_EXO_POLICY();
108156
+ init_define_VTX_GROK_POLICY();
108157
+ init_define_VTX_PI_MODEL_POLICY();
108158
+ init_runtime_error_reason_rules();
108159
+ quoteRateOf = (rate) => {
108160
+ if (rate == null) return 1;
108161
+ if (!(Number.isFinite(rate) && rate > 0)) throw new RuntimeReasonError(`A market's quote rate is invalid (${rate}).`, "internal_data_error");
108162
+ return rate;
108163
+ };
108164
+ }
108165
+ });
108166
+
108104
108167
  // lib/runtime/prompt-number-contract.ts
108105
108168
  var finiteNumber3, roundPromptFixed, roundPromptSignificant, roundPromptRelativeVolume, roundPromptNonnegativeUnits;
108106
108169
  var init_prompt_number_contract = __esm({
@@ -108169,7 +108232,7 @@ var init_prompt_number_contract = __esm({
108169
108232
  });
108170
108233
 
108171
108234
  // lib/runtime/execution-guard-contract.ts
108172
- var unitsFromPosition, signedUnitsFromPosition, signedUnitsFromEntryPosition, classifyExecutionIntent, reductionFirstOrder, orderMetadataRetryReason, copyClosingSize, copyOrderClosingSize, copyOrderNotionalCap, resolveExecutionTarget, decisionOrderSizeAsset, flipExecutionLegs, executedOrderPositionEvent;
108235
+ var unitsFromPosition, signedUnitsFromPosition, signedUnitsFromEntryPosition, contextSignedUnits, signedUnitsOfPosition, classifyExecutionIntent, reductionFirstOrder, orderMetadataRetryReason, copyClosingSize, copyOrderClosingSize, copyOrderNotionalCap, resolveExecutionTarget, decisionOrderSizeAsset, flipExecutionLegs, executedOrderPositionEvent;
108173
108236
  var init_execution_guard_contract = __esm({
108174
108237
  "lib/runtime/execution-guard-contract.ts"() {
108175
108238
  "use strict";
@@ -108178,8 +108241,9 @@ var init_execution_guard_contract = __esm({
108178
108241
  init_define_VTX_GROK_POLICY();
108179
108242
  init_define_VTX_PI_MODEL_POLICY();
108180
108243
  init_constants();
108244
+ init_position_value();
108181
108245
  init_prompt_number_contract();
108182
- unitsFromPosition = (size, price, unitSizeUsdc) => {
108246
+ unitsFromPosition = (size, price, unitSizeUsdc, quoteRate) => {
108183
108247
  const sizeValue = Number(size ?? 0);
108184
108248
  const priceValue = Number(price ?? 0);
108185
108249
  const unitSizeValue = Number(unitSizeUsdc ?? 0);
@@ -108189,17 +108253,17 @@ var init_execution_guard_contract = __esm({
108189
108253
  if (sizeValue === 0 || priceValue <= 0 || unitSizeValue <= 0) {
108190
108254
  return 0;
108191
108255
  }
108192
- return Math.max(1, roundPromptNonnegativeUnits(Math.abs(sizeValue * priceValue) / unitSizeValue));
108256
+ return Math.max(1, roundPromptNonnegativeUnits(Math.abs(sizeValue * priceValue * quoteRateOf(quoteRate)) / unitSizeValue));
108193
108257
  };
108194
- signedUnitsFromPosition = (size, price, unitSizeUsdc) => {
108195
- const units = unitsFromPosition(size, price, unitSizeUsdc);
108258
+ signedUnitsFromPosition = (size, price, unitSizeUsdc, quoteRate) => {
108259
+ const units = unitsFromPosition(size, price, unitSizeUsdc, quoteRate);
108196
108260
  const sizeValue = Number(size ?? 0);
108197
108261
  if (!Number.isFinite(sizeValue)) {
108198
108262
  return 0;
108199
108263
  }
108200
108264
  return sizeValue < 0 ? -units : units;
108201
108265
  };
108202
- signedUnitsFromEntryPosition = (size, entryPrice, unitSizeUsdc) => {
108266
+ signedUnitsFromEntryPosition = (size, entryPrice, unitSizeUsdc, quoteRate) => {
108203
108267
  const sizeValue = Number(size);
108204
108268
  if (!Number.isFinite(sizeValue)) throw new Error("Position size is invalid for execution unit classification.");
108205
108269
  if (sizeValue === 0) return 0;
@@ -108208,8 +108272,15 @@ var init_execution_guard_contract = __esm({
108208
108272
  if (!Number.isFinite(entry) || entry <= 0 || !Number.isFinite(unit) || unit <= 0) {
108209
108273
  throw new Error("Position entry price and unit size must be positive for execution unit classification.");
108210
108274
  }
108211
- return signedUnitsFromPosition(sizeValue, entry, unit);
108275
+ return signedUnitsFromPosition(sizeValue, entry, unit, quoteRate);
108212
108276
  };
108277
+ contextSignedUnits = (context) => signedUnitsFromEntryPosition(
108278
+ Number.isFinite(context.currentPositionSize) ? context.currentPositionSize : 0,
108279
+ context.currentPositionEntryPrice,
108280
+ context.unitSizeUsdc,
108281
+ quoteRateOf(context.currentPositionQuoteRate)
108282
+ );
108283
+ signedUnitsOfPosition = (position, unitSize) => signedUnitsFromEntryPosition(position.size, position.entry_price, unitSize, quoteRateOf(position.quote_rate));
108213
108284
  classifyExecutionIntent = (action, requestedUnits, snapshotSignedUnits) => {
108214
108285
  const actionNormalized = String(action ?? "HOLD").trim().toUpperCase();
108215
108286
  const parsedUnits = Number.parseInt(String(Number(requestedUnits ?? 0)), DECIMAL_RADIX);
@@ -108438,7 +108509,7 @@ var init_execution_guard_contract = __esm({
108438
108509
  };
108439
108510
  decisionOrderSizeAsset = (input) => {
108440
108511
  const units = Number(input.orderUnits);
108441
- const unitSize = Number(input.unitSizeUsdc);
108512
+ const unitSize = Number(input.unitSizeUsdc) / quoteRateOf(input.quoteRate);
108442
108513
  if (!(Number.isFinite(units) && units > 0 && Number.isFinite(unitSize) && unitSize > 0)) return 0;
108443
108514
  if (input.intent === "reduce") {
108444
108515
  const entry = Number(input.entryPrice);
@@ -109190,14 +109261,15 @@ var init_execution_capacity = __esm({
109190
109261
  init_define_VTX_PI_MODEL_POLICY();
109191
109262
  init_constraint_contract();
109192
109263
  init_execution_guard_contract();
109264
+ init_position_value();
109193
109265
  init_hyperliquid_market_symbol();
109194
- capacityUnitsUsedForPosition = (size, entryPrice, unitSize) => unitsFromPosition(size, entryPrice, unitSize);
109266
+ capacityUnitsUsedForPosition = (position, unitSize) => unitsFromPosition(position.size, position.entry_price, unitSize, quoteRateOf(position.quote_rate));
109195
109267
  openCapacityRoom = (positions, limits) => {
109196
109268
  let globalUnits = 0;
109197
109269
  const exchangeUsage = /* @__PURE__ */ new Map();
109198
109270
  for (const position of positions) {
109199
109271
  if (Number(position.size) === 0) continue;
109200
- const used = capacityUnitsUsedForPosition(position.size, position.entry_price, limits.capacity_unit_size);
109272
+ const used = capacityUnitsUsedForPosition(position, limits.capacity_unit_size);
109201
109273
  globalUnits += used;
109202
109274
  if (position.symbol) {
109203
109275
  const dex = getHyperliquidMarketDex(position.symbol);
@@ -109212,7 +109284,7 @@ var init_execution_capacity = __esm({
109212
109284
  const signedUnits2 = (symbol2) => {
109213
109285
  const normalized = normalizeHyperliquidMarketSymbol(symbol2);
109214
109286
  const position = positions.find((candidate) => normalizeHyperliquidMarketSymbol(candidate.symbol) === normalized);
109215
- return position ? signedUnitsFromEntryPosition(position.size, position.entry_price, limits.unit_size) : 0;
109287
+ return position ? signedUnitsOfPosition(position, limits.unit_size) : 0;
109216
109288
  };
109217
109289
  const remainingExchange = (symbol2) => remainingExchangeByDex.get(getHyperliquidMarketDex(symbol2)) ?? exchangeLimit;
109218
109290
  return {
@@ -109297,7 +109369,9 @@ var init_server_execution_capacity = __esm({
109297
109369
  return positions.map((position) => ({
109298
109370
  symbol: position.symbol,
109299
109371
  size: Number(position.size),
109300
- entry_price: position.entry_price ?? null
109372
+ entry_price: position.entry_price ?? null,
109373
+ // What its price times its size is worth in the account's money (web/lib/api/positions.ts).
109374
+ ...position.quote_rate != null ? { quote_rate: position.quote_rate } : {}
109301
109375
  }));
109302
109376
  };
109303
109377
  allocateServerExecutionCapacity = async (authority, plans, cycleStartedAt) => {
@@ -109511,6 +109585,7 @@ var init_native_position_protection = __esm({
109511
109585
  init_constants();
109512
109586
  init_hyperliquid_client();
109513
109587
  init_hyperliquid_market_symbol();
109588
+ init_position_value();
109514
109589
  init_hyperliquid_order_status();
109515
109590
  init_order_identity();
109516
109591
  init_protective_stop_replacement();
@@ -109536,7 +109611,7 @@ var init_native_position_protection = __esm({
109536
109611
  }
109537
109612
  };
109538
109613
  nativePositionTriggerPrice = (input) => {
109539
- const size = Math.abs(input.positionSize);
109614
+ const size = Math.abs(input.positionSize) * quoteRateOf(input.quoteRate);
109540
109615
  if (!(input.averageEntry > 0) || !(input.value > 0) || input.mode === "usdc" && !(size > 0)) return null;
109541
109616
  const away = input.kind === "tp" === input.isLong;
109542
109617
  const raw = input.mode === "percent" ? away ? input.averageEntry * (1 + input.value / PERCENT_SCALE) : input.averageEntry * (1 - input.value / PERCENT_SCALE) : away ? input.averageEntry + input.value / size : input.averageEntry - input.value / size;
@@ -109558,7 +109633,8 @@ var init_native_position_protection = __esm({
109558
109633
  kind,
109559
109634
  mode: setting2.mode,
109560
109635
  value: setting2.value,
109561
- sizeDecimals: input.sizeDecimals
109636
+ sizeDecimals: input.sizeDecimals,
109637
+ quoteRate: input.quoteRate
109562
109638
  });
109563
109639
  if (trigger !== null) children.push({ kind, trigger });
109564
109640
  }
@@ -109603,7 +109679,8 @@ var init_native_position_protection = __esm({
109603
109679
  kind,
109604
109680
  mode: setting2.mode,
109605
109681
  value: setting2.value,
109606
- sizeDecimals: input.sizeDecimals
109682
+ sizeDecimals: input.sizeDecimals,
109683
+ quoteRate: input.position.quoteRate
109607
109684
  });
109608
109685
  if (trigger === null) continue;
109609
109686
  const resting = input.resting[kind];
@@ -110814,6 +110891,7 @@ var init_native_protection_device = __esm({
110814
110891
  sizeDecimals: input.sizeDecimals,
110815
110892
  referencePrice: input.referencePrice,
110816
110893
  entrySize: input.entrySize,
110894
+ quoteRate: input.quoteRate,
110817
110895
  positionBefore: input.positionBefore,
110818
110896
  positionHasLegacyLegs: input.positionHasLegacyLegs
110819
110897
  });
@@ -111287,7 +111365,7 @@ var init_native_protection_device = __esm({
111287
111365
  settings: { ...input.settings, stopLoss: input.settings.stopLoss && { ...input.settings.stopLoss, trailing: false } },
111288
111366
  isLong: record6.isLong,
111289
111367
  sizeDecimals: input.sizeDecimals,
111290
- position: { size: position.size, entryPrice: position.entryPrice },
111368
+ position: { size: position.size, entryPrice: position.entryPrice, quoteRate: position.quoteRate },
111291
111369
  fillSize: input.fillSize,
111292
111370
  resting: { sl: restingTrigger("sl"), tp: restingTrigger("tp") }
111293
111371
  });
@@ -111585,7 +111663,8 @@ var init_native_protection_device = __esm({
111585
111663
  kind: member.kind,
111586
111664
  mode: setting2.mode,
111587
111665
  value: setting2.value,
111588
- sizeDecimals: input.sizeDecimals
111666
+ sizeDecimals: input.sizeDecimals,
111667
+ quoteRate: position.quoteRate
111589
111668
  }) : null;
111590
111669
  };
111591
111670
  const kindEnabled = (member) => (member.kind === "sl" ? input.settings.stopLoss : input.settings.takeProfit) != null;
@@ -111603,7 +111682,7 @@ var init_native_protection_device = __esm({
111603
111682
  settings: { ...input.settings, stopLoss: input.settings.stopLoss && { ...input.settings.stopLoss, trailing: false } },
111604
111683
  isLong: record6.isLong,
111605
111684
  sizeDecimals: input.sizeDecimals,
111606
- position: { size: position.size, entryPrice: position.entryPrice },
111685
+ position: { size: position.size, entryPrice: position.entryPrice, quoteRate: position.quoteRate },
111607
111686
  fillSize: "0",
111608
111687
  resting: { sl: restingTrigger("sl"), tp: restingTrigger("tp") }
111609
111688
  })) {
@@ -112297,6 +112376,7 @@ var init_runtime_execution = __esm({
112297
112376
  init_manual_order_children();
112298
112377
  init_execution_sizes();
112299
112378
  init_execution_guard_contract();
112379
+ init_position_value();
112300
112380
  init_hyperliquid_client();
112301
112381
  init_exchange_rejection();
112302
112382
  init_hyperliquid_market_symbol();
@@ -112331,12 +112411,7 @@ var init_runtime_execution = __esm({
112331
112411
  }
112332
112412
  );
112333
112413
  executionReadPriority = (input) => {
112334
- const context = input.executionContext;
112335
- const classified = classifyExecutionIntent(
112336
- input.decision,
112337
- input.units,
112338
- signedUnitsFromEntryPosition(context.currentPositionSize, context.currentPositionEntryPrice, context.unitSizeUsdc)
112339
- );
112414
+ const classified = classifyExecutionIntent(input.decision, input.units, contextSignedUnits(input.executionContext));
112340
112415
  return classified.reduceOnly ? "trading_reduce" : "trading_execute";
112341
112416
  };
112342
112417
  serverEntryLeverageAlreadyHeld = async (input) => {
@@ -113448,7 +113523,7 @@ var init_runtime_execution = __esm({
113448
113523
  candidate.mode,
113449
113524
  candidate.mode === "percent" ? candidate.value : void 0,
113450
113525
  candidate.mode === "usdc" ? candidate.value : void 0,
113451
- fill.averagePrice * size
113526
+ fill.averagePrice * size * quoteRateOf(snapshot.quoteRate)
113452
113527
  ),
113453
113528
  isLong,
113454
113529
  candidate.kind === "tp"
@@ -117079,6 +117154,7 @@ var init_runtime_execution = __esm({
117079
117154
  return {
117080
117155
  currentPositionSize: Number.isFinite(refreshedPosition) ? refreshedPosition : snapshotPositionSize,
117081
117156
  currentPositionEntryPrice: refreshedPositionSnapshot?.entry_price ?? null,
117157
+ currentQuoteRate: quoteRateOf(refreshedPositionSnapshot?.quote_rate ?? refreshed.availableToTrade.quote_rate),
117082
117158
  currentMarkPrice: refreshedPrice,
117083
117159
  executionPrice: refreshedPrice ?? decisionPrice,
117084
117160
  executionSnapshotId: createRuntimeId(),
@@ -117107,6 +117183,7 @@ var init_runtime_execution = __esm({
117107
117183
  return {
117108
117184
  currentPositionSize: Number.isFinite(parsedLiveSize) ? parsedLiveSize : snapshotPositionSize,
117109
117185
  currentPositionEntryPrice: liveBrowserSnapshot.entryPrice,
117186
+ currentQuoteRate: quoteRateOf(liveBrowserSnapshot.quoteRate),
117110
117187
  currentMarkPrice: liveMarkPrice,
117111
117188
  executionPrice,
117112
117189
  executionSnapshotId: createRuntimeId(),
@@ -117572,11 +117649,7 @@ var init_runtime_execution = __esm({
117572
117649
  side: null,
117573
117650
  reduceOnly: false,
117574
117651
  requestedUnits,
117575
- targetSignedUnits: signedUnitsFromEntryPosition(
117576
- Number.isFinite(unsizedInput.executionContext.currentPositionSize) ? Number(unsizedInput.executionContext.currentPositionSize) : 0,
117577
- unsizedInput.executionContext.currentPositionEntryPrice,
117578
- unsizedInput.executionContext.unitSizeUsdc
117579
- ),
117652
+ targetSignedUnits: contextSignedUnits(unsizedInput.executionContext),
117580
117653
  executedSizeAsset: 0,
117581
117654
  executionReports: [],
117582
117655
  message: unsizedInput.decision === "HOLD" ? "Hold (No Action)" : "Unsupported decision",
@@ -117644,12 +117717,7 @@ var init_runtime_execution = __esm({
117644
117717
  }
117645
117718
  };
117646
117719
  throwIfAborted(input.signal);
117647
- const decisionSnapshotPositionSize = Number.isFinite(input.executionContext.currentPositionSize) ? Number(input.executionContext.currentPositionSize) : 0;
117648
- const decisionSnapshotSignedUnits = signedUnitsFromEntryPosition(
117649
- decisionSnapshotPositionSize,
117650
- input.executionContext.currentPositionEntryPrice,
117651
- input.executionContext.unitSizeUsdc
117652
- );
117720
+ const decisionSnapshotSignedUnits = contextSignedUnits(input.executionContext);
117653
117721
  const profileId = String(input.profileId).trim();
117654
117722
  const hasTrackedProtection = readClientProtectiveGroups(
117655
117723
  profileId,
@@ -117686,6 +117754,7 @@ var init_runtime_execution = __esm({
117686
117754
  const {
117687
117755
  currentPositionSize,
117688
117756
  currentPositionEntryPrice,
117757
+ currentQuoteRate,
117689
117758
  currentMarkPrice,
117690
117759
  executionPrice: resolvedExecutionPrice,
117691
117760
  executionSnapshotId,
@@ -117714,7 +117783,8 @@ var init_runtime_execution = __esm({
117714
117783
  const liveSignedUnits = signedUnitsFromEntryPosition(
117715
117784
  currentPositionSize,
117716
117785
  currentPositionEntryPrice,
117717
- input.executionContext.unitSizeUsdc
117786
+ input.executionContext.unitSizeUsdc,
117787
+ currentQuoteRate
117718
117788
  );
117719
117789
  const classified = classifyExecutionIntent(
117720
117790
  input.decision,
@@ -118088,7 +118158,8 @@ var init_runtime_execution = __esm({
118088
118158
  unitSizeUsdc: input.executionContext.unitSizeUsdc,
118089
118159
  marketPrice: executionPrice,
118090
118160
  entryPrice: currentPositionEntryPrice,
118091
- livePositionSize: currentPositionSize
118161
+ livePositionSize: currentPositionSize,
118162
+ quoteRate: currentQuoteRate
118092
118163
  });
118093
118164
  let sizeAsset = Number.isFinite(intendedSizeAsset) && intendedSizeAsset > 0 ? quantizeHyperliquidOrderSizeValue(intendedSizeAsset, input.executionContext.sizeDecimals, "nearest") : 0;
118094
118165
  appendRuntimeDebugEvent({
@@ -118170,6 +118241,7 @@ var init_runtime_execution = __esm({
118170
118241
  settings: nativeSettingsOf(input.executionContext),
118171
118242
  isLong: classified.side === "buy",
118172
118243
  sizeDecimals: input.executionContext.sizeDecimals,
118244
+ quoteRate: currentQuoteRate,
118173
118245
  positionHasLegacyLegs: readClientProtectiveGroups(nativeProfileId, input.executionContext.symbol).length > 0,
118174
118246
  entryMutationId,
118175
118247
  entryClientOrderId,
@@ -118579,7 +118651,7 @@ var init_runtime_execution = __esm({
118579
118651
  const protectionEntryPrice = protectionFill == null ? 0 : protectionFill.averagePrice;
118580
118652
  const isLong = classified.side === "buy";
118581
118653
  const exitSide = isLong ? "sell" : "buy";
118582
- const positionNotional = Math.abs(protectionEntryPrice * protectionSize);
118654
+ const positionNotional = Math.abs(protectionEntryPrice * protectionSize * currentQuoteRate);
118583
118655
  const slPct = input.executionContext.stopLossEnabled === false ? 0 : resolveRiskPct(
118584
118656
  input.executionContext.stopLossMode,
118585
118657
  input.executionContext.stopLossPct,
@@ -119746,7 +119818,7 @@ var init_browser_observability = __esm({
119746
119818
  init_define_VTX_GROK_POLICY();
119747
119819
  init_define_VTX_PI_MODEL_POLICY();
119748
119820
  init_runtime_policy_generated2();
119749
- CLIENT_SOURCE_VERSION = typeof process !== "undefined" && true && "541fa84732467b9dcd17559fe28b51bc56b0d5de".trim() && "541fa84732467b9dcd17559fe28b51bc56b0d5de".trim() !== "unstamped" ? "541fa84732467b9dcd17559fe28b51bc56b0d5de".trim() : null;
119821
+ CLIENT_SOURCE_VERSION = typeof process !== "undefined" && true && "296b02cab2d20168659356bd1d28011685e5b358".trim() && "296b02cab2d20168659356bd1d28011685e5b358".trim() !== "unstamped" ? "296b02cab2d20168659356bd1d28011685e5b358".trim() : null;
119750
119822
  listenersInstalled = false;
119751
119823
  state = {
119752
119824
  loadedAtMs: Date.now(),
@@ -126719,7 +126791,9 @@ var init_client_account_report = __esm({
126719
126791
  symbol: normalizeHyperliquidMarketSymbol(position.symbol),
126720
126792
  size: Number(position.size),
126721
126793
  entry_price: Number(position.entry_price),
126722
- unrealized_pnl: Number(position.unrealized_pnl)
126794
+ unrealized_pnl: Number(position.unrealized_pnl),
126795
+ // What its price money is worth in the account's money (web/lib/api/positions.ts); none on Hyperliquid.
126796
+ ...position.quote_rate != null ? { quote_rate: position.quote_rate } : {}
126723
126797
  }));
126724
126798
  }
126725
126799
  if (input.totalUnrealizedPnl !== null && input.totalUnrealizedPnl !== void 0) {
@@ -126761,7 +126835,8 @@ var init_client_account_report = __esm({
126761
126835
  leverage: finiteOrNull4(position.leverage),
126762
126836
  margin_used: finiteOrNull4(position.margin_used),
126763
126837
  liquidation_price: finiteOrNull4(position.liquidation_price),
126764
- funding_usdc: finiteOrNull4(position.funding_usdc)
126838
+ funding_usdc: finiteOrNull4(position.funding_usdc),
126839
+ ...position.quote_rate != null ? { quote_rate: position.quote_rate } : {}
126765
126840
  }))
126766
126841
  });
126767
126842
  }
@@ -131895,6 +131970,7 @@ var init_prompt_positions_block = __esm({
131895
131970
  init_define_VTX_PI_MODEL_POLICY();
131896
131971
  init_constants();
131897
131972
  init_execution_capacity();
131973
+ init_position_value();
131898
131974
  init_hyperliquid_market_symbol();
131899
131975
  init_position_prompt_contract();
131900
131976
  init_prompt_collateral_contract();
@@ -131952,8 +132028,8 @@ var init_prompt_positions_block = __esm({
131952
132028
  if (!Number.isFinite(unrealizedPnl)) {
131953
132029
  throw new RuntimeReasonError(`Active position PnL is unavailable for ${position.symbol}`, "internal_data_error");
131954
132030
  }
131955
- const notionalValue = Math.abs(size * entryPrice);
131956
- const unitsUsed = capacityUnitsUsedForPosition(size, entryPrice, input.unitSize);
132031
+ const notionalValue = Math.abs(size * entryPrice * quoteRateOf(position.quote_rate));
132032
+ const unitsUsed = capacityUnitsUsedForPosition(position, input.unitSize);
131957
132033
  globalUnitsUsed += unitsUsed;
131958
132034
  assetUsage.set(position.symbol, unitsUsed);
131959
132035
  const venue = getHyperliquidMarketDex(position.symbol);
@@ -132704,7 +132780,7 @@ var init_local_analysis = __esm({
132704
132780
  isClientRuntimeAiScheduleStillActive = (value) => value instanceof ClientRuntimeAiScheduleStillActive;
132705
132781
  ServerDispatchAccountStateStale = class extends Error {
132706
132782
  constructor() {
132707
- super("VTX couldn't refresh this bot's Hyperliquid account data in time, so it skipped this cycle safely and will try again at the next one");
132783
+ super("VTX couldn't refresh this bot's account data in time, so it skipped this cycle safely and will try again at the next one");
132708
132784
  this.name = "ServerDispatchAccountStateStale";
132709
132785
  }
132710
132786
  };
@@ -132868,7 +132944,7 @@ var init_local_analysis = __esm({
132868
132944
  const signedUnitsForSymbol = (planSymbol) => {
132869
132945
  const position = positionBySymbol.get(normalizeRuntimeSymbol(planSymbol));
132870
132946
  if (!position) return 0;
132871
- return signedUnitsFromEntryPosition(position.size, position.entry_price, tradeSize);
132947
+ return signedUnitsOfPosition(position, tradeSize);
132872
132948
  };
132873
132949
  for (const positionSymbol of positionBySymbol.keys()) signedUnitsForSymbol(positionSymbol);
132874
132950
  const maxTradesPerPrompt = Math.max(0, Math.trunc(clampNumber(
@@ -132900,14 +132976,16 @@ var init_local_analysis = __esm({
132900
132976
  if (price === null) {
132901
132977
  throw new Error(`Missing required positive market price for Agent Client runtime execution context: ${planSymbol}`);
132902
132978
  }
132903
- const positionSize = Number(positionBySymbol.get(normalizeRuntimeSymbol(planSymbol))?.size ?? 0);
132979
+ const position = positionBySymbol.get(normalizeRuntimeSymbol(planSymbol));
132980
+ const positionSize = Number(position?.size ?? 0);
132904
132981
  return {
132905
132982
  symbol: planSymbol,
132906
132983
  timeframe,
132907
132984
  decisionSnapshotId: input.decisionSnapshotId,
132908
132985
  decisionSnapshotCapturedAt: input.decisionSnapshotCapturedAt,
132909
132986
  currentPositionSize: Number.isFinite(positionSize) ? positionSize : 0,
132910
- currentPositionEntryPrice: positionBySymbol.get(normalizeRuntimeSymbol(planSymbol))?.entry_price ?? null,
132987
+ currentPositionEntryPrice: position?.entry_price ?? null,
132988
+ currentPositionQuoteRate: position?.quote_rate,
132911
132989
  walletAddress,
132912
132990
  lastPrice: price,
132913
132991
  unitSizeUsdc: tradeSize,
@@ -133171,9 +133249,9 @@ var init_local_analysis = __esm({
133171
133249
  RUNTIME_SOURCE_DEFINITION_VERSION = "runtime-source-v1";
133172
133250
  DECISION_INPUT_DEFINITION_VERSION = "decision-input-v1";
133173
133251
  CONTEXT_ENVELOPE_DEFINITION_VERSION = "context-envelope-v2.1";
133174
- CLIENT_RUNTIME_SOURCE_VERSION = typeof process !== "undefined" && true && "541fa84732467b9dcd17559fe28b51bc56b0d5de".trim() && !["unknown", "unstamped", "development"].includes(
133175
- "541fa84732467b9dcd17559fe28b51bc56b0d5de".trim().toLowerCase()
133176
- ) ? "541fa84732467b9dcd17559fe28b51bc56b0d5de".trim() : null;
133252
+ CLIENT_RUNTIME_SOURCE_VERSION = typeof process !== "undefined" && true && "296b02cab2d20168659356bd1d28011685e5b358".trim() && !["unknown", "unstamped", "development"].includes(
133253
+ "296b02cab2d20168659356bd1d28011685e5b358".trim().toLowerCase()
133254
+ ) ? "296b02cab2d20168659356bd1d28011685e5b358".trim() : null;
133177
133255
  CLIENT_MAIN_PROMPT_RENDERER = "client_runtime.buildLocalRuntimePromptArtifacts:v1";
133178
133256
  CLIENT_REVIEW_PROMPT_RENDERER = "client_runtime.review_prompt_assembly:v1";
133179
133257
  resolveEffectivePromptRuntimeProvenance = (input) => ({
@@ -136671,16 +136749,16 @@ ${stringifyPromptJson(withUtcCandleOpenTimes(parts.candlesPayload))}
136671
136749
  if (planPrice == null) {
136672
136750
  throw new Error(`Missing required positive market price for client runtime execution context: ${planSymbol}`);
136673
136751
  }
136674
- const planPositionSize = Number(
136675
- positions.find((position) => normalizeRuntimeSymbol(position.symbol) === normalizeRuntimeSymbol(planSymbol))?.size ?? 0
136676
- );
136752
+ const planPosition = positions.find((position) => normalizeRuntimeSymbol(position.symbol) === normalizeRuntimeSymbol(planSymbol));
136753
+ const planPositionSize = Number(planPosition?.size ?? 0);
136677
136754
  return {
136678
136755
  symbol: planSymbol,
136679
136756
  timeframe,
136680
136757
  decisionSnapshotId,
136681
136758
  decisionSnapshotCapturedAt,
136682
136759
  currentPositionSize: Number.isFinite(planPositionSize) ? planPositionSize : 0,
136683
- currentPositionEntryPrice: positions.find((position) => normalizeRuntimeSymbol(position.symbol) === normalizeRuntimeSymbol(planSymbol))?.entry_price ?? null,
136760
+ currentPositionEntryPrice: planPosition?.entry_price ?? null,
136761
+ currentPositionQuoteRate: planPosition?.quote_rate,
136684
136762
  walletAddress: botAccountAddress(settings) || void 0,
136685
136763
  lastPrice: planPrice,
136686
136764
  unitSizeUsdc: metadataTradeSize,
@@ -137028,7 +137106,7 @@ ${stringifyPromptJson(withUtcCandleOpenTimes(parts.candlesPayload))}
137028
137106
  const computePlanSignedUnits = (planSymbol) => {
137029
137107
  const position = positionBySymbol.get(normalizeRuntimeSymbol(planSymbol));
137030
137108
  if (!position) return 0;
137031
- return signedUnitsFromEntryPosition(position.size, position.entry_price, metadataTradeSize);
137109
+ return signedUnitsOfPosition(position, metadataTradeSize);
137032
137110
  };
137033
137111
  const reviewCandidatePlans = primaryReviewCandidatePlans.filter((entry) => {
137034
137112
  if (unavailablePromptSymbols.has(normalizeRuntimeSymbol(entry.symbol))) return false;
@@ -144578,11 +144656,7 @@ var init_engine = __esm({
144578
144656
  const cycleSupersededWithoutExecution = () => !this._executionFinalizationRequired && (analysisAbortController.signal.aborted || this._isStopping || this._analysisRequestId !== requestId);
144579
144657
  const advisorySignedUnits = (context) => {
144580
144658
  try {
144581
- return signedUnitsFromEntryPosition(
144582
- context.currentPositionSize,
144583
- context.currentPositionEntryPrice,
144584
- context.unitSizeUsdc
144585
- );
144659
+ return contextSignedUnits(context);
144586
144660
  } catch {
144587
144661
  return 0;
144588
144662
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtxmacro/cli",
3
- "version": "2026.10.74",
3
+ "version": "2026.10.75",
4
4
  "description": "VTX Macro CLI, MCP server, and durable external inference host.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",