@vtxmacro/cli 2026.10.73 → 2026.10.74
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 +1 -1
- package/bin/vtx-service-bootstrap.js +1 -1
- package/bin/vtx.js +465 -340
- package/package.json +1 -1
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.
|
|
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" } } };
|
|
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.
|
|
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" } } };
|
|
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.
|
|
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" } } };
|
|
126
126
|
}
|
|
127
127
|
});
|
|
128
128
|
|
|
@@ -99883,7 +99883,7 @@ async function recordServerHostExecutionAudit(profileId, payload, signal, requir
|
|
|
99883
99883
|
{ ...authority.requestOptions, signal }
|
|
99884
99884
|
);
|
|
99885
99885
|
}
|
|
99886
|
-
async function checkServerHostExecutionCapacity(profileId, plans, signal, requiredRuntimeSessionId, explicitRuntimeLeaseToken, explicitRuntimeDeviceId, explicitSchedulerInstanceId, cycleStartedAt) {
|
|
99886
|
+
async function checkServerHostExecutionCapacity(profileId, plans, signal, requiredRuntimeSessionId, explicitRuntimeLeaseToken, explicitRuntimeDeviceId, explicitSchedulerInstanceId, cycleStartedAt, positions) {
|
|
99887
99887
|
const authority = resolveClientExchangeMutationAuthority(
|
|
99888
99888
|
profileId,
|
|
99889
99889
|
requiredRuntimeSessionId,
|
|
@@ -99897,6 +99897,7 @@ async function checkServerHostExecutionCapacity(profileId, plans, signal, requir
|
|
|
99897
99897
|
JSON.stringify({
|
|
99898
99898
|
...clientExchangeMutationAuthorityBody(authority),
|
|
99899
99899
|
plans,
|
|
99900
|
+
positions,
|
|
99900
99901
|
cycle_started_at: cycleStartedAt || void 0
|
|
99901
99902
|
// an order VTX sent since then refuses the batch
|
|
99902
99903
|
}),
|
|
@@ -105662,6 +105663,7 @@ var init_account = __esm({
|
|
|
105662
105663
|
init_define_VTX_PI_MODEL_POLICY();
|
|
105663
105664
|
init_mt5_trading();
|
|
105664
105665
|
init_constants();
|
|
105666
|
+
init_hyperliquid_account_contract();
|
|
105665
105667
|
init_market();
|
|
105666
105668
|
init_positions();
|
|
105667
105669
|
init_reads();
|
|
@@ -105713,17 +105715,36 @@ var init_account = __esm({
|
|
|
105713
105715
|
mt5AccountSummary = (account) => {
|
|
105714
105716
|
const equity = amount(account.equity) ?? 0;
|
|
105715
105717
|
const freeMargin = amount(account.margin_free);
|
|
105718
|
+
const margin = amount(account.margin);
|
|
105719
|
+
const profit = amount(account.profit);
|
|
105716
105720
|
return {
|
|
105721
|
+
// The account is one margin pool on the default venue, which the prompt's
|
|
105722
|
+
// account and positions blocks read its figures from (prompt-collateral-contract.ts).
|
|
105723
|
+
// MetaTrader reports no maintenance margin or exposure, so those stay unknown.
|
|
105724
|
+
...margin !== null && freeMargin !== null && profit !== null ? {
|
|
105725
|
+
perp_dex_accounts: [{
|
|
105726
|
+
dex: "",
|
|
105727
|
+
account_value: equity,
|
|
105728
|
+
total_margin_used: margin,
|
|
105729
|
+
// As every pool's: equity less margin used, never below zero (MetaTrader's
|
|
105730
|
+
// free margin goes negative below a 100% margin level).
|
|
105731
|
+
available_margin: canonicalAvailableMargin(equity, margin),
|
|
105732
|
+
withdrawable: freeMargin,
|
|
105733
|
+
maintenance_margin: null,
|
|
105734
|
+
cross_account_leverage: null,
|
|
105735
|
+
total_unrealized_pnl: profit
|
|
105736
|
+
}]
|
|
105737
|
+
} : {},
|
|
105717
105738
|
account_value: equity,
|
|
105718
105739
|
venue_equity_usd: equity,
|
|
105719
105740
|
market_type: "mt5",
|
|
105720
|
-
total_margin_used:
|
|
105741
|
+
total_margin_used: margin,
|
|
105721
105742
|
available_margin: freeMargin,
|
|
105722
105743
|
withdrawable: freeMargin,
|
|
105723
105744
|
cross_margin_ratio: null,
|
|
105724
105745
|
maintenance_margin: null,
|
|
105725
105746
|
cross_account_leverage: null,
|
|
105726
|
-
total_unrealized_pnl:
|
|
105747
|
+
total_unrealized_pnl: profit,
|
|
105727
105748
|
// MetaTrader has no Hyperliquid account modes: its account is one margin account.
|
|
105728
105749
|
account_mode: "default",
|
|
105729
105750
|
mode_source: "canonical",
|
|
@@ -109246,6 +109267,72 @@ var init_execution_capacity = __esm({
|
|
|
109246
109267
|
}
|
|
109247
109268
|
});
|
|
109248
109269
|
|
|
109270
|
+
// lib/runtime/server-execution-capacity.ts
|
|
109271
|
+
var runtimeReadPositions, allocateServerExecutionCapacity;
|
|
109272
|
+
var init_server_execution_capacity = __esm({
|
|
109273
|
+
"lib/runtime/server-execution-capacity.ts"() {
|
|
109274
|
+
"use strict";
|
|
109275
|
+
init_define_VTX_CLAUDE_CODE_POLICY();
|
|
109276
|
+
init_define_VTX_EXO_POLICY();
|
|
109277
|
+
init_define_VTX_GROK_POLICY();
|
|
109278
|
+
init_define_VTX_PI_MODEL_POLICY();
|
|
109279
|
+
init_api2();
|
|
109280
|
+
init_abort();
|
|
109281
|
+
init_exchange_executor();
|
|
109282
|
+
init_execution_capacity();
|
|
109283
|
+
init_network_debug();
|
|
109284
|
+
runtimeReadPositions = async (authority, symbol2) => {
|
|
109285
|
+
if (executorOf(authority.config).exchange !== "mt5") return void 0;
|
|
109286
|
+
const { positions } = await exchangeReads.accountState({
|
|
109287
|
+
publicRequestPriority: "trading_execute",
|
|
109288
|
+
config: authority.config ?? {},
|
|
109289
|
+
walletAddress: "",
|
|
109290
|
+
symbol: symbol2,
|
|
109291
|
+
tickerPrice: 0,
|
|
109292
|
+
leverage: 1,
|
|
109293
|
+
forceRefresh: true,
|
|
109294
|
+
sessionId: authority.sessionId,
|
|
109295
|
+
signal: authority.signal
|
|
109296
|
+
});
|
|
109297
|
+
return positions.map((position) => ({
|
|
109298
|
+
symbol: position.symbol,
|
|
109299
|
+
size: Number(position.size),
|
|
109300
|
+
entry_price: position.entry_price ?? null
|
|
109301
|
+
}));
|
|
109302
|
+
};
|
|
109303
|
+
allocateServerExecutionCapacity = async (authority, plans, cycleStartedAt) => {
|
|
109304
|
+
if (plans.length === 0) return [];
|
|
109305
|
+
try {
|
|
109306
|
+
const positions = await runtimeReadPositions(authority, plans[0].symbol);
|
|
109307
|
+
const answer2 = await checkServerHostExecutionCapacity(
|
|
109308
|
+
authority.profileId,
|
|
109309
|
+
plans,
|
|
109310
|
+
authority.signal,
|
|
109311
|
+
authority.sessionId,
|
|
109312
|
+
authority.runtimeLeaseToken,
|
|
109313
|
+
authority.runtimeDeviceId,
|
|
109314
|
+
authority.schedulerInstanceId,
|
|
109315
|
+
cycleStartedAt,
|
|
109316
|
+
...positions ? [positions] : []
|
|
109317
|
+
);
|
|
109318
|
+
if (!answer2.positions || !answer2.limits) return answer2.results;
|
|
109319
|
+
const judged = allocatePlanCapacity(answer2.positions, plans, answer2.limits);
|
|
109320
|
+
const shadow = answer2.results.map((result) => `${result.symbol}:${result.accepted}:${result.units}`).join(",");
|
|
109321
|
+
const own = judged.map((result) => `${result.symbol}:${result.accepted}:${result.units}`).join(",");
|
|
109322
|
+
if (shadow !== own) {
|
|
109323
|
+
const note = `profile_id=${authority.profileId} runtime=${own} server=${shadow}`;
|
|
109324
|
+
appendRuntimeDebugEvent({ label: "server_capacity_shadow_differs", note, outcome: "error" });
|
|
109325
|
+
console.warn(`event=server_capacity_shadow_differs service=vtx-server-runtime-host ${note}`);
|
|
109326
|
+
}
|
|
109327
|
+
return judged;
|
|
109328
|
+
} catch (error48) {
|
|
109329
|
+
throwIfAborted(authority.signal);
|
|
109330
|
+
return plans.map(() => ({ unavailable: error48 }));
|
|
109331
|
+
}
|
|
109332
|
+
};
|
|
109333
|
+
}
|
|
109334
|
+
});
|
|
109335
|
+
|
|
109249
109336
|
// lib/runtime/owed-protection-warnings.ts
|
|
109250
109337
|
var storageKey, configuredStorage2, owedStorage, isWarning, identity2, owesProtectionWarning, owesProtectionRecord, distinctProtectionWarnings, owedProtectionWarnings, store, oweProtectionWarnings, forgetProtectionWarnings;
|
|
109251
109338
|
var init_owed_protection_warnings = __esm({
|
|
@@ -112177,7 +112264,7 @@ var init_native_protection_device = __esm({
|
|
|
112177
112264
|
});
|
|
112178
112265
|
|
|
112179
112266
|
// lib/runtime/runtime-execution.ts
|
|
112180
|
-
var executionQueueTimeout, withClientProtectivePlanSetMutation2, clientProtectiveMutationAuthority, executionReadPriority, serverEntryLeverageAlreadyHeld, createRuntimeId, trailingStopMemory, protectiveGroupMemory, protectiveGroupReadFailures, windowHandoffCleanupAttempts, clientRuntimeProtectionStorage, resolveClientRuntimeProtectionStorage, setClientRuntimeProtectionStorage, readTrackedTrailingStops, writeTrackedTrailingStops, rememberTrailingStop, LOST_LEG_EVIDENCE_MAX_AGE_MS, EPISODE_END_FILL_LOOKBACK_MS, readClientProtectiveGroups, writeClientProtectiveGroups, hasClientProtectiveGroupReadFailure, readFreshClientProtectiveGroups, exactClientProtectiveGroupSnapshot, exactClientProtectiveGroupSetSnapshot, storableClientProtectiveGroup, replaceExactClientProtectiveGroup, replaceExactClientProtectiveGroupSet, isClientRuntimeLeaseOwnershipError, hasClientRuntimeProtectionState, clearClientRuntimeVetoedProtectiveIntent, rethrowWindowHandoffAfterProtectiveReplacementVeto, canPersistClientProtectiveGroups, removeTrackedTrailingStop, replaceTrackedTrailingStop, replacementJournalEntryOrderId, buildProtectiveReplacementJournalGroup, isProtectiveReplacementJournalGroup, reserveProtectiveLegReplacement, ensureProtectiveReplacementJournalCompanion, buildVetoedProtectiveReplacementCleanup, assertExactProtectiveReplacementDispatchAuthority, transitionProtectiveReplacementAcknowledgement, transitionTerminalProtectiveReplacement, isConfiguredProtectionRequested, protectiveAction, isExactClientPositionTpslPair, deviceOwnsClientProtectiveLegKind, isAdoptionNarrowedPositionTpslLeg, hasAmbiguousClientPositionTpslAuthority, protectiveTerminalShapeMatches, cancelClientProtectiveLeg, persistPendingClientProtectiveGroup, readAttachEvidence, attachClientProtectivePlan, resolveJournaledAttachmentContinuity, journaledAttachmentNeverLanded, recoverJournaledClientProtectiveAttachments, readClientOrderMutation, readPendingEntryMutation, replacePendingEntryRecovery, recoverPendingClientProtectiveGroups, recoverPendingProtectiveReplacements, observedStandaloneProtectiveGroup, migrateTrackedTrailingStopsToStandalone, nativeSettingsOf, nativePassEnded, nativeProtectionIo, nativeStorageReport, reconcileNativeProtectionForDecision, reconcileClientProtectiveGroups, cancelAllClientProtectiveGroups, modifyClientTrailingLeg, trailingRatchetIo, resolveExchangeSizeDecimals, readServerOrderMarkPrice, serverOrderMetadataRetry, resolveCurrentPositionSize, buildPositionSnapshot, serverUserCancelLookup, passUserCancelsFor, verifyNoLiveClientProtectiveTriggers,
|
|
112267
|
+
var executionQueueTimeout, withClientProtectivePlanSetMutation2, clientProtectiveMutationAuthority, executionReadPriority, serverEntryLeverageAlreadyHeld, createRuntimeId, trailingStopMemory, protectiveGroupMemory, protectiveGroupReadFailures, windowHandoffCleanupAttempts, clientRuntimeProtectionStorage, resolveClientRuntimeProtectionStorage, setClientRuntimeProtectionStorage, readTrackedTrailingStops, writeTrackedTrailingStops, rememberTrailingStop, LOST_LEG_EVIDENCE_MAX_AGE_MS, EPISODE_END_FILL_LOOKBACK_MS, readClientProtectiveGroups, writeClientProtectiveGroups, hasClientProtectiveGroupReadFailure, readFreshClientProtectiveGroups, exactClientProtectiveGroupSnapshot, exactClientProtectiveGroupSetSnapshot, storableClientProtectiveGroup, replaceExactClientProtectiveGroup, replaceExactClientProtectiveGroupSet, isClientRuntimeLeaseOwnershipError, hasClientRuntimeProtectionState, clearClientRuntimeVetoedProtectiveIntent, rethrowWindowHandoffAfterProtectiveReplacementVeto, canPersistClientProtectiveGroups, removeTrackedTrailingStop, replaceTrackedTrailingStop, replacementJournalEntryOrderId, buildProtectiveReplacementJournalGroup, isProtectiveReplacementJournalGroup, reserveProtectiveLegReplacement, ensureProtectiveReplacementJournalCompanion, buildVetoedProtectiveReplacementCleanup, assertExactProtectiveReplacementDispatchAuthority, transitionProtectiveReplacementAcknowledgement, transitionTerminalProtectiveReplacement, isConfiguredProtectionRequested, protectiveAction, isExactClientPositionTpslPair, deviceOwnsClientProtectiveLegKind, isAdoptionNarrowedPositionTpslLeg, hasAmbiguousClientPositionTpslAuthority, protectiveTerminalShapeMatches, cancelClientProtectiveLeg, persistPendingClientProtectiveGroup, readAttachEvidence, attachClientProtectivePlan, resolveJournaledAttachmentContinuity, journaledAttachmentNeverLanded, recoverJournaledClientProtectiveAttachments, readClientOrderMutation, readPendingEntryMutation, replacePendingEntryRecovery, recoverPendingClientProtectiveGroups, recoverPendingProtectiveReplacements, observedStandaloneProtectiveGroup, migrateTrackedTrailingStopsToStandalone, nativeSettingsOf, nativePassEnded, nativeProtectionIo, nativeStorageReport, reconcileNativeProtectionForDecision, reconcileClientProtectiveGroups, cancelAllClientProtectiveGroups, modifyClientTrailingLeg, trailingRatchetIo, resolveExchangeSizeDecimals, readServerOrderMarkPrice, serverOrderMetadataRetry, resolveCurrentPositionSize, buildPositionSnapshot, serverUserCancelLookup, passUserCancelsFor, verifyNoLiveClientProtectiveTriggers, executeClientRuntimeDecisionLocked, unsentDecisionOrderReport, SERVER_AUDIT_RECORDED_ELSEWHERE, serverExecutionAuditOutcome, decisionLegOf, withExecutionAuditId, executeClientRuntimeDecision, waitForFlipCloseFreshness, nextClientTrailingStopDueAtMs, ratchetClientTrailingStopsBetweenCycles, handedOverPlan, listPendingClientProtectiveSymbols, hasPendingClientProtectiveGroups, recoverManualClientProtectiveGroups, listStoredClientProtectionSymbols, clientRuntimeDecisionSizesOrders, COMMITTED_EXECUTION_REPORTS, COMMITTED_DECISION_ORDER, getCommittedExecutionReports, getCommittedDecisionOrder, withCommittedExecutionReports, executeClientRuntimeDecisionUnlocked;
|
|
112181
112268
|
var init_runtime_execution = __esm({
|
|
112182
112269
|
"lib/runtime/runtime-execution.ts"() {
|
|
112183
112270
|
"use strict";
|
|
@@ -112201,6 +112288,7 @@ var init_runtime_execution = __esm({
|
|
|
112201
112288
|
init_protective_user_cancels();
|
|
112202
112289
|
init_hyperliquid_order_status();
|
|
112203
112290
|
init_execution_capacity();
|
|
112291
|
+
init_server_execution_capacity();
|
|
112204
112292
|
init_pending_entry_fill_proof();
|
|
112205
112293
|
init_owed_protection_warnings();
|
|
112206
112294
|
init_protective_group_snapshot();
|
|
@@ -117087,34 +117175,6 @@ var init_runtime_execution = __esm({
|
|
|
117087
117175
|
return { blocksEntry: false, reports: [] };
|
|
117088
117176
|
}
|
|
117089
117177
|
};
|
|
117090
|
-
allocateServerExecutionCapacity = async (authority, plans, cycleStartedAt) => {
|
|
117091
|
-
if (plans.length === 0) return [];
|
|
117092
|
-
try {
|
|
117093
|
-
const answer2 = await checkServerHostExecutionCapacity(
|
|
117094
|
-
authority.profileId,
|
|
117095
|
-
plans,
|
|
117096
|
-
authority.signal,
|
|
117097
|
-
authority.sessionId,
|
|
117098
|
-
authority.runtimeLeaseToken,
|
|
117099
|
-
authority.runtimeDeviceId,
|
|
117100
|
-
authority.schedulerInstanceId,
|
|
117101
|
-
cycleStartedAt
|
|
117102
|
-
);
|
|
117103
|
-
if (!answer2.positions || !answer2.limits) return answer2.results;
|
|
117104
|
-
const judged = allocatePlanCapacity(answer2.positions, plans, answer2.limits);
|
|
117105
|
-
const shadow = answer2.results.map((result) => `${result.symbol}:${result.accepted}:${result.units}`).join(",");
|
|
117106
|
-
const own = judged.map((result) => `${result.symbol}:${result.accepted}:${result.units}`).join(",");
|
|
117107
|
-
if (shadow !== own) {
|
|
117108
|
-
const note = `profile_id=${authority.profileId} runtime=${own} server=${shadow}`;
|
|
117109
|
-
appendRuntimeDebugEvent({ label: "server_capacity_shadow_differs", note, outcome: "error" });
|
|
117110
|
-
console.warn(`event=server_capacity_shadow_differs service=vtx-server-runtime-host ${note}`);
|
|
117111
|
-
}
|
|
117112
|
-
return judged;
|
|
117113
|
-
} catch (error48) {
|
|
117114
|
-
throwIfAborted(authority.signal);
|
|
117115
|
-
return plans.map(() => ({ unavailable: error48 }));
|
|
117116
|
-
}
|
|
117117
|
-
};
|
|
117118
117178
|
executeClientRuntimeDecisionLocked = (input) => withClientProtectivePlanSetMutation2(input, input.executionContext.symbol, async () => {
|
|
117119
117179
|
const progress = { committedReports: null };
|
|
117120
117180
|
try {
|
|
@@ -119686,7 +119746,7 @@ var init_browser_observability = __esm({
|
|
|
119686
119746
|
init_define_VTX_GROK_POLICY();
|
|
119687
119747
|
init_define_VTX_PI_MODEL_POLICY();
|
|
119688
119748
|
init_runtime_policy_generated2();
|
|
119689
|
-
CLIENT_SOURCE_VERSION = typeof process !== "undefined" && true && "
|
|
119749
|
+
CLIENT_SOURCE_VERSION = typeof process !== "undefined" && true && "541fa84732467b9dcd17559fe28b51bc56b0d5de".trim() && "541fa84732467b9dcd17559fe28b51bc56b0d5de".trim() !== "unstamped" ? "541fa84732467b9dcd17559fe28b51bc56b0d5de".trim() : null;
|
|
119690
119750
|
listenersInstalled = false;
|
|
119691
119751
|
state = {
|
|
119692
119752
|
loadedAtMs: Date.now(),
|
|
@@ -122782,79 +122842,22 @@ var init_review_failure_wording = __esm({
|
|
|
122782
122842
|
}
|
|
122783
122843
|
});
|
|
122784
122844
|
|
|
122785
|
-
// lib/runtime/
|
|
122786
|
-
var
|
|
122787
|
-
var
|
|
122788
|
-
"lib/runtime/
|
|
122845
|
+
// lib/runtime/trader-max-tokens.ts
|
|
122846
|
+
var traderMainMaxTokens;
|
|
122847
|
+
var init_trader_max_tokens = __esm({
|
|
122848
|
+
"lib/runtime/trader-max-tokens.ts"() {
|
|
122789
122849
|
"use strict";
|
|
122790
122850
|
init_define_VTX_CLAUDE_CODE_POLICY();
|
|
122791
122851
|
init_define_VTX_EXO_POLICY();
|
|
122792
122852
|
init_define_VTX_GROK_POLICY();
|
|
122793
122853
|
init_define_VTX_PI_MODEL_POLICY();
|
|
122794
122854
|
init_runtime_error_reason_rules();
|
|
122795
|
-
|
|
122796
|
-
|
|
122797
|
-
|
|
122798
|
-
|
|
122799
|
-
"runtime_config_missing"
|
|
122800
|
-
);
|
|
122801
|
-
booleanField = (resolved, key) => {
|
|
122802
|
-
const value = resolved[key];
|
|
122803
|
-
if (typeof value !== "boolean") throw invalid2(key);
|
|
122804
|
-
return value;
|
|
122805
|
-
};
|
|
122806
|
-
numberField = (resolved, key) => {
|
|
122807
|
-
const value = resolved[key];
|
|
122808
|
-
if (typeof value !== "number" || !Number.isFinite(value)) throw invalid2(key);
|
|
122809
|
-
return value;
|
|
122810
|
-
};
|
|
122811
|
-
enumField = (resolved, key, allowed) => {
|
|
122812
|
-
const value = resolved[key];
|
|
122813
|
-
if (!allowed.includes(value)) throw invalid2(key);
|
|
122814
|
-
return value;
|
|
122815
|
-
};
|
|
122816
|
-
buildRuntimeSlTpExecutionSettings = (settings, _config) => {
|
|
122817
|
-
const error48 = settings.sl_tp_execution_settings_error;
|
|
122818
|
-
if (typeof error48 === "string" && error48.trim()) throw new Error(error48);
|
|
122819
|
-
const resolved = settings.sl_tp_execution_settings;
|
|
122820
|
-
if (!resolved || typeof resolved !== "object" || Array.isArray(resolved)) {
|
|
122821
|
-
throw new RuntimeReasonError("The bot's preferences carry no resolved Auto SL/TP settings.", "runtime_config_missing");
|
|
122855
|
+
traderMainMaxTokens = (maxTokens, config2) => {
|
|
122856
|
+
const minimum = Number(config2.max_tokens_min);
|
|
122857
|
+
if (!Number.isFinite(minimum) || minimum <= 0) {
|
|
122858
|
+
throw new RuntimeReasonError("Missing required positive prompt contract field: max_tokens_min", "runtime_config_missing");
|
|
122822
122859
|
}
|
|
122823
|
-
|
|
122824
|
-
return {
|
|
122825
|
-
tpSlEnabled: booleanField(values, "tp_sl_enabled"),
|
|
122826
|
-
stopLossEnabled: booleanField(values, "sl_enabled"),
|
|
122827
|
-
stopLossType: enumField(values, "stop_loss_type", STOP_LOSS_TYPES),
|
|
122828
|
-
stopLossMode: enumField(values, "stop_loss_mode", RISK_MODES),
|
|
122829
|
-
stopLossPct: numberField(values, "stop_loss_pct"),
|
|
122830
|
-
stopLossUsdc: numberField(values, "stop_loss_usdc"),
|
|
122831
|
-
takeProfitEnabled: booleanField(values, "tp_enabled"),
|
|
122832
|
-
takeProfitMode: enumField(values, "take_profit_mode", RISK_MODES),
|
|
122833
|
-
takeProfitPct: numberField(values, "take_profit_pct"),
|
|
122834
|
-
takeProfitUsdc: numberField(values, "take_profit_usdc")
|
|
122835
|
-
};
|
|
122836
|
-
};
|
|
122837
|
-
}
|
|
122838
|
-
});
|
|
122839
|
-
|
|
122840
|
-
// lib/runtime/agent-instruction-carry.ts
|
|
122841
|
-
var carryAgentInstruction, carriedAgentInstruction;
|
|
122842
|
-
var init_agent_instruction_carry = __esm({
|
|
122843
|
-
"lib/runtime/agent-instruction-carry.ts"() {
|
|
122844
|
-
"use strict";
|
|
122845
|
-
init_define_VTX_CLAUDE_CODE_POLICY();
|
|
122846
|
-
init_define_VTX_EXO_POLICY();
|
|
122847
|
-
init_define_VTX_GROK_POLICY();
|
|
122848
|
-
init_define_VTX_PI_MODEL_POLICY();
|
|
122849
|
-
carryAgentInstruction = (error48, binding) => {
|
|
122850
|
-
if (!binding || !error48 || typeof error48 !== "object" && typeof error48 !== "function") return error48;
|
|
122851
|
-
error48.runtimeExternalAgentInstruction = binding;
|
|
122852
|
-
return error48;
|
|
122853
|
-
};
|
|
122854
|
-
carriedAgentInstruction = (error48) => {
|
|
122855
|
-
if (!error48 || typeof error48 !== "object" && typeof error48 !== "function") return null;
|
|
122856
|
-
const binding = error48.runtimeExternalAgentInstruction;
|
|
122857
|
-
return binding && typeof binding === "object" ? binding : null;
|
|
122860
|
+
return Math.max(maxTokens, Math.trunc(minimum));
|
|
122858
122861
|
};
|
|
122859
122862
|
}
|
|
122860
122863
|
});
|
|
@@ -122986,6 +122989,312 @@ var init_model_output_gate = __esm({
|
|
|
122986
122989
|
}
|
|
122987
122990
|
});
|
|
122988
122991
|
|
|
122992
|
+
// lib/runtime/decision-plans.ts
|
|
122993
|
+
var SERVER_UNREADABLE_REPLY_HOLD_REASONING, normalizeDecisionLabel, decodeDecisionTracePayload, extractDecisionSymbolTrace, buildMissingDecisionHold, buildDecisionPlansFromResponse, readTraderReplyContent, traderDecisionPlans;
|
|
122994
|
+
var init_decision_plans = __esm({
|
|
122995
|
+
"lib/runtime/decision-plans.ts"() {
|
|
122996
|
+
"use strict";
|
|
122997
|
+
init_define_VTX_CLAUDE_CODE_POLICY();
|
|
122998
|
+
init_define_VTX_EXO_POLICY();
|
|
122999
|
+
init_define_VTX_GROK_POLICY();
|
|
123000
|
+
init_define_VTX_PI_MODEL_POLICY();
|
|
123001
|
+
init_decision_contract();
|
|
123002
|
+
init_hyperliquid_market_symbol();
|
|
123003
|
+
init_model_output_gate();
|
|
123004
|
+
SERVER_UNREADABLE_REPLY_HOLD_REASONING = "Configured symbol was omitted from the model response. Defaulted to HOLD.";
|
|
123005
|
+
normalizeDecisionLabel = (value) => {
|
|
123006
|
+
const normalized = String(value ?? "").trim().toUpperCase();
|
|
123007
|
+
if (normalized === "BUY" || normalized === "SELL") {
|
|
123008
|
+
return normalized;
|
|
123009
|
+
}
|
|
123010
|
+
return "HOLD";
|
|
123011
|
+
};
|
|
123012
|
+
decodeDecisionTracePayload = (rawText, allowedSymbols = []) => {
|
|
123013
|
+
const text2 = String(rawText ?? "").trim();
|
|
123014
|
+
const fencedMatch = text2.match(/^```(?:json)?\s*\n?([\s\S]*?)\n?```$/i);
|
|
123015
|
+
const content = fencedMatch ? String(fencedMatch[1] ?? "").trim() : text2;
|
|
123016
|
+
const candidates = [];
|
|
123017
|
+
const contentVariants = Array.from(/* @__PURE__ */ new Set([content, repairJsonStringSyntax(content)]));
|
|
123018
|
+
for (const candidateContent of contentVariants) {
|
|
123019
|
+
for (let startIndex = 0; startIndex < candidateContent.length; startIndex += 1) {
|
|
123020
|
+
if (candidateContent[startIndex] !== "{") {
|
|
123021
|
+
continue;
|
|
123022
|
+
}
|
|
123023
|
+
let depth = 0;
|
|
123024
|
+
let inString = false;
|
|
123025
|
+
let escaped = false;
|
|
123026
|
+
for (let cursor = startIndex; cursor < candidateContent.length; cursor += 1) {
|
|
123027
|
+
const ch2 = candidateContent[cursor];
|
|
123028
|
+
if (inString) {
|
|
123029
|
+
if (escaped) {
|
|
123030
|
+
escaped = false;
|
|
123031
|
+
} else if (ch2 === "\\") {
|
|
123032
|
+
escaped = true;
|
|
123033
|
+
} else if (ch2 === '"') {
|
|
123034
|
+
inString = false;
|
|
123035
|
+
}
|
|
123036
|
+
continue;
|
|
123037
|
+
}
|
|
123038
|
+
if (ch2 === '"') {
|
|
123039
|
+
inString = true;
|
|
123040
|
+
continue;
|
|
123041
|
+
}
|
|
123042
|
+
if (ch2 === "{") {
|
|
123043
|
+
depth += 1;
|
|
123044
|
+
continue;
|
|
123045
|
+
}
|
|
123046
|
+
if (ch2 === "}") {
|
|
123047
|
+
depth -= 1;
|
|
123048
|
+
if (depth === 0) {
|
|
123049
|
+
candidates.push(candidateContent.slice(startIndex, cursor + 1));
|
|
123050
|
+
break;
|
|
123051
|
+
}
|
|
123052
|
+
}
|
|
123053
|
+
}
|
|
123054
|
+
}
|
|
123055
|
+
}
|
|
123056
|
+
let bestPayload = null;
|
|
123057
|
+
let bestAllowedScore = -1;
|
|
123058
|
+
let bestScore = 0;
|
|
123059
|
+
const allowedSymbolSet = new Set(allowedSymbols);
|
|
123060
|
+
for (const candidate of candidates) {
|
|
123061
|
+
if (!candidate || !candidate.startsWith("{") || !candidate.endsWith("}")) {
|
|
123062
|
+
continue;
|
|
123063
|
+
}
|
|
123064
|
+
try {
|
|
123065
|
+
const parsed = JSON.parse(candidate);
|
|
123066
|
+
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
123067
|
+
const record6 = parsed;
|
|
123068
|
+
const decisionEntries = Object.entries(record6).filter(([, value]) => value && typeof value === "object" && !Array.isArray(value) && Object.prototype.hasOwnProperty.call(value, "decision"));
|
|
123069
|
+
const score = Object.prototype.hasOwnProperty.call(record6, "decision") ? 1 : decisionEntries.length;
|
|
123070
|
+
const allowedScore = decisionEntries.filter(([key]) => allowedSymbolSet.has(key)).length;
|
|
123071
|
+
if (allowedScore > bestAllowedScore || allowedScore === bestAllowedScore && score > bestScore) {
|
|
123072
|
+
bestPayload = record6;
|
|
123073
|
+
bestAllowedScore = allowedScore;
|
|
123074
|
+
bestScore = score;
|
|
123075
|
+
}
|
|
123076
|
+
}
|
|
123077
|
+
} catch {
|
|
123078
|
+
}
|
|
123079
|
+
}
|
|
123080
|
+
return bestPayload;
|
|
123081
|
+
};
|
|
123082
|
+
extractDecisionSymbolTrace = (rawText, allowedSymbols = []) => {
|
|
123083
|
+
const parsed = decodeDecisionTracePayload(rawText, allowedSymbols);
|
|
123084
|
+
if (!parsed) {
|
|
123085
|
+
return [];
|
|
123086
|
+
}
|
|
123087
|
+
if (Object.prototype.hasOwnProperty.call(parsed, "decision")) {
|
|
123088
|
+
return [{
|
|
123089
|
+
symbol: "direct",
|
|
123090
|
+
decision: normalizeDecisionLabel(parsed.decision),
|
|
123091
|
+
units: Math.max(0, Math.trunc(Number(parsed.units) || 0))
|
|
123092
|
+
}];
|
|
123093
|
+
}
|
|
123094
|
+
return Object.entries(parsed).flatMap(([symbol2, value]) => {
|
|
123095
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
123096
|
+
return [];
|
|
123097
|
+
}
|
|
123098
|
+
const scoped = value;
|
|
123099
|
+
if (!Object.prototype.hasOwnProperty.call(scoped, "decision")) {
|
|
123100
|
+
return [];
|
|
123101
|
+
}
|
|
123102
|
+
return [{
|
|
123103
|
+
symbol: symbol2,
|
|
123104
|
+
decision: normalizeDecisionLabel(scoped.decision),
|
|
123105
|
+
units: Math.max(0, Math.trunc(Number(scoped.units) || 0))
|
|
123106
|
+
}];
|
|
123107
|
+
});
|
|
123108
|
+
};
|
|
123109
|
+
buildMissingDecisionHold = (symbol2, reasoning = `No valid model decision was returned for configured symbol ${symbol2}.`) => ({
|
|
123110
|
+
symbol: symbol2,
|
|
123111
|
+
decision: "HOLD",
|
|
123112
|
+
units: 0,
|
|
123113
|
+
tradability: null,
|
|
123114
|
+
reasoning
|
|
123115
|
+
});
|
|
123116
|
+
buildDecisionPlansFromResponse = (rawText, promptSymbols, fallbackSymbol, fallbackDecision, fallbackUnits, fallbackTradability, fallbackReasoning) => {
|
|
123117
|
+
const normalizedPromptSymbols = normalizePromptSymbols(promptSymbols);
|
|
123118
|
+
const allowedSymbols = new Set(normalizedPromptSymbols);
|
|
123119
|
+
const payload = decodeDecisionTracePayload(rawText, normalizedPromptSymbols);
|
|
123120
|
+
const trace = extractDecisionSymbolTrace(rawText, normalizedPromptSymbols);
|
|
123121
|
+
const scopedTraceBySymbol = /* @__PURE__ */ new Map();
|
|
123122
|
+
for (const entry of trace) {
|
|
123123
|
+
const normalizedSymbol = String(entry.symbol || "").trim();
|
|
123124
|
+
if (normalizedSymbol && normalizedSymbol !== "DIRECT" && allowedSymbols.has(normalizedSymbol) && !scopedTraceBySymbol.has(normalizedSymbol)) {
|
|
123125
|
+
scopedTraceBySymbol.set(normalizedSymbol, entry);
|
|
123126
|
+
}
|
|
123127
|
+
}
|
|
123128
|
+
if (scopedTraceBySymbol.size > 0) {
|
|
123129
|
+
return normalizedPromptSymbols.map((normalizedSymbol) => {
|
|
123130
|
+
const entry = scopedTraceBySymbol.get(normalizedSymbol);
|
|
123131
|
+
if (!entry) {
|
|
123132
|
+
return buildMissingDecisionHold(normalizedSymbol);
|
|
123133
|
+
}
|
|
123134
|
+
const scopedPayload = payload?.[entry.symbol];
|
|
123135
|
+
const scopedText = scopedPayload && typeof scopedPayload === "object" && !Array.isArray(scopedPayload) ? JSON.stringify(scopedPayload) : rawText;
|
|
123136
|
+
const parsed = extractNormalizedDecision(scopedText, null, entry.symbol);
|
|
123137
|
+
const units = parsed.decision === "HOLD" ? 0 : parsed.units > 0 ? parsed.units : entry.units;
|
|
123138
|
+
return {
|
|
123139
|
+
symbol: normalizedSymbol,
|
|
123140
|
+
decision: parsed.decision,
|
|
123141
|
+
units,
|
|
123142
|
+
tradability: parsed.tradability,
|
|
123143
|
+
reasoning: parsed.reasoning
|
|
123144
|
+
};
|
|
123145
|
+
});
|
|
123146
|
+
}
|
|
123147
|
+
const directTrace = trace.find((entry) => normalizeHyperliquidMarketSymbol(entry.symbol) === "DIRECT");
|
|
123148
|
+
if (directTrace && normalizedPromptSymbols.length === 1) {
|
|
123149
|
+
return normalizedPromptSymbols.map((normalizedSymbol, index) => index === 0 ? {
|
|
123150
|
+
symbol: normalizedSymbol,
|
|
123151
|
+
decision: fallbackDecision,
|
|
123152
|
+
units: fallbackDecision === "HOLD" ? 0 : Math.max(0, Math.trunc(Number(fallbackUnits) || 0)),
|
|
123153
|
+
tradability: fallbackTradability,
|
|
123154
|
+
reasoning: fallbackReasoning
|
|
123155
|
+
} : buildMissingDecisionHold(normalizedSymbol));
|
|
123156
|
+
}
|
|
123157
|
+
if (directTrace && normalizedPromptSymbols.length > 1) {
|
|
123158
|
+
return normalizedPromptSymbols.map((normalizedSymbol) => buildMissingDecisionHold(
|
|
123159
|
+
normalizedSymbol,
|
|
123160
|
+
`Model response did not provide a symbol-keyed decision for configured symbol ${normalizedSymbol}.`
|
|
123161
|
+
));
|
|
123162
|
+
}
|
|
123163
|
+
const hasForeignSymbolDecision = trace.some((entry) => {
|
|
123164
|
+
const normalizedSymbol = String(entry.symbol || "").trim();
|
|
123165
|
+
return normalizedSymbol && normalizedSymbol !== "DIRECT" && !allowedSymbols.has(normalizedSymbol);
|
|
123166
|
+
});
|
|
123167
|
+
if (hasForeignSymbolDecision) {
|
|
123168
|
+
return normalizedPromptSymbols.map((normalizedSymbol) => buildMissingDecisionHold(
|
|
123169
|
+
normalizedSymbol,
|
|
123170
|
+
`Model response contained no decision for configured symbol ${normalizedSymbol}.`
|
|
123171
|
+
));
|
|
123172
|
+
}
|
|
123173
|
+
const normalizedFallbackSymbol = normalizedPromptSymbols.find(
|
|
123174
|
+
(promptSymbol) => promptSymbol === String(fallbackSymbol || "").trim()
|
|
123175
|
+
) ?? String(fallbackSymbol || "").trim();
|
|
123176
|
+
const fallbackPlan = {
|
|
123177
|
+
symbol: normalizedFallbackSymbol || fallbackSymbol,
|
|
123178
|
+
decision: fallbackDecision,
|
|
123179
|
+
units: fallbackDecision === "HOLD" ? 0 : Math.max(0, Math.trunc(Number(fallbackUnits) || 0)),
|
|
123180
|
+
tradability: fallbackTradability,
|
|
123181
|
+
reasoning: fallbackReasoning
|
|
123182
|
+
};
|
|
123183
|
+
if (normalizedPromptSymbols.length === 0) {
|
|
123184
|
+
return [fallbackPlan];
|
|
123185
|
+
}
|
|
123186
|
+
return normalizedPromptSymbols.map((normalizedSymbol) => normalizedSymbol === fallbackPlan.symbol ? fallbackPlan : buildMissingDecisionHold(normalizedSymbol));
|
|
123187
|
+
};
|
|
123188
|
+
readTraderReplyContent = (content, promptSymbols) => {
|
|
123189
|
+
const validationErrors = currentModelOutputValidationErrors(content, promptSymbols);
|
|
123190
|
+
if (validationErrors.length > 0) {
|
|
123191
|
+
return {
|
|
123192
|
+
validationErrors,
|
|
123193
|
+
decisionContent: JSON.stringify(Object.fromEntries(promptSymbols.map((promptSymbol) => [promptSymbol, {
|
|
123194
|
+
decision: "HOLD",
|
|
123195
|
+
units: 0,
|
|
123196
|
+
tradability: null,
|
|
123197
|
+
reasoning: SERVER_UNREADABLE_REPLY_HOLD_REASONING
|
|
123198
|
+
}])))
|
|
123199
|
+
};
|
|
123200
|
+
}
|
|
123201
|
+
return { validationErrors, decisionContent: projectCurrentModelDecisionContent(String(content)) };
|
|
123202
|
+
};
|
|
123203
|
+
traderDecisionPlans = (decisionContent, promptSymbols, symbol2) => {
|
|
123204
|
+
const parsed = extractNormalizedDecision(decisionContent, null, symbol2);
|
|
123205
|
+
return {
|
|
123206
|
+
parsed,
|
|
123207
|
+
plans: buildDecisionPlansFromResponse(
|
|
123208
|
+
decisionContent,
|
|
123209
|
+
promptSymbols,
|
|
123210
|
+
symbol2,
|
|
123211
|
+
parsed.decision,
|
|
123212
|
+
parsed.units,
|
|
123213
|
+
parsed.tradability,
|
|
123214
|
+
parsed.reasoning
|
|
123215
|
+
)
|
|
123216
|
+
};
|
|
123217
|
+
};
|
|
123218
|
+
}
|
|
123219
|
+
});
|
|
123220
|
+
|
|
123221
|
+
// lib/runtime/sl-tp-execution-settings.ts
|
|
123222
|
+
var RISK_MODES, STOP_LOSS_TYPES, invalid2, booleanField, numberField, enumField, buildRuntimeSlTpExecutionSettings;
|
|
123223
|
+
var init_sl_tp_execution_settings = __esm({
|
|
123224
|
+
"lib/runtime/sl-tp-execution-settings.ts"() {
|
|
123225
|
+
"use strict";
|
|
123226
|
+
init_define_VTX_CLAUDE_CODE_POLICY();
|
|
123227
|
+
init_define_VTX_EXO_POLICY();
|
|
123228
|
+
init_define_VTX_GROK_POLICY();
|
|
123229
|
+
init_define_VTX_PI_MODEL_POLICY();
|
|
123230
|
+
init_runtime_error_reason_rules();
|
|
123231
|
+
RISK_MODES = ["percent", "usdc"];
|
|
123232
|
+
STOP_LOSS_TYPES = ["fixed", "trailing"];
|
|
123233
|
+
invalid2 = (key) => new RuntimeReasonError(
|
|
123234
|
+
`The bot's resolved Auto SL/TP settings have no valid ${key}.`,
|
|
123235
|
+
"runtime_config_missing"
|
|
123236
|
+
);
|
|
123237
|
+
booleanField = (resolved, key) => {
|
|
123238
|
+
const value = resolved[key];
|
|
123239
|
+
if (typeof value !== "boolean") throw invalid2(key);
|
|
123240
|
+
return value;
|
|
123241
|
+
};
|
|
123242
|
+
numberField = (resolved, key) => {
|
|
123243
|
+
const value = resolved[key];
|
|
123244
|
+
if (typeof value !== "number" || !Number.isFinite(value)) throw invalid2(key);
|
|
123245
|
+
return value;
|
|
123246
|
+
};
|
|
123247
|
+
enumField = (resolved, key, allowed) => {
|
|
123248
|
+
const value = resolved[key];
|
|
123249
|
+
if (!allowed.includes(value)) throw invalid2(key);
|
|
123250
|
+
return value;
|
|
123251
|
+
};
|
|
123252
|
+
buildRuntimeSlTpExecutionSettings = (settings, _config) => {
|
|
123253
|
+
const error48 = settings.sl_tp_execution_settings_error;
|
|
123254
|
+
if (typeof error48 === "string" && error48.trim()) throw new Error(error48);
|
|
123255
|
+
const resolved = settings.sl_tp_execution_settings;
|
|
123256
|
+
if (!resolved || typeof resolved !== "object" || Array.isArray(resolved)) {
|
|
123257
|
+
throw new RuntimeReasonError("The bot's preferences carry no resolved Auto SL/TP settings.", "runtime_config_missing");
|
|
123258
|
+
}
|
|
123259
|
+
const values = resolved;
|
|
123260
|
+
return {
|
|
123261
|
+
tpSlEnabled: booleanField(values, "tp_sl_enabled"),
|
|
123262
|
+
stopLossEnabled: booleanField(values, "sl_enabled"),
|
|
123263
|
+
stopLossType: enumField(values, "stop_loss_type", STOP_LOSS_TYPES),
|
|
123264
|
+
stopLossMode: enumField(values, "stop_loss_mode", RISK_MODES),
|
|
123265
|
+
stopLossPct: numberField(values, "stop_loss_pct"),
|
|
123266
|
+
stopLossUsdc: numberField(values, "stop_loss_usdc"),
|
|
123267
|
+
takeProfitEnabled: booleanField(values, "tp_enabled"),
|
|
123268
|
+
takeProfitMode: enumField(values, "take_profit_mode", RISK_MODES),
|
|
123269
|
+
takeProfitPct: numberField(values, "take_profit_pct"),
|
|
123270
|
+
takeProfitUsdc: numberField(values, "take_profit_usdc")
|
|
123271
|
+
};
|
|
123272
|
+
};
|
|
123273
|
+
}
|
|
123274
|
+
});
|
|
123275
|
+
|
|
123276
|
+
// lib/runtime/agent-instruction-carry.ts
|
|
123277
|
+
var carryAgentInstruction, carriedAgentInstruction;
|
|
123278
|
+
var init_agent_instruction_carry = __esm({
|
|
123279
|
+
"lib/runtime/agent-instruction-carry.ts"() {
|
|
123280
|
+
"use strict";
|
|
123281
|
+
init_define_VTX_CLAUDE_CODE_POLICY();
|
|
123282
|
+
init_define_VTX_EXO_POLICY();
|
|
123283
|
+
init_define_VTX_GROK_POLICY();
|
|
123284
|
+
init_define_VTX_PI_MODEL_POLICY();
|
|
123285
|
+
carryAgentInstruction = (error48, binding) => {
|
|
123286
|
+
if (!binding || !error48 || typeof error48 !== "object" && typeof error48 !== "function") return error48;
|
|
123287
|
+
error48.runtimeExternalAgentInstruction = binding;
|
|
123288
|
+
return error48;
|
|
123289
|
+
};
|
|
123290
|
+
carriedAgentInstruction = (error48) => {
|
|
123291
|
+
if (!error48 || typeof error48 !== "object" && typeof error48 !== "function") return null;
|
|
123292
|
+
const binding = error48.runtimeExternalAgentInstruction;
|
|
123293
|
+
return binding && typeof binding === "object" ? binding : null;
|
|
123294
|
+
};
|
|
123295
|
+
}
|
|
123296
|
+
});
|
|
123297
|
+
|
|
122989
123298
|
// lib/runtime/perp-dex-scope.ts
|
|
122990
123299
|
var perpDexScopeForSymbols, equityVenuesForSymbols, profileEquityVenues, profileExchanges, positionsOnVenues;
|
|
122991
123300
|
var init_perp_dex_scope = __esm({
|
|
@@ -123724,6 +124033,7 @@ var init_client_panel_reads = __esm({
|
|
|
123724
124033
|
init_define_VTX_GROK_POLICY();
|
|
123725
124034
|
init_define_VTX_PI_MODEL_POLICY();
|
|
123726
124035
|
init_api2();
|
|
124036
|
+
init_profiles();
|
|
123727
124037
|
init_constants();
|
|
123728
124038
|
init_executionMode();
|
|
123729
124039
|
init_runtime_policy_generated2();
|
|
@@ -126331,6 +126641,39 @@ var init_render = __esm({
|
|
|
126331
126641
|
}
|
|
126332
126642
|
});
|
|
126333
126643
|
|
|
126644
|
+
// lib/runtime/runtime-cycle-observation.ts
|
|
126645
|
+
var observeRuntimeCycle, observeAccountState;
|
|
126646
|
+
var init_runtime_cycle_observation = __esm({
|
|
126647
|
+
"lib/runtime/runtime-cycle-observation.ts"() {
|
|
126648
|
+
"use strict";
|
|
126649
|
+
init_define_VTX_CLAUDE_CODE_POLICY();
|
|
126650
|
+
init_define_VTX_EXO_POLICY();
|
|
126651
|
+
init_define_VTX_GROK_POLICY();
|
|
126652
|
+
init_define_VTX_PI_MODEL_POLICY();
|
|
126653
|
+
observeRuntimeCycle = (input, observation) => {
|
|
126654
|
+
try {
|
|
126655
|
+
input.onCycleObservation?.(observation);
|
|
126656
|
+
} catch {
|
|
126657
|
+
}
|
|
126658
|
+
};
|
|
126659
|
+
observeAccountState = (input, state2) => {
|
|
126660
|
+
const evidence2 = state2.evidence;
|
|
126661
|
+
observeRuntimeCycle(input, {
|
|
126662
|
+
account_state: {
|
|
126663
|
+
source: evidence2 ? `browser_hl_${evidence2.source}` : "browser_hl_unknown",
|
|
126664
|
+
observed_at: new Date(evidence2?.observedAtMs ?? Date.now()).toISOString(),
|
|
126665
|
+
fetched_at: evidence2 ? new Date(evidence2.fetchedAtMs).toISOString() : null,
|
|
126666
|
+
source_timestamp: null,
|
|
126667
|
+
cache_age_ms: evidence2?.cacheAgeMs ?? null,
|
|
126668
|
+
node_lag_ms: null,
|
|
126669
|
+
freshness_limit_ms: evidence2?.freshnessLimitMs ?? null,
|
|
126670
|
+
position_state: Array.isArray(state2.positions) ? state2.positions.some((position) => Number(position.size) !== 0) ? "open" : "flat" : "unknown"
|
|
126671
|
+
}
|
|
126672
|
+
});
|
|
126673
|
+
};
|
|
126674
|
+
}
|
|
126675
|
+
});
|
|
126676
|
+
|
|
126334
126677
|
// lib/runtime/client-account-report.ts
|
|
126335
126678
|
var sumPositionUnrealizedPnl2, resolveTotalUnrealizedPnl2, buildPromptParityAccountContext, finiteOrNull4, buildClientExchangeSnapshot;
|
|
126336
126679
|
var init_client_account_report = __esm({
|
|
@@ -132206,7 +132549,7 @@ __export(local_analysis_exports, {
|
|
|
132206
132549
|
toPositiveFinite: () => toPositiveFinite2,
|
|
132207
132550
|
unwrapRuntimeCycleSettledResult: () => unwrapRuntimeCycleSettledResult
|
|
132208
132551
|
});
|
|
132209
|
-
var cycleCandles, CYCLE_TIMEOUT_FLOOR_MS, DECISION_SETTLEMENT_RESERVE_MAX_BUDGET_DIVISOR, MIN_AGENT_INSTRUCTION_RETRY_AFTER_MS, PROMPT_PARITY_ERROR_DETAIL_MAX_CHARS, EXTERNAL_INFERENCE_RUNTIME_POLL_INTERVAL_MS, EXTERNAL_INFERENCE_RESULT_WAIT_MS, assertPromptModelController, resolveRuntimeReasoningControlsForModel,
|
|
132552
|
+
var cycleCandles, CYCLE_TIMEOUT_FLOOR_MS, DECISION_SETTLEMENT_RESERVE_MAX_BUDGET_DIVISOR, MIN_AGENT_INSTRUCTION_RETRY_AFTER_MS, PROMPT_PARITY_ERROR_DETAIL_MAX_CHARS, EXTERNAL_INFERENCE_RUNTIME_POLL_INTERVAL_MS, EXTERNAL_INFERENCE_RESULT_WAIT_MS, assertPromptModelController, resolveRuntimeReasoningControlsForModel, aiOrderSlippageFraction, buildServerBehaviorStateArtifacts, ClientRuntimeAgentInstructionEmpty, isClientRuntimeAgentInstructionEmpty, ClientRuntimeAiSchedulePaused, ClientRuntimeAiScheduleStillActive, isClientRuntimeAiScheduleStillActive, ServerDispatchAccountStateStale, isServerDispatchAccountStateStale, isClientRuntimeAiSchedulePaused, judgesPositionCaps, NO_POSITION_CAPS, POSITION_CAP_REFUSALS, judgeCyclePlans, capacityTrimOf, tradabilityExecutionBlock, accountSnapshotCapturedAt, buildClaimedAgentRuntimeCycleResult, resolveRuntimeMarginModePreference, resolveRuntimeLeveragePreference, resolveBooleanSetting, CLIENT_RUNTIME_LIVE_CONTEXT_UNAVAILABLE_ERRORS, BEHAVIOR_STATE_UNAVAILABLE_ERROR, CriticalBehaviorStateError, BEHAVIOR_MEMORY_UNAVAILABLE_ERROR, BehaviorMemoryUnavailableError, clampNumber, resolveExternalInferenceRuntimeTimeoutSeconds, toPositiveFinite2, EFFECTIVE_INPUT_MANIFEST_SCHEMA_VERSION, PROMPT_ASSEMBLY_DEFINITION_VERSION, RUNTIME_SOURCE_DEFINITION_VERSION, DECISION_INPUT_DEFINITION_VERSION, CONTEXT_ENVELOPE_DEFINITION_VERSION, CLIENT_RUNTIME_SOURCE_VERSION, CLIENT_MAIN_PROMPT_RENDERER, CLIENT_REVIEW_PROMPT_RENDERER, resolveEffectivePromptRuntimeProvenance, canonicalManifestValue, canonicalManifestJson, sha256ManifestHex, effectiveInputComponent, buildEffectiveInputManifest, MANIFEST_COMPONENT_NAME, derivePromptVisibleSections, formatDecisionSymbolTrace, formatActionableDecisionSymbols, decisionRecordsBySymbol, buildReviewCandidatePlansFromResponse, forceUnavailableSymbolsToHold, extractTemplatePlaceholders, requireReviewPrimaryUserPromptTemplate, containsCompetingBehaviorStateMarkup, containsCompetingMainBehaviorStateMarkup, requireStrategyReviewTemplates, preflightStrategyReviewPromptContract, extractRuntimeReasoningSelection, isAbortError, isRuntimeTimeoutAbortReason, createAbortError2, settleRuntimeCyclePromise, unwrapRuntimeCycleSettledResult, normalizeRuntimeSymbol, PromptContractFetchError, isLivePromptContextUnavailableError, buildFailClosedHoldResult, buildPromptConstructionFailureResult, buildLivePromptContextUnavailableFailureResult, pickFirstString, normalizeRuntimeStringList, requirePositiveRuntimeLimit, resolveRuntimeTradingScope, normalizeRuntimeProviderAlias, resolveCatalogModelEntry, createClientRuntimeProviderSetupError, createProviderSetupRejectionError, evaluateModelEligibility, extractReviewRuntimeReasoningSelection, isUsableRuntimeSettingsFallback, resolveRuntimeSettings, formatRuntimeDurationMs, normalizeRuntimeTimingNote, appendRuntimeTimingEvent, reportPromptParityTelemetry, resolveLocalRuntimeSecretRequirements, resolveLocalRuntimeSecretProvider, AI_INDICATOR_KEYS_NEWER_THAN_SOME_SERVERS, sortTradingTimeframes, normalizePromptIdentityTimestamp, resolveCompletedCandleBoundary, normalizeAiIndicatorFlags, getPromptLookback, resolvePromptRelativeVolumeContext, promptRelativeVolumeBaseline, CANDLE_CLOSE_TICKER_TIMEFRAME, candleCloseTicker, promptMarketAsOfTimestamp, deviceMarketReads, buildPromptCandlesPayload, capacityUnitSize, sanitizePromptSymbol, fillTimeMs, fillSize, normalizeFillSide, normalizeFillOrderId, normalizeFillRiskOrderIdentity, fillStartPosition, fillSortValue, sortFillsAscending, sortFillsDescending, inferEntryFromStartPositionChain, inferEntryFromCurrentPositionSize, calculateCurrentPositionState, calculatePositionEntryTimes, countPositionAdds, latestPositionRiskIncreaseTimeMs, latestPositionRiskIncreaseEvidence, roundPositiveDecimalHalfUp, compactPromptLastTrade, requireRenderedStrategyBehaviorState, canonicalFillSideForRiskEvidence, isValidRiskEvidenceFill, isValidCampaignBoundaryFill, normalizeFillHistoryCoverage, resolveFillHistoryCoverageForSymbol, buildPromptBehaviorStateArtifacts, buildReviewSystemPrompt, formatReviewUserPrompt, assemblePromptContextVars, buildPromptBehaviorStateValue, buildLocalRuntimePromptArtifacts2, createRuntimeId2, asRecord, buildRuntimeConstraintRejectionMessage, hasDeviceProviderSecret, requireNonEmptyStringField, requirePositiveIntegerField, compareContractVersion, parsePromptContractTimestamp, assertPromptContractCompatibility, assertPromptContractTemporalBounds, sleepWithAbort, requireAgentPollRetryAfterMs, materializeClaimedClientRuntimeAgentInstruction, attachClientRuntimeErrorProvenance, isExternalRuntimeProviderResult, invokeClientExternalInference, assertPromptContractBindingTupleEqual, assertPromptContractScopeMatch, fetchBoundPromptContracts, carryReturnedModelCalls, requireRuntimePositionsInstructions2, resolveRuntimePromptDerivedBlocks, requireRuntimePromptLane, requireRuntimeAccountMarginNote, runLocalRuntimeCycle;
|
|
132210
132553
|
var init_local_analysis = __esm({
|
|
132211
132554
|
"lib/runtime/local-analysis.ts"() {
|
|
132212
132555
|
"use strict";
|
|
@@ -132215,6 +132558,9 @@ var init_local_analysis = __esm({
|
|
|
132215
132558
|
init_define_VTX_GROK_POLICY();
|
|
132216
132559
|
init_define_VTX_PI_MODEL_POLICY();
|
|
132217
132560
|
init_review_failure_wording();
|
|
132561
|
+
init_trader_max_tokens();
|
|
132562
|
+
init_decision_plans();
|
|
132563
|
+
init_decision_plans();
|
|
132218
132564
|
init_sl_tp_execution_settings();
|
|
132219
132565
|
init_execution_capacity();
|
|
132220
132566
|
init_agent_instruction_carry();
|
|
@@ -132240,6 +132586,7 @@ var init_local_analysis = __esm({
|
|
|
132240
132586
|
init_decision_contract();
|
|
132241
132587
|
init_constraint_contract();
|
|
132242
132588
|
init_execution_guard_contract();
|
|
132589
|
+
init_runtime_cycle_observation();
|
|
132243
132590
|
init_exchange_executor();
|
|
132244
132591
|
init_client_account_report();
|
|
132245
132592
|
init_hyperliquid_public_read();
|
|
@@ -132304,27 +132651,6 @@ var init_local_analysis = __esm({
|
|
|
132304
132651
|
resolveRuntimeReasoningControlsForModel = (modelConfig, provider, source) => {
|
|
132305
132652
|
return normalizeReasoningControls(null);
|
|
132306
132653
|
};
|
|
132307
|
-
observeRuntimeCycle = (input, observation) => {
|
|
132308
|
-
try {
|
|
132309
|
-
input.onCycleObservation?.(observation);
|
|
132310
|
-
} catch {
|
|
132311
|
-
}
|
|
132312
|
-
};
|
|
132313
|
-
observeAccountState = (input, state2) => {
|
|
132314
|
-
const evidence2 = state2.evidence;
|
|
132315
|
-
observeRuntimeCycle(input, {
|
|
132316
|
-
account_state: {
|
|
132317
|
-
source: evidence2 ? `browser_hl_${evidence2.source}` : "browser_hl_unknown",
|
|
132318
|
-
observed_at: new Date(evidence2?.observedAtMs ?? Date.now()).toISOString(),
|
|
132319
|
-
fetched_at: evidence2 ? new Date(evidence2.fetchedAtMs).toISOString() : null,
|
|
132320
|
-
source_timestamp: null,
|
|
132321
|
-
cache_age_ms: evidence2?.cacheAgeMs ?? null,
|
|
132322
|
-
node_lag_ms: null,
|
|
132323
|
-
freshness_limit_ms: evidence2?.freshnessLimitMs ?? null,
|
|
132324
|
-
position_state: Array.isArray(state2.positions) ? state2.positions.some((position) => Number(position.size) !== 0) ? "open" : "flat" : "unknown"
|
|
132325
|
-
}
|
|
132326
|
-
});
|
|
132327
|
-
};
|
|
132328
132654
|
aiOrderSlippageFraction = (config2, executionMode) => executionMode === "server" ? Number(config2.server_ai_max_slippage) / PERCENT_SCALE : clampNumber(void 0, config2.default_max_slippage) / PERCENT_SCALE;
|
|
132329
132655
|
buildServerBehaviorStateArtifacts = (inputs, options) => buildPromptBehaviorStateArtifacts({
|
|
132330
132656
|
fills: inputs.fills,
|
|
@@ -132845,9 +133171,9 @@ var init_local_analysis = __esm({
|
|
|
132845
133171
|
RUNTIME_SOURCE_DEFINITION_VERSION = "runtime-source-v1";
|
|
132846
133172
|
DECISION_INPUT_DEFINITION_VERSION = "decision-input-v1";
|
|
132847
133173
|
CONTEXT_ENVELOPE_DEFINITION_VERSION = "context-envelope-v2.1";
|
|
132848
|
-
CLIENT_RUNTIME_SOURCE_VERSION = typeof process !== "undefined" && true && "
|
|
132849
|
-
"
|
|
132850
|
-
) ? "
|
|
133174
|
+
CLIENT_RUNTIME_SOURCE_VERSION = typeof process !== "undefined" && true && "541fa84732467b9dcd17559fe28b51bc56b0d5de".trim() && !["unknown", "unstamped", "development"].includes(
|
|
133175
|
+
"541fa84732467b9dcd17559fe28b51bc56b0d5de".trim().toLowerCase()
|
|
133176
|
+
) ? "541fa84732467b9dcd17559fe28b51bc56b0d5de".trim() : null;
|
|
132851
133177
|
CLIENT_MAIN_PROMPT_RENDERER = "client_runtime.buildLocalRuntimePromptArtifacts:v1";
|
|
132852
133178
|
CLIENT_REVIEW_PROMPT_RENDERER = "client_runtime.review_prompt_assembly:v1";
|
|
132853
133179
|
resolveEffectivePromptRuntimeProvenance = (input) => ({
|
|
@@ -132980,103 +133306,6 @@ var init_local_analysis = __esm({
|
|
|
132980
133306
|
return Boolean(renderedValue) && finalPromptText.includes(renderedValue);
|
|
132981
133307
|
}).map(([name]) => name));
|
|
132982
133308
|
};
|
|
132983
|
-
decodeDecisionTracePayload = (rawText, allowedSymbols = []) => {
|
|
132984
|
-
const text2 = String(rawText ?? "").trim();
|
|
132985
|
-
const fencedMatch = text2.match(/^```(?:json)?\s*\n?([\s\S]*?)\n?```$/i);
|
|
132986
|
-
const content = fencedMatch ? String(fencedMatch[1] ?? "").trim() : text2;
|
|
132987
|
-
const candidates = [];
|
|
132988
|
-
const contentVariants = Array.from(/* @__PURE__ */ new Set([content, repairJsonStringSyntax(content)]));
|
|
132989
|
-
for (const candidateContent of contentVariants) {
|
|
132990
|
-
for (let startIndex = 0; startIndex < candidateContent.length; startIndex += 1) {
|
|
132991
|
-
if (candidateContent[startIndex] !== "{") {
|
|
132992
|
-
continue;
|
|
132993
|
-
}
|
|
132994
|
-
let depth = 0;
|
|
132995
|
-
let inString = false;
|
|
132996
|
-
let escaped = false;
|
|
132997
|
-
for (let cursor = startIndex; cursor < candidateContent.length; cursor += 1) {
|
|
132998
|
-
const ch2 = candidateContent[cursor];
|
|
132999
|
-
if (inString) {
|
|
133000
|
-
if (escaped) {
|
|
133001
|
-
escaped = false;
|
|
133002
|
-
} else if (ch2 === "\\") {
|
|
133003
|
-
escaped = true;
|
|
133004
|
-
} else if (ch2 === '"') {
|
|
133005
|
-
inString = false;
|
|
133006
|
-
}
|
|
133007
|
-
continue;
|
|
133008
|
-
}
|
|
133009
|
-
if (ch2 === '"') {
|
|
133010
|
-
inString = true;
|
|
133011
|
-
continue;
|
|
133012
|
-
}
|
|
133013
|
-
if (ch2 === "{") {
|
|
133014
|
-
depth += 1;
|
|
133015
|
-
continue;
|
|
133016
|
-
}
|
|
133017
|
-
if (ch2 === "}") {
|
|
133018
|
-
depth -= 1;
|
|
133019
|
-
if (depth === 0) {
|
|
133020
|
-
candidates.push(candidateContent.slice(startIndex, cursor + 1));
|
|
133021
|
-
break;
|
|
133022
|
-
}
|
|
133023
|
-
}
|
|
133024
|
-
}
|
|
133025
|
-
}
|
|
133026
|
-
}
|
|
133027
|
-
let bestPayload = null;
|
|
133028
|
-
let bestAllowedScore = -1;
|
|
133029
|
-
let bestScore = 0;
|
|
133030
|
-
const allowedSymbolSet = new Set(allowedSymbols);
|
|
133031
|
-
for (const candidate of candidates) {
|
|
133032
|
-
if (!candidate || !candidate.startsWith("{") || !candidate.endsWith("}")) {
|
|
133033
|
-
continue;
|
|
133034
|
-
}
|
|
133035
|
-
try {
|
|
133036
|
-
const parsed = JSON.parse(candidate);
|
|
133037
|
-
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
133038
|
-
const record6 = parsed;
|
|
133039
|
-
const decisionEntries = Object.entries(record6).filter(([, value]) => value && typeof value === "object" && !Array.isArray(value) && Object.prototype.hasOwnProperty.call(value, "decision"));
|
|
133040
|
-
const score = Object.prototype.hasOwnProperty.call(record6, "decision") ? 1 : decisionEntries.length;
|
|
133041
|
-
const allowedScore = decisionEntries.filter(([key]) => allowedSymbolSet.has(key)).length;
|
|
133042
|
-
if (allowedScore > bestAllowedScore || allowedScore === bestAllowedScore && score > bestScore) {
|
|
133043
|
-
bestPayload = record6;
|
|
133044
|
-
bestAllowedScore = allowedScore;
|
|
133045
|
-
bestScore = score;
|
|
133046
|
-
}
|
|
133047
|
-
}
|
|
133048
|
-
} catch {
|
|
133049
|
-
}
|
|
133050
|
-
}
|
|
133051
|
-
return bestPayload;
|
|
133052
|
-
};
|
|
133053
|
-
extractDecisionSymbolTrace = (rawText, allowedSymbols = []) => {
|
|
133054
|
-
const parsed = decodeDecisionTracePayload(rawText, allowedSymbols);
|
|
133055
|
-
if (!parsed) {
|
|
133056
|
-
return [];
|
|
133057
|
-
}
|
|
133058
|
-
if (Object.prototype.hasOwnProperty.call(parsed, "decision")) {
|
|
133059
|
-
return [{
|
|
133060
|
-
symbol: "direct",
|
|
133061
|
-
decision: normalizeDecisionLabel(parsed.decision),
|
|
133062
|
-
units: Math.max(0, Math.trunc(Number(parsed.units) || 0))
|
|
133063
|
-
}];
|
|
133064
|
-
}
|
|
133065
|
-
return Object.entries(parsed).flatMap(([symbol2, value]) => {
|
|
133066
|
-
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
133067
|
-
return [];
|
|
133068
|
-
}
|
|
133069
|
-
const scoped = value;
|
|
133070
|
-
if (!Object.prototype.hasOwnProperty.call(scoped, "decision")) {
|
|
133071
|
-
return [];
|
|
133072
|
-
}
|
|
133073
|
-
return [{
|
|
133074
|
-
symbol: symbol2,
|
|
133075
|
-
decision: normalizeDecisionLabel(scoped.decision),
|
|
133076
|
-
units: Math.max(0, Math.trunc(Number(scoped.units) || 0))
|
|
133077
|
-
}];
|
|
133078
|
-
});
|
|
133079
|
-
};
|
|
133080
133309
|
formatDecisionSymbolTrace = (symbols) => symbols.length > 0 ? symbols.map((entry) => `${entry.symbol}:${entry.decision}/${entry.units}`).join(",") : "none";
|
|
133081
133310
|
formatActionableDecisionSymbols = (symbols) => formatDecisionSymbolTrace(symbols.filter((entry) => entry.decision !== "HOLD" && entry.units > 0));
|
|
133082
133311
|
decisionRecordsBySymbol = (plans) => Object.fromEntries(plans.map((plan) => [plan.symbol, {
|
|
@@ -133085,86 +133314,6 @@ var init_local_analysis = __esm({
|
|
|
133085
133314
|
units: plan.units,
|
|
133086
133315
|
tradability: plan.tradability
|
|
133087
133316
|
}]));
|
|
133088
|
-
SERVER_UNREADABLE_REPLY_HOLD_REASONING = "Configured symbol was omitted from the model response. Defaulted to HOLD.";
|
|
133089
|
-
buildMissingDecisionHold = (symbol2, reasoning = `No valid model decision was returned for configured symbol ${symbol2}.`) => ({
|
|
133090
|
-
symbol: symbol2,
|
|
133091
|
-
decision: "HOLD",
|
|
133092
|
-
units: 0,
|
|
133093
|
-
tradability: null,
|
|
133094
|
-
reasoning
|
|
133095
|
-
});
|
|
133096
|
-
buildDecisionPlansFromResponse = (rawText, promptSymbols, fallbackSymbol, fallbackDecision, fallbackUnits, fallbackTradability, fallbackReasoning) => {
|
|
133097
|
-
const normalizedPromptSymbols = normalizePromptSymbols(promptSymbols);
|
|
133098
|
-
const allowedSymbols = new Set(normalizedPromptSymbols);
|
|
133099
|
-
const payload = decodeDecisionTracePayload(rawText, normalizedPromptSymbols);
|
|
133100
|
-
const trace = extractDecisionSymbolTrace(rawText, normalizedPromptSymbols);
|
|
133101
|
-
const scopedTraceBySymbol = /* @__PURE__ */ new Map();
|
|
133102
|
-
for (const entry of trace) {
|
|
133103
|
-
const normalizedSymbol = String(entry.symbol || "").trim();
|
|
133104
|
-
if (normalizedSymbol && normalizedSymbol !== "DIRECT" && allowedSymbols.has(normalizedSymbol) && !scopedTraceBySymbol.has(normalizedSymbol)) {
|
|
133105
|
-
scopedTraceBySymbol.set(normalizedSymbol, entry);
|
|
133106
|
-
}
|
|
133107
|
-
}
|
|
133108
|
-
if (scopedTraceBySymbol.size > 0) {
|
|
133109
|
-
return normalizedPromptSymbols.map((normalizedSymbol) => {
|
|
133110
|
-
const entry = scopedTraceBySymbol.get(normalizedSymbol);
|
|
133111
|
-
if (!entry) {
|
|
133112
|
-
return buildMissingDecisionHold(normalizedSymbol);
|
|
133113
|
-
}
|
|
133114
|
-
const scopedPayload = payload?.[entry.symbol];
|
|
133115
|
-
const scopedText = scopedPayload && typeof scopedPayload === "object" && !Array.isArray(scopedPayload) ? JSON.stringify(scopedPayload) : rawText;
|
|
133116
|
-
const parsed = extractNormalizedDecision(scopedText, null, entry.symbol);
|
|
133117
|
-
const units = parsed.decision === "HOLD" ? 0 : parsed.units > 0 ? parsed.units : entry.units;
|
|
133118
|
-
return {
|
|
133119
|
-
symbol: normalizedSymbol,
|
|
133120
|
-
decision: parsed.decision,
|
|
133121
|
-
units,
|
|
133122
|
-
tradability: parsed.tradability,
|
|
133123
|
-
reasoning: parsed.reasoning
|
|
133124
|
-
};
|
|
133125
|
-
});
|
|
133126
|
-
}
|
|
133127
|
-
const directTrace = trace.find((entry) => normalizeHyperliquidMarketSymbol(entry.symbol) === "DIRECT");
|
|
133128
|
-
if (directTrace && normalizedPromptSymbols.length === 1) {
|
|
133129
|
-
return normalizedPromptSymbols.map((normalizedSymbol, index) => index === 0 ? {
|
|
133130
|
-
symbol: normalizedSymbol,
|
|
133131
|
-
decision: fallbackDecision,
|
|
133132
|
-
units: fallbackDecision === "HOLD" ? 0 : Math.max(0, Math.trunc(Number(fallbackUnits) || 0)),
|
|
133133
|
-
tradability: fallbackTradability,
|
|
133134
|
-
reasoning: fallbackReasoning
|
|
133135
|
-
} : buildMissingDecisionHold(normalizedSymbol));
|
|
133136
|
-
}
|
|
133137
|
-
if (directTrace && normalizedPromptSymbols.length > 1) {
|
|
133138
|
-
return normalizedPromptSymbols.map((normalizedSymbol) => buildMissingDecisionHold(
|
|
133139
|
-
normalizedSymbol,
|
|
133140
|
-
`Model response did not provide a symbol-keyed decision for configured symbol ${normalizedSymbol}.`
|
|
133141
|
-
));
|
|
133142
|
-
}
|
|
133143
|
-
const hasForeignSymbolDecision = trace.some((entry) => {
|
|
133144
|
-
const normalizedSymbol = String(entry.symbol || "").trim();
|
|
133145
|
-
return normalizedSymbol && normalizedSymbol !== "DIRECT" && !allowedSymbols.has(normalizedSymbol);
|
|
133146
|
-
});
|
|
133147
|
-
if (hasForeignSymbolDecision) {
|
|
133148
|
-
return normalizedPromptSymbols.map((normalizedSymbol) => buildMissingDecisionHold(
|
|
133149
|
-
normalizedSymbol,
|
|
133150
|
-
`Model response contained no decision for configured symbol ${normalizedSymbol}.`
|
|
133151
|
-
));
|
|
133152
|
-
}
|
|
133153
|
-
const normalizedFallbackSymbol = normalizedPromptSymbols.find(
|
|
133154
|
-
(promptSymbol) => promptSymbol === String(fallbackSymbol || "").trim()
|
|
133155
|
-
) ?? String(fallbackSymbol || "").trim();
|
|
133156
|
-
const fallbackPlan = {
|
|
133157
|
-
symbol: normalizedFallbackSymbol || fallbackSymbol,
|
|
133158
|
-
decision: fallbackDecision,
|
|
133159
|
-
units: fallbackDecision === "HOLD" ? 0 : Math.max(0, Math.trunc(Number(fallbackUnits) || 0)),
|
|
133160
|
-
tradability: fallbackTradability,
|
|
133161
|
-
reasoning: fallbackReasoning
|
|
133162
|
-
};
|
|
133163
|
-
if (normalizedPromptSymbols.length === 0) {
|
|
133164
|
-
return [fallbackPlan];
|
|
133165
|
-
}
|
|
133166
|
-
return normalizedPromptSymbols.map((normalizedSymbol) => normalizedSymbol === fallbackPlan.symbol ? fallbackPlan : buildMissingDecisionHold(normalizedSymbol));
|
|
133167
|
-
};
|
|
133168
133317
|
buildReviewCandidatePlansFromResponse = (rawText, promptSymbols, fallbackPlans) => {
|
|
133169
133318
|
const normalizedPromptSymbols = normalizePromptSymbols(promptSymbols);
|
|
133170
133319
|
const allowedSymbols = new Set(normalizedPromptSymbols);
|
|
@@ -133400,13 +133549,6 @@ ${reviewOutputContract}`;
|
|
|
133400
133549
|
}
|
|
133401
133550
|
throw result.error;
|
|
133402
133551
|
};
|
|
133403
|
-
normalizeDecisionLabel = (value) => {
|
|
133404
|
-
const normalized = String(value ?? "").trim().toUpperCase();
|
|
133405
|
-
if (normalized === "BUY" || normalized === "SELL") {
|
|
133406
|
-
return normalized;
|
|
133407
|
-
}
|
|
133408
|
-
return "HOLD";
|
|
133409
|
-
};
|
|
133410
133552
|
normalizeRuntimeSymbol = normalizeHyperliquidMarketSymbol;
|
|
133411
133553
|
PromptContractFetchError = class extends Error {
|
|
133412
133554
|
constructor(message, metadata) {
|
|
@@ -135760,6 +135902,7 @@ ${stringifyPromptJson(withUtcCandleOpenTimes(parts.candlesPayload))}
|
|
|
135760
135902
|
const accountStateStartedAtMs = Date.now();
|
|
135761
135903
|
let promptRescueSequence = input.dispatchContextRebuild === true ? PROMPT_RESCUE_ASKS_PER_CYCLE_BUILD : 0;
|
|
135762
135904
|
observeRuntimeCycle(input, { stage: "market_context" });
|
|
135905
|
+
const rescues = input.executionMode === "server" && executorOf(config2).exchange === "hyperliquid";
|
|
135763
135906
|
const rescueAccountState = async (serverReason) => {
|
|
135764
135907
|
promptRescueSequence += 1;
|
|
135765
135908
|
try {
|
|
@@ -135792,7 +135935,7 @@ ${stringifyPromptJson(withUtcCandleOpenTimes(parts.candlesPayload))}
|
|
|
135792
135935
|
}
|
|
135793
135936
|
};
|
|
135794
135937
|
const browserAccountStateTask = (async () => {
|
|
135795
|
-
if (
|
|
135938
|
+
if (rescues && input.dispatchContextRebuild !== true && await hyperliquidPrivateInfoHeldOff()) {
|
|
135796
135939
|
try {
|
|
135797
135940
|
return await rescueAccountState(SERVER_PROMPT_RESCUE_NODE_OUTAGE_REASON);
|
|
135798
135941
|
} catch (rescueError) {
|
|
@@ -135821,7 +135964,7 @@ ${stringifyPromptJson(withUtcCandleOpenTimes(parts.candlesPayload))}
|
|
|
135821
135964
|
signal: timeoutController.signal
|
|
135822
135965
|
});
|
|
135823
135966
|
})().catch(async (error48) => {
|
|
135824
|
-
if (
|
|
135967
|
+
if (!rescues || !(error48 instanceof HyperliquidPublicReadError)) throw error48;
|
|
135825
135968
|
try {
|
|
135826
135969
|
return await rescueAccountState(error48.code);
|
|
135827
135970
|
} catch (rescueError) {
|
|
@@ -136712,10 +136855,7 @@ ${stringifyPromptJson(withUtcCandleOpenTimes(parts.candlesPayload))}
|
|
|
136712
136855
|
temperature: entryParameters?.temperature ?? temperature,
|
|
136713
136856
|
// Every Main model gets at least the configured output budget, as in
|
|
136714
136857
|
// the Server loop (ai_trading_service.py _execute_llm_request).
|
|
136715
|
-
maxTokens:
|
|
136716
|
-
entryParameters?.max_tokens ?? maxTokens,
|
|
136717
|
-
requirePositiveIntegerField(config2.max_tokens_min, "max_tokens_min")
|
|
136718
|
-
),
|
|
136858
|
+
maxTokens: traderMainMaxTokens(entryParameters?.max_tokens ?? maxTokens, config2),
|
|
136719
136859
|
reasoningPayload: modelIndex === 0 ? reasoningPayload : buildRuntimeReasoningPayload(controls, extractRuntimeReasoningSelection({ runtime_reasoning: entryParameters?.runtime_reasoning }, controls.control_type, controls.control_type === "toggle" ? controls.toggle_behavior : "disable_reasoning")),
|
|
136720
136860
|
nativeRequestParameters: entryConfig?.native_request_parameters,
|
|
136721
136861
|
nativeRequestParameterValues: modelIndex === 0 ? nativeRequestParameterValues : filterNativeRequestParameterValues(entryConfig?.native_request_parameters, entryParameters?.native_request_parameter_values),
|
|
@@ -136784,21 +136924,12 @@ ${stringifyPromptJson(withUtcCandleOpenTimes(parts.candlesPayload))}
|
|
|
136784
136924
|
let primaryDecisionContent = providerResponse.content;
|
|
136785
136925
|
let mainReplyUnreadable = false;
|
|
136786
136926
|
if (!allPromptSymbolsUnavailable && !isExternalRuntimeProviderResult(providerResponse)) {
|
|
136787
|
-
const
|
|
136788
|
-
if (validationErrors.length > 0 && input.executionMode !== "server") {
|
|
136789
|
-
throw modelOutputValidationError("Main", providerResponse.invocations, validationErrors, promptSymbols);
|
|
136790
|
-
}
|
|
136791
|
-
if (validationErrors.length > 0) {
|
|
136792
|
-
mainReplyUnreadable = true;
|
|
136793
|
-
primaryDecisionContent = JSON.stringify(Object.fromEntries(promptSymbols.map((promptSymbol) => [promptSymbol, {
|
|
136794
|
-
decision: "HOLD",
|
|
136795
|
-
units: 0,
|
|
136796
|
-
tradability: null,
|
|
136797
|
-
reasoning: SERVER_UNREADABLE_REPLY_HOLD_REASONING
|
|
136798
|
-
}])));
|
|
136799
|
-
} else {
|
|
136800
|
-
primaryDecisionContent = projectCurrentModelDecisionContent(providerResponse.content);
|
|
136927
|
+
const read2 = readTraderReplyContent(providerResponse.content, promptSymbols);
|
|
136928
|
+
if (read2.validationErrors.length > 0 && input.executionMode !== "server") {
|
|
136929
|
+
throw modelOutputValidationError("Main", providerResponse.invocations, read2.validationErrors, promptSymbols);
|
|
136801
136930
|
}
|
|
136931
|
+
mainReplyUnreadable = read2.validationErrors.length > 0;
|
|
136932
|
+
primaryDecisionContent = read2.decisionContent;
|
|
136802
136933
|
}
|
|
136803
136934
|
const primaryParseOutcome = mainReplyUnreadable ? {
|
|
136804
136935
|
status: "failed",
|
|
@@ -136818,17 +136949,10 @@ ${stringifyPromptJson(withUtcCandleOpenTimes(parts.candlesPayload))}
|
|
|
136818
136949
|
}
|
|
136819
136950
|
);
|
|
136820
136951
|
if (invocationAttempts.length) input.onModelCallsReturned?.(invocationAttempts);
|
|
136821
|
-
const
|
|
136952
|
+
const primaryRead = traderDecisionPlans(primaryDecisionContent, promptSymbols, symbol2);
|
|
136953
|
+
const parsed = primaryRead.parsed;
|
|
136822
136954
|
const primaryDecisionSymbolTrace = extractDecisionSymbolTrace(primaryDecisionContent, promptSymbols);
|
|
136823
|
-
const primaryDecisionPlans = forceUnavailableSymbolsToHold(
|
|
136824
|
-
primaryDecisionContent,
|
|
136825
|
-
promptSymbols,
|
|
136826
|
-
symbol2,
|
|
136827
|
-
parsed.decision,
|
|
136828
|
-
parsed.units,
|
|
136829
|
-
parsed.tradability,
|
|
136830
|
-
parsed.reasoning
|
|
136831
|
-
), unavailablePromptSymbols);
|
|
136955
|
+
const primaryDecisionPlans = forceUnavailableSymbolsToHold(primaryRead.plans, unavailablePromptSymbols);
|
|
136832
136956
|
const primaryReviewCandidatePlans = forceUnavailableSymbolsToHold(buildReviewCandidatePlansFromResponse(
|
|
136833
136957
|
primaryDecisionContent,
|
|
136834
136958
|
promptSymbols,
|
|
@@ -144119,8 +144243,9 @@ var init_engine = __esm({
|
|
|
144119
144243
|
const serverCapacityByPlan = /* @__PURE__ */ new Map();
|
|
144120
144244
|
if (this._expectedExecutionMode === "server") {
|
|
144121
144245
|
const capacityPlans = executionPlans.map((plan, planIndex) => ({ plan, planIndex, decision: String(plan.decision || "").toUpperCase() })).filter(({ plan, decision }) => !plan.executionBlock && (decision === "BUY" || decision === "SELL") && Math.trunc(Number(plan.units)) > 0);
|
|
144122
|
-
const allocations =
|
|
144246
|
+
const allocations = await allocateServerExecutionCapacity({
|
|
144123
144247
|
profileId,
|
|
144248
|
+
config: config2,
|
|
144124
144249
|
sessionId,
|
|
144125
144250
|
runtimeLeaseToken: executionLeaseToken(),
|
|
144126
144251
|
runtimeDeviceId: deviceId,
|