@vtxmacro/cli 2026.10.12 → 2026.10.14
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/exo-harness.ts +1610 -240
- package/bin/vtx-mcp.js +1111 -74
- package/bin/vtx-service-bootstrap.js +1027 -62
- package/bin/vtx-service-launcher.js +1020 -55
- package/bin/vtx.js +4654 -1899
- package/package.json +1 -1
package/bin/vtx-mcp.js
CHANGED
|
@@ -37,7 +37,92 @@ var init_define_VTX_PI_MODEL_POLICY = __esm({
|
|
|
37
37
|
var agent_cli_release_default;
|
|
38
38
|
var init_agent_cli_release = __esm({
|
|
39
39
|
"agent-cli-release.json"() {
|
|
40
|
-
agent_cli_release_default = { package_name: "@vtxmacro/cli", package_version: "2026.10.
|
|
40
|
+
agent_cli_release_default = { package_name: "@vtxmacro/cli", package_version: "2026.10.14", 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" } } };
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
// lib/constants.ts
|
|
45
|
+
var MS_PER_SECOND, SECONDS_PER_MINUTE, MINUTES_PER_HOUR, HOURS_PER_DAY, DAYS_PER_WEEK, MS_PER_MINUTE, SECONDS_PER_HOUR, SECONDS_PER_DAY, SECONDS_PER_WEEK, MINUTES_PER_DAY, MINUTES_PER_WEEK, MS_PER_HOUR, MS_PER_DAY, READ_STAMP_TIE_MS, BACKOFF_GROWTH_FACTOR, BYTES_PER_KIB, BYTES_PER_MIB, OWNER_ONLY_FILE_MODE, OWNER_ONLY_DIRECTORY_MODE, GROUP_OTHER_PERMISSION_BITS, JSON_INDENT_SPACES, INT32_MIN, INT32_MAX, HTTP_STATUS, AI_COST_ESTIMATE_PERIOD_DAYS, SECONDS_PER_AI_COST_ESTIMATE_PERIOD, NODE_ARGV_COMMAND_ARGS_START, EXIT_CODE_TEMPFAIL, JSON_RPC_ERROR_CODES, INFERENCE_HOST_PROCESS_LOCK_RECORD_SCHEMA_VERSION, INFERENCE_HOST_RECLAIM_GUARD_CREATE_PASSES, LINUX_PROC_STAT_COMM_TERMINATOR_CHARS, INFERENCE_HOST_RANDOM_BYTES, EXIT_CODE_INTERRUPTED, EXIT_CODE_SIGNAL_BASE;
|
|
46
|
+
var init_constants = __esm({
|
|
47
|
+
"lib/constants.ts"() {
|
|
48
|
+
"use strict";
|
|
49
|
+
init_define_VTX_EXO_POLICY();
|
|
50
|
+
init_define_VTX_GROK_POLICY();
|
|
51
|
+
init_define_VTX_PI_MODEL_POLICY();
|
|
52
|
+
MS_PER_SECOND = 1e3;
|
|
53
|
+
SECONDS_PER_MINUTE = 60;
|
|
54
|
+
MINUTES_PER_HOUR = 60;
|
|
55
|
+
HOURS_PER_DAY = 24;
|
|
56
|
+
DAYS_PER_WEEK = 7;
|
|
57
|
+
MS_PER_MINUTE = MS_PER_SECOND * SECONDS_PER_MINUTE;
|
|
58
|
+
SECONDS_PER_HOUR = SECONDS_PER_MINUTE * MINUTES_PER_HOUR;
|
|
59
|
+
SECONDS_PER_DAY = SECONDS_PER_HOUR * HOURS_PER_DAY;
|
|
60
|
+
SECONDS_PER_WEEK = SECONDS_PER_DAY * DAYS_PER_WEEK;
|
|
61
|
+
MINUTES_PER_DAY = MINUTES_PER_HOUR * HOURS_PER_DAY;
|
|
62
|
+
MINUTES_PER_WEEK = MINUTES_PER_DAY * DAYS_PER_WEEK;
|
|
63
|
+
MS_PER_HOUR = MS_PER_MINUTE * MINUTES_PER_HOUR;
|
|
64
|
+
MS_PER_DAY = MS_PER_HOUR * HOURS_PER_DAY;
|
|
65
|
+
READ_STAMP_TIE_MS = MS_PER_SECOND / 1e6;
|
|
66
|
+
BACKOFF_GROWTH_FACTOR = 2;
|
|
67
|
+
BYTES_PER_KIB = 1024;
|
|
68
|
+
BYTES_PER_MIB = BYTES_PER_KIB * BYTES_PER_KIB;
|
|
69
|
+
OWNER_ONLY_FILE_MODE = 384;
|
|
70
|
+
OWNER_ONLY_DIRECTORY_MODE = 448;
|
|
71
|
+
GROUP_OTHER_PERMISSION_BITS = 63;
|
|
72
|
+
JSON_INDENT_SPACES = 2;
|
|
73
|
+
INT32_MIN = -(2 ** 31);
|
|
74
|
+
INT32_MAX = 2 ** 31 - 1;
|
|
75
|
+
HTTP_STATUS = {
|
|
76
|
+
OK: 200,
|
|
77
|
+
ACCEPTED: 202,
|
|
78
|
+
NO_CONTENT: 204,
|
|
79
|
+
FOUND: 302,
|
|
80
|
+
SEE_OTHER: 303,
|
|
81
|
+
BAD_REQUEST: 400,
|
|
82
|
+
UNAUTHORIZED: 401,
|
|
83
|
+
PAYMENT_REQUIRED: 402,
|
|
84
|
+
FORBIDDEN: 403,
|
|
85
|
+
NOT_FOUND: 404,
|
|
86
|
+
METHOD_NOT_ALLOWED: 405,
|
|
87
|
+
REQUEST_TIMEOUT: 408,
|
|
88
|
+
CONFLICT: 409,
|
|
89
|
+
CONTENT_TOO_LARGE: 413,
|
|
90
|
+
URI_TOO_LONG: 414,
|
|
91
|
+
UNSUPPORTED_MEDIA_TYPE: 415,
|
|
92
|
+
UNPROCESSABLE_CONTENT: 422,
|
|
93
|
+
TOO_EARLY: 425,
|
|
94
|
+
TOO_MANY_REQUESTS: 429,
|
|
95
|
+
INTERNAL_SERVER_ERROR: 500,
|
|
96
|
+
BAD_GATEWAY: 502,
|
|
97
|
+
SERVICE_UNAVAILABLE: 503,
|
|
98
|
+
GATEWAY_TIMEOUT: 504
|
|
99
|
+
};
|
|
100
|
+
AI_COST_ESTIMATE_PERIOD_DAYS = 30;
|
|
101
|
+
SECONDS_PER_AI_COST_ESTIMATE_PERIOD = SECONDS_PER_DAY * AI_COST_ESTIMATE_PERIOD_DAYS;
|
|
102
|
+
NODE_ARGV_COMMAND_ARGS_START = 2;
|
|
103
|
+
EXIT_CODE_TEMPFAIL = 75;
|
|
104
|
+
JSON_RPC_ERROR_CODES = {
|
|
105
|
+
PARSE_ERROR: -32700,
|
|
106
|
+
INVALID_REQUEST: -32600,
|
|
107
|
+
METHOD_NOT_FOUND: -32601,
|
|
108
|
+
INVALID_PARAMS: -32602,
|
|
109
|
+
INTERNAL_ERROR: -32603,
|
|
110
|
+
SERVER_ERROR_MIN: -32099,
|
|
111
|
+
SERVER_ERROR_MAX: -32e3
|
|
112
|
+
};
|
|
113
|
+
INFERENCE_HOST_PROCESS_LOCK_RECORD_SCHEMA_VERSION = 2;
|
|
114
|
+
INFERENCE_HOST_RECLAIM_GUARD_CREATE_PASSES = 2;
|
|
115
|
+
LINUX_PROC_STAT_COMM_TERMINATOR_CHARS = 2;
|
|
116
|
+
INFERENCE_HOST_RANDOM_BYTES = {
|
|
117
|
+
TEMP_FILE_SUFFIX: 12,
|
|
118
|
+
LOCK_BALLOT_NAME: 16,
|
|
119
|
+
LOCK_TOKEN: 24,
|
|
120
|
+
OAUTH_PKCE_VERIFIER: 48,
|
|
121
|
+
OAUTH_STATE: 32,
|
|
122
|
+
OAUTH_CALLBACK_PATH: 16
|
|
123
|
+
};
|
|
124
|
+
EXIT_CODE_INTERRUPTED = 130;
|
|
125
|
+
EXIT_CODE_SIGNAL_BASE = 128;
|
|
41
126
|
}
|
|
42
127
|
});
|
|
43
128
|
|
|
@@ -88,6 +173,7 @@ var init_config = __esm({
|
|
|
88
173
|
init_define_VTX_EXO_POLICY();
|
|
89
174
|
init_define_VTX_GROK_POLICY();
|
|
90
175
|
init_define_VTX_PI_MODEL_POLICY();
|
|
176
|
+
init_constants();
|
|
91
177
|
}
|
|
92
178
|
});
|
|
93
179
|
|
|
@@ -173,6 +259,7 @@ var init_client = __esm({
|
|
|
173
259
|
init_define_VTX_PI_MODEL_POLICY();
|
|
174
260
|
init_agent_cli_release();
|
|
175
261
|
init_types();
|
|
262
|
+
init_constants();
|
|
176
263
|
SECRET_RESPONSE_FIELDS = /* @__PURE__ */ new Set([
|
|
177
264
|
"provider_key_slots",
|
|
178
265
|
"hyperliquid_signing_key",
|
|
@@ -250,7 +337,7 @@ var init_client = __esm({
|
|
|
250
337
|
if (!response.ok) {
|
|
251
338
|
throw await parseError(response, `VTX API request failed: ${response.status}`);
|
|
252
339
|
}
|
|
253
|
-
if (response.status ===
|
|
340
|
+
if (response.status === HTTP_STATUS.NO_CONTENT) {
|
|
254
341
|
return void 0;
|
|
255
342
|
}
|
|
256
343
|
return await response.json();
|
|
@@ -1022,13 +1109,13 @@ function stringifyToolResult(result) {
|
|
|
1022
1109
|
if (typeof result === "string") {
|
|
1023
1110
|
return result;
|
|
1024
1111
|
}
|
|
1025
|
-
return JSON.stringify(result, null,
|
|
1112
|
+
return JSON.stringify(result, null, JSON_INDENT_SPACES);
|
|
1026
1113
|
}
|
|
1027
1114
|
async function handleMcpJsonRpcRequest(request, clientFactory = createDefaultMcpClient) {
|
|
1028
1115
|
const id = requestId(request);
|
|
1029
1116
|
const method = String(request.method || "").trim();
|
|
1030
1117
|
if (!method) {
|
|
1031
|
-
return jsonRpcError(id,
|
|
1118
|
+
return jsonRpcError(id, JSON_RPC_ERROR_CODES.INVALID_REQUEST, "Invalid JSON-RPC request.");
|
|
1032
1119
|
}
|
|
1033
1120
|
if (method === "initialize") {
|
|
1034
1121
|
return jsonRpcResult(id, {
|
|
@@ -1056,7 +1143,7 @@ async function handleMcpJsonRpcRequest(request, clientFactory = createDefaultMcp
|
|
|
1056
1143
|
const name = String(params.name || "").trim();
|
|
1057
1144
|
const args = params.arguments && typeof params.arguments === "object" ? params.arguments : {};
|
|
1058
1145
|
if (!name) {
|
|
1059
|
-
return jsonRpcError(id,
|
|
1146
|
+
return jsonRpcError(id, JSON_RPC_ERROR_CODES.INVALID_PARAMS, "Tool name is required.");
|
|
1060
1147
|
}
|
|
1061
1148
|
try {
|
|
1062
1149
|
const client = await clientFactory();
|
|
@@ -1086,7 +1173,7 @@ async function handleMcpJsonRpcRequest(request, clientFactory = createDefaultMcp
|
|
|
1086
1173
|
if (isNotification(request)) {
|
|
1087
1174
|
return null;
|
|
1088
1175
|
}
|
|
1089
|
-
return jsonRpcError(id,
|
|
1176
|
+
return jsonRpcError(id, JSON_RPC_ERROR_CODES.METHOD_NOT_FOUND, `Unsupported MCP method: ${method}`);
|
|
1090
1177
|
}
|
|
1091
1178
|
function encodeMcpFrame(message) {
|
|
1092
1179
|
const body = JSON.stringify(message);
|
|
@@ -1121,9 +1208,9 @@ function parseJsonLineFrame(buffer, newlineEnd) {
|
|
|
1121
1208
|
}
|
|
1122
1209
|
function extractFrame(buffer) {
|
|
1123
1210
|
const headerEnd = buffer.indexOf("\r\n\r\n");
|
|
1124
|
-
const delimiterLength =
|
|
1211
|
+
const delimiterLength = "\r\n\r\n".length;
|
|
1125
1212
|
const normalizedHeaderEnd = headerEnd >= 0 ? headerEnd : buffer.indexOf("\n\n");
|
|
1126
|
-
const normalizedDelimiterLength = headerEnd >= 0 ? delimiterLength :
|
|
1213
|
+
const normalizedDelimiterLength = headerEnd >= 0 ? delimiterLength : "\n\n".length;
|
|
1127
1214
|
if (normalizedHeaderEnd < 0) {
|
|
1128
1215
|
const newlineEnd = buffer.indexOf("\n");
|
|
1129
1216
|
if (newlineEnd < 0) {
|
|
@@ -1183,6 +1270,7 @@ var init_stdio = __esm({
|
|
|
1183
1270
|
init_define_VTX_PI_MODEL_POLICY();
|
|
1184
1271
|
init_agent_cli_release();
|
|
1185
1272
|
init_server();
|
|
1273
|
+
init_constants();
|
|
1186
1274
|
MCP_PROTOCOL_VERSION = "2024-11-05";
|
|
1187
1275
|
}
|
|
1188
1276
|
});
|
|
@@ -1231,6 +1319,7 @@ var runtime_policy_generated_default = {
|
|
|
1231
1319
|
post_execution_refresh_delay_ms: 3e3,
|
|
1232
1320
|
account_read_backoff_min_ms: 2e3,
|
|
1233
1321
|
account_read_backoff_max_ms: 6e4,
|
|
1322
|
+
account_read_backoff_exponent_max: 30,
|
|
1234
1323
|
ai_start_grace_min_ms: 45e3
|
|
1235
1324
|
},
|
|
1236
1325
|
deployment_reload_observability: {
|
|
@@ -1250,6 +1339,603 @@ var runtime_policy_generated_default = {
|
|
|
1250
1339
|
refresh_interval_ms: 1e4,
|
|
1251
1340
|
watchdog_interval_ms: 1e3,
|
|
1252
1341
|
watchdog_grace_ms: 500
|
|
1342
|
+
},
|
|
1343
|
+
preferences: {
|
|
1344
|
+
load_timeout_ms: 5e3,
|
|
1345
|
+
initial_load_settle_ms: 100,
|
|
1346
|
+
external_save_timeout_ms: 8e3,
|
|
1347
|
+
guest_cookie_max_age_days: 9999,
|
|
1348
|
+
dropdown_search_max_chars: 200
|
|
1349
|
+
},
|
|
1350
|
+
navigation_feedback: {
|
|
1351
|
+
finish_fallback_ms: 2250
|
|
1352
|
+
},
|
|
1353
|
+
confirmation_notices: {
|
|
1354
|
+
success_indicator_ms: 2e3,
|
|
1355
|
+
byok_success_message_ms: 3e3
|
|
1356
|
+
},
|
|
1357
|
+
screener_runtime_config_retry: {
|
|
1358
|
+
base_delay_ms: 1e3,
|
|
1359
|
+
max_delay_ms: 3e4
|
|
1360
|
+
},
|
|
1361
|
+
advanced_chart: {
|
|
1362
|
+
debug_log_throttle_ms: 1e3,
|
|
1363
|
+
initial_history_stall_ms: 15e3,
|
|
1364
|
+
initial_history_recovery_cooldown_ms: 3e4,
|
|
1365
|
+
viewport_restore_settle_ms: 100,
|
|
1366
|
+
symbol_price_wait_ms: 2e3,
|
|
1367
|
+
layout_auto_save_delay_ms: 250
|
|
1368
|
+
},
|
|
1369
|
+
ai_panel: {
|
|
1370
|
+
message_limit: 100,
|
|
1371
|
+
post_execution_history_sync_delay_ms: 2e3,
|
|
1372
|
+
runtime_error_attempt_group_window_seconds: 120,
|
|
1373
|
+
debug_runtime_error_preview_chars: 180
|
|
1374
|
+
},
|
|
1375
|
+
ai_settings: {
|
|
1376
|
+
storage_authority_broadcast_dedupe_window_ms: 2e3,
|
|
1377
|
+
margin_type_external_authority_ttl_ms: 12e4,
|
|
1378
|
+
screener_status_refresh_delay_ms: 75,
|
|
1379
|
+
preference_message_dedupe_keys: 24,
|
|
1380
|
+
available_assets_retry_default_ms: 15e3,
|
|
1381
|
+
available_assets_retry_min_ms: 1e3,
|
|
1382
|
+
available_assets_retry_max_ms: 6e4,
|
|
1383
|
+
external_sync_settle_ms: 1e3,
|
|
1384
|
+
billing_stats_reuse_ms: 3e3,
|
|
1385
|
+
prompt_commit_debounce_ms: 180,
|
|
1386
|
+
model_count_display_settle_ms: 320,
|
|
1387
|
+
model_picker_scroll_settle_ms: 60
|
|
1388
|
+
},
|
|
1389
|
+
ai_settings_debug: {
|
|
1390
|
+
model_debug_event_limit: 160,
|
|
1391
|
+
browser_resource_timings: 40,
|
|
1392
|
+
browser_resource_panel_rows: 12,
|
|
1393
|
+
browser_timing_refresh_delay_ms: 1500,
|
|
1394
|
+
comparable_hash_full_max_chars: 16,
|
|
1395
|
+
comparable_hash_edge_chars: 8,
|
|
1396
|
+
console_message_chars: 4e3,
|
|
1397
|
+
comparable_diff_max_depth: 4,
|
|
1398
|
+
react_profile_min_duration_ms: 20,
|
|
1399
|
+
react_profile_slower_margin_ms: 25,
|
|
1400
|
+
react_profile_slow_update_ms: 100,
|
|
1401
|
+
react_profile_repeat_interval_ms: 1500,
|
|
1402
|
+
snapshot_ids_head: 10,
|
|
1403
|
+
longtask_samples: 12,
|
|
1404
|
+
recent_events: 20,
|
|
1405
|
+
hydration_recent_events: 12,
|
|
1406
|
+
dirty_state_recent_events: 12,
|
|
1407
|
+
navbar_profile_entries: 30,
|
|
1408
|
+
dropdown_search_paint_events: 6,
|
|
1409
|
+
dropdown_options_debounce_ms: 220,
|
|
1410
|
+
dropdown_hover_min_interval_ms: 80,
|
|
1411
|
+
slow_render_ms: 80,
|
|
1412
|
+
render_min_ms: 24,
|
|
1413
|
+
render_min_interval_ms: 300,
|
|
1414
|
+
model_fingerprint_head: 24,
|
|
1415
|
+
models_head: 12
|
|
1416
|
+
},
|
|
1417
|
+
insights_charts: {
|
|
1418
|
+
max_charts: 3,
|
|
1419
|
+
max_line_points: 160,
|
|
1420
|
+
max_bars: 8
|
|
1421
|
+
},
|
|
1422
|
+
analysis_chat: {
|
|
1423
|
+
new_message_scroll_delay_ms: 100
|
|
1424
|
+
},
|
|
1425
|
+
snapshot_selector: {
|
|
1426
|
+
sync_resolution_pending_ms: 350,
|
|
1427
|
+
own_broadcast_window_ms: 5e3,
|
|
1428
|
+
seen_imported_ids_limit: 200,
|
|
1429
|
+
post_import_reload_delay_ms: 1e3,
|
|
1430
|
+
debug_value_chars: 220,
|
|
1431
|
+
debug_fingerprint_head_chars: 64,
|
|
1432
|
+
debug_head_snapshot_ids: 8,
|
|
1433
|
+
debug_comparable_head_chars: 240,
|
|
1434
|
+
debug_panel_comparable_head_chars: 120
|
|
1435
|
+
},
|
|
1436
|
+
safe_mode_settings: {
|
|
1437
|
+
usdc_slider_cents_steps: [
|
|
1438
|
+
10,
|
|
1439
|
+
25,
|
|
1440
|
+
50,
|
|
1441
|
+
75,
|
|
1442
|
+
100,
|
|
1443
|
+
150,
|
|
1444
|
+
200,
|
|
1445
|
+
300,
|
|
1446
|
+
400,
|
|
1447
|
+
500,
|
|
1448
|
+
750,
|
|
1449
|
+
1e3,
|
|
1450
|
+
1500,
|
|
1451
|
+
2e3,
|
|
1452
|
+
2500,
|
|
1453
|
+
3e3,
|
|
1454
|
+
4e3,
|
|
1455
|
+
5e3,
|
|
1456
|
+
7500,
|
|
1457
|
+
1e4,
|
|
1458
|
+
15e3,
|
|
1459
|
+
2e4,
|
|
1460
|
+
25e3,
|
|
1461
|
+
3e4,
|
|
1462
|
+
4e4,
|
|
1463
|
+
5e4,
|
|
1464
|
+
75e3,
|
|
1465
|
+
1e5,
|
|
1466
|
+
125e3,
|
|
1467
|
+
15e4,
|
|
1468
|
+
2e5,
|
|
1469
|
+
25e4,
|
|
1470
|
+
3e5,
|
|
1471
|
+
4e5,
|
|
1472
|
+
5e5,
|
|
1473
|
+
6e5,
|
|
1474
|
+
7e5,
|
|
1475
|
+
8e5,
|
|
1476
|
+
9e5,
|
|
1477
|
+
1e6
|
|
1478
|
+
],
|
|
1479
|
+
percent_input_step_bps: 1
|
|
1480
|
+
},
|
|
1481
|
+
copy_trading_settings: {
|
|
1482
|
+
scale_multiplier_slider_thousandths_steps: [
|
|
1483
|
+
10,
|
|
1484
|
+
20,
|
|
1485
|
+
30,
|
|
1486
|
+
40,
|
|
1487
|
+
50,
|
|
1488
|
+
75,
|
|
1489
|
+
100,
|
|
1490
|
+
150,
|
|
1491
|
+
200,
|
|
1492
|
+
250,
|
|
1493
|
+
300,
|
|
1494
|
+
400,
|
|
1495
|
+
500,
|
|
1496
|
+
600,
|
|
1497
|
+
700,
|
|
1498
|
+
800,
|
|
1499
|
+
850,
|
|
1500
|
+
900,
|
|
1501
|
+
950,
|
|
1502
|
+
975,
|
|
1503
|
+
1e3,
|
|
1504
|
+
1025,
|
|
1505
|
+
1050,
|
|
1506
|
+
1100,
|
|
1507
|
+
1250,
|
|
1508
|
+
1500,
|
|
1509
|
+
1750,
|
|
1510
|
+
2e3,
|
|
1511
|
+
2500,
|
|
1512
|
+
3e3,
|
|
1513
|
+
4e3,
|
|
1514
|
+
5e3,
|
|
1515
|
+
7500,
|
|
1516
|
+
1e4,
|
|
1517
|
+
15e3,
|
|
1518
|
+
2e4,
|
|
1519
|
+
3e4,
|
|
1520
|
+
4e4,
|
|
1521
|
+
5e4,
|
|
1522
|
+
75e3,
|
|
1523
|
+
1e5
|
|
1524
|
+
]
|
|
1525
|
+
},
|
|
1526
|
+
analysis_settings: {
|
|
1527
|
+
lookback_slider_candles_steps: [
|
|
1528
|
+
1,
|
|
1529
|
+
2,
|
|
1530
|
+
3,
|
|
1531
|
+
4,
|
|
1532
|
+
5,
|
|
1533
|
+
6,
|
|
1534
|
+
7,
|
|
1535
|
+
8,
|
|
1536
|
+
9,
|
|
1537
|
+
10,
|
|
1538
|
+
12,
|
|
1539
|
+
14,
|
|
1540
|
+
16,
|
|
1541
|
+
18,
|
|
1542
|
+
20,
|
|
1543
|
+
24,
|
|
1544
|
+
28,
|
|
1545
|
+
32,
|
|
1546
|
+
36,
|
|
1547
|
+
40,
|
|
1548
|
+
42,
|
|
1549
|
+
44,
|
|
1550
|
+
48,
|
|
1551
|
+
52,
|
|
1552
|
+
56,
|
|
1553
|
+
60,
|
|
1554
|
+
65,
|
|
1555
|
+
70,
|
|
1556
|
+
75,
|
|
1557
|
+
80,
|
|
1558
|
+
90,
|
|
1559
|
+
100,
|
|
1560
|
+
110,
|
|
1561
|
+
120,
|
|
1562
|
+
130,
|
|
1563
|
+
140,
|
|
1564
|
+
150,
|
|
1565
|
+
160,
|
|
1566
|
+
180,
|
|
1567
|
+
200
|
|
1568
|
+
]
|
|
1569
|
+
},
|
|
1570
|
+
trading_limit_settings: {
|
|
1571
|
+
ai_trade_amount_usdc_steps: [
|
|
1572
|
+
20,
|
|
1573
|
+
30,
|
|
1574
|
+
40,
|
|
1575
|
+
50,
|
|
1576
|
+
60,
|
|
1577
|
+
70,
|
|
1578
|
+
80,
|
|
1579
|
+
90,
|
|
1580
|
+
100,
|
|
1581
|
+
150,
|
|
1582
|
+
175,
|
|
1583
|
+
200,
|
|
1584
|
+
225,
|
|
1585
|
+
250,
|
|
1586
|
+
275,
|
|
1587
|
+
300,
|
|
1588
|
+
325,
|
|
1589
|
+
350,
|
|
1590
|
+
375,
|
|
1591
|
+
400,
|
|
1592
|
+
425,
|
|
1593
|
+
450,
|
|
1594
|
+
475,
|
|
1595
|
+
500,
|
|
1596
|
+
600,
|
|
1597
|
+
700,
|
|
1598
|
+
800,
|
|
1599
|
+
900,
|
|
1600
|
+
1e3,
|
|
1601
|
+
1250,
|
|
1602
|
+
1500,
|
|
1603
|
+
1750,
|
|
1604
|
+
2e3,
|
|
1605
|
+
2250,
|
|
1606
|
+
2500,
|
|
1607
|
+
2750,
|
|
1608
|
+
3e3,
|
|
1609
|
+
3250,
|
|
1610
|
+
3500,
|
|
1611
|
+
3750,
|
|
1612
|
+
4e3,
|
|
1613
|
+
4250,
|
|
1614
|
+
4500,
|
|
1615
|
+
4750,
|
|
1616
|
+
5e3,
|
|
1617
|
+
6e3,
|
|
1618
|
+
7e3,
|
|
1619
|
+
8e3,
|
|
1620
|
+
9e3,
|
|
1621
|
+
1e4
|
|
1622
|
+
],
|
|
1623
|
+
ai_trade_amount_max_stop_count: 50
|
|
1624
|
+
},
|
|
1625
|
+
calendar_settings: {
|
|
1626
|
+
buffer_input_step_seconds: 30
|
|
1627
|
+
},
|
|
1628
|
+
debug_logs: {
|
|
1629
|
+
snapshot_card_lines: 80,
|
|
1630
|
+
render_debug_overlay_entries: 120,
|
|
1631
|
+
render_debug_entry_data_chars: 2400,
|
|
1632
|
+
analytics_dashboard_lines: 220,
|
|
1633
|
+
analytics_metric_capture_interval_ms: 400,
|
|
1634
|
+
system_profile_mode_lines: 120,
|
|
1635
|
+
admin_text_chars: 160,
|
|
1636
|
+
admin_analysis_run_id_chars: 32,
|
|
1637
|
+
hyperliquid_balance_preview_count: 3,
|
|
1638
|
+
model_picker_preview_count: 5,
|
|
1639
|
+
render_debug_entries: 250
|
|
1640
|
+
},
|
|
1641
|
+
history_panels: {
|
|
1642
|
+
display_batch_size: 50,
|
|
1643
|
+
load_more_threshold_px: 100,
|
|
1644
|
+
trade_history_fetch_page_size: 100,
|
|
1645
|
+
ai_panel_interaction_window_ms: 2500,
|
|
1646
|
+
ai_panel_defer_max_staleness_ms: 1e4,
|
|
1647
|
+
ai_panel_defer_retry_ms: 1500,
|
|
1648
|
+
order_id_metadata_traversal_max_nodes: 400
|
|
1649
|
+
},
|
|
1650
|
+
trade_page: {
|
|
1651
|
+
config_first_retry_delay_ms: 1e3,
|
|
1652
|
+
margin_mode_min_loading_ms: 250,
|
|
1653
|
+
preferences_load_retry_delay_ms_steps: [
|
|
1654
|
+
1500,
|
|
1655
|
+
3e3,
|
|
1656
|
+
6e3,
|
|
1657
|
+
12e3
|
|
1658
|
+
],
|
|
1659
|
+
preferences_retry_jitter_max_ms: 1500,
|
|
1660
|
+
all_profile_preferences_save_delay_ms: 1500,
|
|
1661
|
+
all_profile_save_interaction_window_ms: 2e3,
|
|
1662
|
+
all_profile_read_concurrency: 2,
|
|
1663
|
+
all_profile_ai_event_dedupe_limit: 200,
|
|
1664
|
+
all_profile_order_history_limit: 50,
|
|
1665
|
+
all_profile_section_timeout_min_ms: 1e3,
|
|
1666
|
+
all_profile_account_summary_poll_min_ms: 1e3,
|
|
1667
|
+
all_profile_trade_history_poll_min_ms: 1e3,
|
|
1668
|
+
all_profile_live_refresh_idle_timeout_ms: 5e3,
|
|
1669
|
+
copy_trading_message_limit: 25,
|
|
1670
|
+
browser_account_refresh_min_interval_ms: 1250,
|
|
1671
|
+
browser_account_watchdog_poll_min_ms: 1e4,
|
|
1672
|
+
rate_limit_retry_buffer_ms: 250,
|
|
1673
|
+
restricted_runtime_poll_min_ms: 3e3,
|
|
1674
|
+
restricted_runtime_event_limit: 20,
|
|
1675
|
+
server_account_rest_catchup_min_interval_ms: 5e3,
|
|
1676
|
+
server_account_catchup_poll_min_ms: 5e3,
|
|
1677
|
+
execution_rest_catchup_delay_ms_steps: [
|
|
1678
|
+
2e3,
|
|
1679
|
+
8e3
|
|
1680
|
+
],
|
|
1681
|
+
unified_bootstrap_hold_min_ms: 4e3,
|
|
1682
|
+
unified_bootstrap_hold_max_ms: 8e3,
|
|
1683
|
+
observed_activity_recent_ms: 8e3,
|
|
1684
|
+
startup_hold_activation_gap_ms: 9e4,
|
|
1685
|
+
hidden_ticker_update_interval_ms: 16,
|
|
1686
|
+
client_close_fill_sync_attempts: 3,
|
|
1687
|
+
client_close_fill_sync_retry_step_ms: 300,
|
|
1688
|
+
leverage_update_debounce_ms: 250,
|
|
1689
|
+
post_leverage_update_order_delay_ms: 250,
|
|
1690
|
+
ai_control_lookback_fallback_candles: 25,
|
|
1691
|
+
takeover_telemetry_error_chars: 500,
|
|
1692
|
+
takeover_telemetry_error_name_chars: 120,
|
|
1693
|
+
takeover_telemetry_failure_chars: 300,
|
|
1694
|
+
client_next_run_interval_min_ms: 1e3,
|
|
1695
|
+
ws_server_time_reorder_tolerance_ms: 1e3
|
|
1696
|
+
},
|
|
1697
|
+
trade_account_summary: {
|
|
1698
|
+
unified_min_balances_usd: 25,
|
|
1699
|
+
unified_balances_account_value_multiple: 3,
|
|
1700
|
+
unified_spot_ratio_percent: 50
|
|
1701
|
+
},
|
|
1702
|
+
trade_debug_logs: {
|
|
1703
|
+
text_chars: 180,
|
|
1704
|
+
runtime_identity_tail_chars: 18,
|
|
1705
|
+
run_id_chars: 8,
|
|
1706
|
+
control_step_error_chars: 160,
|
|
1707
|
+
control_note_chars: 120,
|
|
1708
|
+
error_detail_chars: 120,
|
|
1709
|
+
click_target_text_chars: 120,
|
|
1710
|
+
ai_log_text_chars: 120,
|
|
1711
|
+
preferences_error_chars: 160,
|
|
1712
|
+
ssr_error_detail_chars: 160,
|
|
1713
|
+
breadcrumb_payload_chars: 500,
|
|
1714
|
+
render_debug_data_chars: 1200,
|
|
1715
|
+
server_execution_value_chars: 700,
|
|
1716
|
+
server_execution_error_chars: 250,
|
|
1717
|
+
cost_trace_execution_debug_chars: 500,
|
|
1718
|
+
positions_fetch_error_chars: 220,
|
|
1719
|
+
ai_debug_lines: 100,
|
|
1720
|
+
ai_model_status_lines: 100,
|
|
1721
|
+
ai_model_status_shown_lines: 80,
|
|
1722
|
+
ai_status_bar_trace_lines: 200,
|
|
1723
|
+
ai_status_bar_trace_shown_lines: 120,
|
|
1724
|
+
ai_status_bar_transition_lines: 200,
|
|
1725
|
+
ai_status_bar_transition_shown_lines: 120,
|
|
1726
|
+
ai_status_role_compare_lines: 240,
|
|
1727
|
+
ai_status_role_compare_shown_lines: 160,
|
|
1728
|
+
ai_status_bar_input_lines: 200,
|
|
1729
|
+
ai_status_bar_input_shown_lines: 120,
|
|
1730
|
+
ai_engine_transition_lines: 200,
|
|
1731
|
+
ai_engine_transition_shown_lines: 120,
|
|
1732
|
+
ai_panel_cost_lines: 120,
|
|
1733
|
+
ai_panel_cost_shown_lines: 80,
|
|
1734
|
+
ai_runtime_error_label_lines: 100,
|
|
1735
|
+
ai_runtime_error_label_shown_lines: 80,
|
|
1736
|
+
loop_status_mutation_lines: 200,
|
|
1737
|
+
loop_status_mutation_shown_lines: 120,
|
|
1738
|
+
login_recovery_trace_lines: 240,
|
|
1739
|
+
sparkle_ownership_lines: 120,
|
|
1740
|
+
ai_trader_start_lines: 100,
|
|
1741
|
+
ai_trader_restart_trace_lines: 120,
|
|
1742
|
+
ai_control_button_trace_lines: 240,
|
|
1743
|
+
profile_status_hydration_lines: 120,
|
|
1744
|
+
profile_status_hydration_shown_lines: 100,
|
|
1745
|
+
cross_profile_runtime_lines: 120,
|
|
1746
|
+
cross_profile_runtime_shown_lines: 80,
|
|
1747
|
+
all_mode_ai_history_lines: 120,
|
|
1748
|
+
positions_pnl_lines: 240,
|
|
1749
|
+
positions_pnl_shown_lines: 200,
|
|
1750
|
+
positions_pnl_changed_rows: 12,
|
|
1751
|
+
account_state_lines: 80,
|
|
1752
|
+
account_state_shown_lines: 200,
|
|
1753
|
+
symbol_hydration_lines: 120,
|
|
1754
|
+
trade_ui_click_lines: 200,
|
|
1755
|
+
manual_close_lines: 80,
|
|
1756
|
+
all_mode_interaction_lines: 160,
|
|
1757
|
+
chart_render_entries: 80,
|
|
1758
|
+
control_state_lines: 80,
|
|
1759
|
+
runtime_network_lines: 80,
|
|
1760
|
+
provider_fallback_trace_lines: 60,
|
|
1761
|
+
runtime_stop_trace_lines: 80,
|
|
1762
|
+
runtime_stop_breadcrumb_lines: 40,
|
|
1763
|
+
prompt_contract_trace_lines: 80,
|
|
1764
|
+
execution_trace_lines: 120,
|
|
1765
|
+
single_history_trace_lines: 40,
|
|
1766
|
+
ignored_ticker_channels: 8,
|
|
1767
|
+
recent_network_targets: 8,
|
|
1768
|
+
provider_failure_blocks: 6,
|
|
1769
|
+
market_data_failure_blocks: 8,
|
|
1770
|
+
pricing_candidates_shown: 10,
|
|
1771
|
+
balance_delta_coins: 3,
|
|
1772
|
+
all_mode_ai_head_messages: 5,
|
|
1773
|
+
server_execution_decisions: 10,
|
|
1774
|
+
server_decisions_shown: 5,
|
|
1775
|
+
server_execution_refresh_ms: 1e4,
|
|
1776
|
+
interaction_sample_delay_ms: 250,
|
|
1777
|
+
local_breadcrumb_refresh_ms: 1e3,
|
|
1778
|
+
flicker_direction_flip_window_ms: 6e3,
|
|
1779
|
+
flicker_warmup_window_ms: 3e4,
|
|
1780
|
+
upnl_double_count_min_cents: 50,
|
|
1781
|
+
upnl_double_count_tolerance_cents: 5,
|
|
1782
|
+
upnl_source_gap_min_cents: 50,
|
|
1783
|
+
nonzero_upnl_jump_min_cents: 25,
|
|
1784
|
+
nonzero_upnl_jump_min_relative_percent: 50,
|
|
1785
|
+
nonzero_upnl_jump_min_margin_percent: 2,
|
|
1786
|
+
cross_source_upnl_flicker_max_age_ms: 1e3,
|
|
1787
|
+
cross_source_upnl_flicker_min_cents: 5,
|
|
1788
|
+
restart_trace_manual_stop_window_minutes: 15,
|
|
1789
|
+
hold_age_rounding_ms: 100,
|
|
1790
|
+
account_summary_missing_trace_ms: 5e3
|
|
1791
|
+
},
|
|
1792
|
+
insights_access: {
|
|
1793
|
+
initial_prompt_idea_count: 6,
|
|
1794
|
+
section_preview_blocks: 2
|
|
1795
|
+
},
|
|
1796
|
+
marketing: {
|
|
1797
|
+
arena_leaderboard_entries: 3,
|
|
1798
|
+
data_revalidate_seconds: 60
|
|
1799
|
+
},
|
|
1800
|
+
calendar: {
|
|
1801
|
+
event_highlight_window_minutes: 60,
|
|
1802
|
+
search_save_debounce_ms: 250
|
|
1803
|
+
},
|
|
1804
|
+
system_page: {
|
|
1805
|
+
hyperliquid_manual_refresh_cooldown_ms: 800,
|
|
1806
|
+
config_retry_initial_delay_ms: 1e3,
|
|
1807
|
+
debug_api_profile_poll_ms: 500,
|
|
1808
|
+
debug_save_lines: 120,
|
|
1809
|
+
debug_model_sync_lines: 80,
|
|
1810
|
+
debug_byok_trace_lines: 160,
|
|
1811
|
+
debug_profile_delete_trace_lines: 80,
|
|
1812
|
+
debug_local_ai_trace_lines: 120,
|
|
1813
|
+
debug_hyperliquid_trace_lines: 120,
|
|
1814
|
+
debug_oac_trace_lines: 120,
|
|
1815
|
+
debug_oac_applied_state_lines: 40,
|
|
1816
|
+
debug_report_trace_lines: 40,
|
|
1817
|
+
debug_report_trace_line_chars: 360,
|
|
1818
|
+
debug_field_value_chars: 96,
|
|
1819
|
+
debug_identity_redact_max_chars: 8,
|
|
1820
|
+
debug_identity_edge_chars: 4
|
|
1821
|
+
},
|
|
1822
|
+
analysis_page: {
|
|
1823
|
+
debug_log_lines: 120
|
|
1824
|
+
},
|
|
1825
|
+
changelog_page: {
|
|
1826
|
+
profile_search_debounce_ms: 300,
|
|
1827
|
+
search_debounce_ms: 300,
|
|
1828
|
+
scope_navigation_filters_max_age_ms: 3e4,
|
|
1829
|
+
prompt_diff_context_lines: 3,
|
|
1830
|
+
debug_event_lines: 120
|
|
1831
|
+
},
|
|
1832
|
+
help_page: {
|
|
1833
|
+
hash_scroll_settle_ms: 250
|
|
1834
|
+
},
|
|
1835
|
+
history_page: {
|
|
1836
|
+
preferences_save_debounce_ms: 500,
|
|
1837
|
+
tracked_ws_prompt_id_count: 500,
|
|
1838
|
+
ws_prompt_fingerprint_text_chars: 80,
|
|
1839
|
+
load_more_visibility_percent: 10
|
|
1840
|
+
},
|
|
1841
|
+
leaderboard_page: {
|
|
1842
|
+
debug_panel_entries: 80,
|
|
1843
|
+
debug_navbar_profile_entries: 12
|
|
1844
|
+
},
|
|
1845
|
+
login_page: {
|
|
1846
|
+
desktop_bridge_poll_ms: 250,
|
|
1847
|
+
turnstile_site_key_log_chars: 10
|
|
1848
|
+
},
|
|
1849
|
+
screener_page: {
|
|
1850
|
+
search_save_debounce_ms: 250,
|
|
1851
|
+
ws_refresh_debounce_ms: 40,
|
|
1852
|
+
stop_client_run_wait_checks: 30,
|
|
1853
|
+
stop_client_run_wait_poll_ms: 50,
|
|
1854
|
+
assignment_load_more_threshold_px: 48,
|
|
1855
|
+
debug_log_lines: 160,
|
|
1856
|
+
debug_runtime_events: 30,
|
|
1857
|
+
debug_search_transitions: 40,
|
|
1858
|
+
debug_expansion_transitions: 80,
|
|
1859
|
+
debug_value_chars: 260,
|
|
1860
|
+
debug_text_chars: 180,
|
|
1861
|
+
debug_array_items: 20,
|
|
1862
|
+
debug_event_preview_items: 12,
|
|
1863
|
+
debug_snapshot_keys: 25,
|
|
1864
|
+
debug_snapshot_rows: 8
|
|
1865
|
+
},
|
|
1866
|
+
sitemap: {
|
|
1867
|
+
leaderboard_page_batch_size: 5,
|
|
1868
|
+
leaderboard_max_pages: 160,
|
|
1869
|
+
leaderboard_scan_attempts: 3,
|
|
1870
|
+
home_priority_percent: 100,
|
|
1871
|
+
team_priority_percent: 50,
|
|
1872
|
+
contact_priority_percent: 50,
|
|
1873
|
+
methodology_priority_percent: 80,
|
|
1874
|
+
trust_priority_percent: 70,
|
|
1875
|
+
insights_priority_percent: 90,
|
|
1876
|
+
referrals_priority_percent: 60,
|
|
1877
|
+
start_priority_percent: 80,
|
|
1878
|
+
leaderboard_priority_percent: 90,
|
|
1879
|
+
updates_priority_percent: 80,
|
|
1880
|
+
changelog_priority_percent: 70,
|
|
1881
|
+
models_priority_percent: 70,
|
|
1882
|
+
calendar_priority_percent: 60,
|
|
1883
|
+
help_priority_percent: 70,
|
|
1884
|
+
faq_priority_percent: 70,
|
|
1885
|
+
download_priority_percent: 70,
|
|
1886
|
+
privacy_priority_percent: 30,
|
|
1887
|
+
terms_priority_percent: 30,
|
|
1888
|
+
update_post_priority_percent: 60,
|
|
1889
|
+
profile_trade_priority_percent: 70,
|
|
1890
|
+
profile_analytics_priority_percent: 70,
|
|
1891
|
+
profile_changelog_priority_percent: 60
|
|
1892
|
+
},
|
|
1893
|
+
tax_page: {
|
|
1894
|
+
display_batch_size: 50,
|
|
1895
|
+
load_more_delay_ms: 120,
|
|
1896
|
+
load_more_visibility_percent: 10,
|
|
1897
|
+
selectable_year_count: 5,
|
|
1898
|
+
debug_log_lines: 150
|
|
1899
|
+
},
|
|
1900
|
+
updates_page: {
|
|
1901
|
+
post_edited_label_min_gap_ms: 6e4,
|
|
1902
|
+
comment_edited_label_min_gap_ms: 2e3,
|
|
1903
|
+
meta_description_chars: 160
|
|
1904
|
+
},
|
|
1905
|
+
social_previews: {
|
|
1906
|
+
subject_max_chars: 96,
|
|
1907
|
+
viewport_width: 1600,
|
|
1908
|
+
viewport_height: 900,
|
|
1909
|
+
chart_painted_min_px: 100,
|
|
1910
|
+
chart_paint_poll_ms: 200
|
|
1911
|
+
},
|
|
1912
|
+
manual_order_retry: {
|
|
1913
|
+
max_attempts: 2,
|
|
1914
|
+
default_retry_after_milliseconds: 1500,
|
|
1915
|
+
retry_after_padding_milliseconds: 200,
|
|
1916
|
+
min_delay_milliseconds: 500,
|
|
1917
|
+
max_delay_milliseconds: 8e3
|
|
1918
|
+
},
|
|
1919
|
+
api_client: {
|
|
1920
|
+
get_dedupe_ttl_ms: 2e3,
|
|
1921
|
+
runtime_statuses_dedupe_ttl_ms: 5e3,
|
|
1922
|
+
llm_config_prime_ttl_ms: 1e4,
|
|
1923
|
+
leaderboard_dedupe_ttl_ms: 2e3,
|
|
1924
|
+
platform_pricing_revalidate_seconds: 300,
|
|
1925
|
+
platform_pricing_timeout_ms: 2e3,
|
|
1926
|
+
market_data_error_detail_chars: 240,
|
|
1927
|
+
market_data_interest_error_detail_chars: 200,
|
|
1928
|
+
ai_trade_history_order_id_lookup_concurrency: 4,
|
|
1929
|
+
exchange_evidence_rejection_detail_chars: 200
|
|
1930
|
+
},
|
|
1931
|
+
interaction: {
|
|
1932
|
+
debounce_ms: 250,
|
|
1933
|
+
command_list_scroll_settle_ms: 60
|
|
1934
|
+
},
|
|
1935
|
+
model_selection: {
|
|
1936
|
+
local_context_cache_ttl_hours: 12,
|
|
1937
|
+
pending_local_main_selection_ttl_hours: 12,
|
|
1938
|
+
pending_openai_compatible_main_selection_ttl_hours: 12
|
|
1253
1939
|
}
|
|
1254
1940
|
},
|
|
1255
1941
|
ai_dashboard: {
|
|
@@ -1291,6 +1977,13 @@ var runtime_policy_generated_default = {
|
|
|
1291
1977
|
72,
|
|
1292
1978
|
168
|
|
1293
1979
|
]
|
|
1980
|
+
},
|
|
1981
|
+
defaults: {
|
|
1982
|
+
calendar_settings: {
|
|
1983
|
+
pre_buffer_mins: 60,
|
|
1984
|
+
post_buffer_mins: 30
|
|
1985
|
+
},
|
|
1986
|
+
max_chat_turns: 9999
|
|
1294
1987
|
}
|
|
1295
1988
|
},
|
|
1296
1989
|
trading: {
|
|
@@ -1302,10 +1995,14 @@ var runtime_policy_generated_default = {
|
|
|
1302
1995
|
network_backoff_max_seconds: 300,
|
|
1303
1996
|
steal_ack_timeout_ms: 5e3,
|
|
1304
1997
|
explicit_claim_max_waits: 3,
|
|
1305
|
-
local_ai_preflight_timeout_ms: 3e3
|
|
1998
|
+
local_ai_preflight_timeout_ms: 3e3,
|
|
1999
|
+
wake_debounce_ms: 250,
|
|
2000
|
+
claim_settle_poll_ms: 50,
|
|
2001
|
+
network_backoff_exponent_max: 16
|
|
1306
2002
|
},
|
|
1307
2003
|
observability: {
|
|
1308
|
-
deployment_reload_stall_warning_ms: 15e3
|
|
2004
|
+
deployment_reload_stall_warning_ms: 15e3,
|
|
2005
|
+
prompt_parity_error_detail_max_chars: 500
|
|
1309
2006
|
},
|
|
1310
2007
|
protective_actions: {
|
|
1311
2008
|
adoption_request_timeout_milliseconds: 2e4,
|
|
@@ -1313,11 +2010,16 @@ var runtime_policy_generated_default = {
|
|
|
1313
2010
|
attention_refresh_seconds: 60,
|
|
1314
2011
|
evidence_max_items: 32,
|
|
1315
2012
|
evidence_shared_read_seconds: 10,
|
|
1316
|
-
retry_delay_seconds: 15
|
|
2013
|
+
retry_delay_seconds: 15,
|
|
2014
|
+
evidence_min_sweep_delay_milliseconds: 1e3,
|
|
2015
|
+
device_sweep_max_actions: 8,
|
|
2016
|
+
remaining_recheck_milliseconds: 2e3,
|
|
2017
|
+
evidence_max_age_seconds: 45
|
|
1317
2018
|
},
|
|
1318
2019
|
exchange_mutation: {
|
|
1319
2020
|
settlement_retry_milliseconds: 1e3,
|
|
1320
|
-
settlement_retry_window_seconds: 120
|
|
2021
|
+
settlement_retry_window_seconds: 120,
|
|
2022
|
+
reconciliation_margin_milliseconds: 250
|
|
1321
2023
|
},
|
|
1322
2024
|
protective_plan_set_lock: {
|
|
1323
2025
|
wait_seconds: 120
|
|
@@ -1331,7 +2033,8 @@ var runtime_policy_generated_default = {
|
|
|
1331
2033
|
device_retry_seconds: 60
|
|
1332
2034
|
},
|
|
1333
2035
|
panel_reads: {
|
|
1334
|
-
device_open_orders_reuse_seconds: 2
|
|
2036
|
+
device_open_orders_reuse_seconds: 2,
|
|
2037
|
+
all_view_profile_concurrency: 2
|
|
1335
2038
|
},
|
|
1336
2039
|
account_stream: {
|
|
1337
2040
|
fill_forward_interval_ms: 1e3,
|
|
@@ -1348,9 +2051,56 @@ var runtime_policy_generated_default = {
|
|
|
1348
2051
|
ai_schedule_pause_unknown_milliseconds: 6e4,
|
|
1349
2052
|
provider_failure_diagnostics_delay_milliseconds: 2500,
|
|
1350
2053
|
provider_failure_diagnostics_max_age_milliseconds: 3e4,
|
|
1351
|
-
killswitch_timer_floor_milliseconds: 1e3
|
|
2054
|
+
killswitch_timer_floor_milliseconds: 1e3,
|
|
2055
|
+
cycle_timeout_floor_milliseconds: 1e3,
|
|
2056
|
+
decision_settlement_reserve_max_budget_divisor: 2,
|
|
2057
|
+
close_fill_sync_max_attempts: 3,
|
|
2058
|
+
close_fill_sync_retry_step_milliseconds: 300,
|
|
2059
|
+
execution_mode_mismatch_stop_checks: 2,
|
|
2060
|
+
request_bounds: {
|
|
2061
|
+
min_agent_instruction_retry_after_ms: 25,
|
|
2062
|
+
max_fallback_error_length: 500
|
|
2063
|
+
},
|
|
2064
|
+
pending_protection_recovery: {
|
|
2065
|
+
retry_exponent_max: 30
|
|
2066
|
+
},
|
|
2067
|
+
device_diagnostics: {
|
|
2068
|
+
error_cause_max_depth: 4,
|
|
2069
|
+
request_path_chars: 200,
|
|
2070
|
+
request_method_chars: 12,
|
|
2071
|
+
error_kind_chars: 40,
|
|
2072
|
+
request_id_chars: 128,
|
|
2073
|
+
contract_token_prefix_chars: 12,
|
|
2074
|
+
copy_trading_request_id_chars: 80,
|
|
2075
|
+
copy_trading_status_chars: 80,
|
|
2076
|
+
browser_platform_chars: 40,
|
|
2077
|
+
breadcrumbs_max_entries: 40,
|
|
2078
|
+
breadcrumb_detail_chars: 280,
|
|
2079
|
+
network_debug_max_entries: 80,
|
|
2080
|
+
provider_failure_debug_max_entries: 20,
|
|
2081
|
+
market_data_failure_debug_max_entries: 20,
|
|
2082
|
+
request_string_compact_above_chars: 500,
|
|
2083
|
+
prompt_preview_chars: 220,
|
|
2084
|
+
provider_failure_snapshot_max_age_seconds: 300,
|
|
2085
|
+
local_provider_probe_timeout_ms: 2e3,
|
|
2086
|
+
preflight_failure_reason_chars: 200,
|
|
2087
|
+
host_error_note_chars: 160,
|
|
2088
|
+
tick_failure_note_chars: 300,
|
|
2089
|
+
auto_resume_failure_detail_chars: 500,
|
|
2090
|
+
vault_migration_error_chars: 200
|
|
2091
|
+
},
|
|
2092
|
+
request_retry: {
|
|
2093
|
+
max_attempts: 3,
|
|
2094
|
+
base_delay_milliseconds: 300,
|
|
2095
|
+
max_delay_milliseconds: 8e3,
|
|
2096
|
+
min_retry_after_milliseconds: 250,
|
|
2097
|
+
deadline_attempt_spacing_milliseconds: 250
|
|
2098
|
+
}
|
|
1352
2099
|
},
|
|
1353
2100
|
server_runtime: {
|
|
2101
|
+
exchange_mutation_reconciliation: {
|
|
2102
|
+
protective_episode_end_fill_lookback_seconds: 120
|
|
2103
|
+
},
|
|
1354
2104
|
prompt_rescue: {
|
|
1355
2105
|
request_ttl_seconds: 20,
|
|
1356
2106
|
snapshot_max_age_seconds: 5,
|
|
@@ -1359,7 +2109,14 @@ var runtime_policy_generated_default = {
|
|
|
1359
2109
|
client_claim_retry_delay_milliseconds: 1e3,
|
|
1360
2110
|
client_failure_report_timeout_milliseconds: 2e3,
|
|
1361
2111
|
client_presence_heartbeat_interval_milliseconds: 3e4,
|
|
1362
|
-
client_presence_http_timeout_milliseconds: 5e3
|
|
2112
|
+
client_presence_http_timeout_milliseconds: 5e3,
|
|
2113
|
+
client_claim_completion_buffer_milliseconds: 250,
|
|
2114
|
+
client_max_concurrent_jobs_max: 32,
|
|
2115
|
+
diagnostics_max_elapsed_ms: 12e4,
|
|
2116
|
+
diagnostics_max_pending_reads: 1e3,
|
|
2117
|
+
diagnostics_max_clock_offset_ms: 864e5,
|
|
2118
|
+
failure_max_reported_weight: 1e6,
|
|
2119
|
+
failure_max_retry_after_ms: 36e5
|
|
1363
2120
|
}
|
|
1364
2121
|
}
|
|
1365
2122
|
},
|
|
@@ -1367,19 +2124,45 @@ var runtime_policy_generated_default = {
|
|
|
1367
2124
|
max_requests_per_read: 64,
|
|
1368
2125
|
history_start_ms: 16409952e5,
|
|
1369
2126
|
device_read_deadline_seconds: 180,
|
|
1370
|
-
device_recent_window_hours: 24
|
|
2127
|
+
device_recent_window_hours: 24,
|
|
2128
|
+
order_history_default_limit: 2e3,
|
|
2129
|
+
order_history_max_limit: 2e3
|
|
2130
|
+
},
|
|
2131
|
+
tradability: {
|
|
2132
|
+
score_min: 1,
|
|
2133
|
+
score_max: 10
|
|
1371
2134
|
}
|
|
1372
2135
|
},
|
|
1373
2136
|
agent_cli: {
|
|
1374
2137
|
update_check_interval_ms: 144e5,
|
|
1375
2138
|
update_check_timeout_ms: 5e3,
|
|
1376
2139
|
stage_timeout_ms: 6e5,
|
|
1377
|
-
startup_ready_timeout_ms: 12e4
|
|
2140
|
+
startup_ready_timeout_ms: 12e4,
|
|
2141
|
+
headless_claim_max_waits: 10,
|
|
2142
|
+
headless_stop_request_timeout_ms: 1e4,
|
|
2143
|
+
headless_max_resumes_without_a_cycle: 5,
|
|
2144
|
+
headless_resume_backoff_ms_steps: [
|
|
2145
|
+
1e3,
|
|
2146
|
+
5e3,
|
|
2147
|
+
15e3,
|
|
2148
|
+
3e4,
|
|
2149
|
+
6e4
|
|
2150
|
+
],
|
|
2151
|
+
headless_backup_first_read_retry_ms_steps: [
|
|
2152
|
+
1e3,
|
|
2153
|
+
5e3
|
|
2154
|
+
],
|
|
2155
|
+
browser_login_verifier_bytes: 32,
|
|
2156
|
+
update_failure_reason_max_chars: 160,
|
|
2157
|
+
update_directory_failure_reason_max_chars: 120,
|
|
2158
|
+
update_plan_max_attempts: 3,
|
|
2159
|
+
supervisor_max_failed_release_starts: 2
|
|
1378
2160
|
},
|
|
1379
2161
|
leaderboard: {
|
|
1380
2162
|
device_portfolio: {
|
|
1381
2163
|
device_retry_seconds: 300
|
|
1382
|
-
}
|
|
2164
|
+
},
|
|
2165
|
+
max_page_size: 100
|
|
1383
2166
|
},
|
|
1384
2167
|
external_inference: {
|
|
1385
2168
|
service: {
|
|
@@ -1397,6 +2180,13 @@ var runtime_policy_generated_default = {
|
|
|
1397
2180
|
update_readiness_timeout_ms: 6e5,
|
|
1398
2181
|
rollback_confirmation_min_attempts: 100,
|
|
1399
2182
|
ready_consecutive_observations: 2,
|
|
2183
|
+
update_attempts: 3,
|
|
2184
|
+
update_retry_interval_ms: 2e3,
|
|
2185
|
+
update_failure_reason_max_chars: 160,
|
|
2186
|
+
launcher_poll_interval_ms: 100,
|
|
2187
|
+
log_tail_default_lines: 100,
|
|
2188
|
+
worker_output_line_max_chars: 4096,
|
|
2189
|
+
worker_stdout_tail_max_chars: 65536,
|
|
1400
2190
|
control_lock_wait_attempts: 400,
|
|
1401
2191
|
control_lock_retry_interval_ms: 250,
|
|
1402
2192
|
supervisor_manifest_poll_interval_ms: 250,
|
|
@@ -1405,6 +2195,44 @@ var runtime_policy_generated_default = {
|
|
|
1405
2195
|
claim_diagnostics: {
|
|
1406
2196
|
event_loop_sample_interval_ms: 100
|
|
1407
2197
|
},
|
|
2198
|
+
host_core: {
|
|
2199
|
+
oauth_request_timeout_ms: 15e3,
|
|
2200
|
+
oauth_revocation_timeout_ms: 5e3,
|
|
2201
|
+
oauth_login_timeout_ms: 6e5,
|
|
2202
|
+
mcp_request_timeout_ms: 15e3,
|
|
2203
|
+
mcp_retry_after_max_ms: 864e5,
|
|
2204
|
+
credential_command_timeout_ms: 15e3,
|
|
2205
|
+
credential_command_termination_timeout_ms: 5e3,
|
|
2206
|
+
credential_command_output_max_bytes: 1048576,
|
|
2207
|
+
private_file_max_bytes: 16777216,
|
|
2208
|
+
private_file_replace_attempts: 40,
|
|
2209
|
+
private_file_replace_retry_delay_ms: 25,
|
|
2210
|
+
atomic_replacement_read_attempts: 3,
|
|
2211
|
+
owned_directory_removal_attempts: 10,
|
|
2212
|
+
owned_directory_removal_retry_step_ms: 100,
|
|
2213
|
+
identity_command_timeout_ms: 5e3,
|
|
2214
|
+
identity_command_output_max_bytes: 4096,
|
|
2215
|
+
windows_identity_command_timeout_ms: 15e3,
|
|
2216
|
+
windows_process_identity_output_max_bytes: 1024,
|
|
2217
|
+
windows_acl_broker_startup_timeout_ms: 9e4,
|
|
2218
|
+
windows_acl_broker_request_timeout_ms: 15e3,
|
|
2219
|
+
windows_acl_broker_idle_shutdown_ms: 3e4,
|
|
2220
|
+
windows_acl_broker_kill_grace_ms: 1e3,
|
|
2221
|
+
windows_acl_broker_request_max_bytes: 65536,
|
|
2222
|
+
windows_acl_broker_output_max_chars: 65536,
|
|
2223
|
+
windows_acl_broker_response_line_max_chars: 4096,
|
|
2224
|
+
process_lock_publication_grace_ms: 1e4,
|
|
2225
|
+
process_lock_record_max_bytes: 65536,
|
|
2226
|
+
process_lock_guard_election_lease_ms: 5e3,
|
|
2227
|
+
process_lock_guard_election_stale_ms: 3e4,
|
|
2228
|
+
process_lock_guard_election_attempts: 8,
|
|
2229
|
+
process_lock_guard_election_backoff_ms: 10,
|
|
2230
|
+
process_lock_guard_election_backoff_exponent_max: 4,
|
|
2231
|
+
process_lock_identity_cache_ms: 5e3
|
|
2232
|
+
},
|
|
2233
|
+
agent_control: {
|
|
2234
|
+
max_turn_decision_operation_ids: 128
|
|
2235
|
+
},
|
|
1408
2236
|
host_runtime: {
|
|
1409
2237
|
advertisement_ttl_ms: 12e4,
|
|
1410
2238
|
advertisement_refresh_lead_ms: 3e4,
|
|
@@ -1413,6 +2241,9 @@ var runtime_policy_generated_default = {
|
|
|
1413
2241
|
agent_heartbeat_interval_ms: 3e3,
|
|
1414
2242
|
agent_heartbeat_max_retry_delay_ms: 9e3,
|
|
1415
2243
|
provider_rate_limit_refresh_ms: 6e4,
|
|
2244
|
+
provider_quota_recovery_max_age_refresh_intervals: 2,
|
|
2245
|
+
model_catalog_read_lead_divisor: 2,
|
|
2246
|
+
agent_wake_summary_max_chars: 2e3,
|
|
1416
2247
|
drain_timeout_ms: 3e4,
|
|
1417
2248
|
remote_retry_limit: 3,
|
|
1418
2249
|
minimum_sleep_ms: 10,
|
|
@@ -1437,10 +2268,72 @@ var runtime_policy_generated_default = {
|
|
|
1437
2268
|
agent_turn_timeout_ms: 6e5,
|
|
1438
2269
|
codex_rate_limit_metadata_timeout_ms: 5e3,
|
|
1439
2270
|
codex_login_timeout_ms: 9e5,
|
|
1440
|
-
codex_command_timeout_ms: 3e4
|
|
2271
|
+
codex_command_timeout_ms: 3e4,
|
|
2272
|
+
cli_wait_default_seconds: 50,
|
|
2273
|
+
cli_wait_max_seconds: 300,
|
|
2274
|
+
cli_log_lines_default: 100,
|
|
2275
|
+
cli_log_lines_max: 1e4,
|
|
2276
|
+
service_control_input_max_chars: 4096,
|
|
2277
|
+
codex_auth_file_max_bytes: 8388608,
|
|
2278
|
+
agent_stdin_max_bytes: 1e6,
|
|
2279
|
+
agent_next_poll_min_ms: 50,
|
|
2280
|
+
agent_assignment_poll_min_ms: 250,
|
|
2281
|
+
agent_assignment_poll_fallback_ms: 1e3,
|
|
2282
|
+
agent_assignment_poll_max_ms: 5e3,
|
|
2283
|
+
codex_recovery_scan_max_entries: 2e4,
|
|
2284
|
+
codex_recovery_scan_max_depth: 12,
|
|
2285
|
+
codex_recovery_thread_file_max_bytes: 33554432,
|
|
2286
|
+
codex_recovery_thread_scan_lines: 128,
|
|
2287
|
+
codex_quiescence_proof_max_age_ms: 3e4,
|
|
2288
|
+
codex_quiescence_proof_clock_skew_ms: 1e3,
|
|
2289
|
+
codex_guardian_start_timeout_ms: 1e4,
|
|
2290
|
+
codex_guardian_termination_timeout_ms: 5e3,
|
|
2291
|
+
codex_guardian_termination_deadline_min_ms: 25,
|
|
2292
|
+
codex_guardian_state_poll_ms: 25,
|
|
2293
|
+
codex_guardian_shutdown_grace_ms: 2e3,
|
|
2294
|
+
codex_guardian_shutdown_grace_min_ms: 25,
|
|
2295
|
+
codex_guardian_receipt_replace_attempts: 40,
|
|
2296
|
+
codex_guardian_receipt_replace_retry_ms: 25,
|
|
2297
|
+
codex_diagnostic_attempt_ids_max: 64,
|
|
2298
|
+
codex_retired_response_ids_max: 256,
|
|
2299
|
+
codex_stderr_classification_tail_chars: 1024,
|
|
2300
|
+
codex_request_timeout_ms: 3e4,
|
|
2301
|
+
codex_interrupt_timeout_ms: 5e3,
|
|
2302
|
+
codex_login_cancel_timeout_ms: 5e3,
|
|
2303
|
+
codex_close_exit_timeout_ms: 5e3,
|
|
2304
|
+
codex_close_terminate_timeout_ms: 1e3,
|
|
2305
|
+
codex_close_kill_timeout_ms: 1e3,
|
|
2306
|
+
codex_process_tree_cleanup_timeout_ms: 5e3,
|
|
2307
|
+
binary_version_probe_timeout_ms: 1e4,
|
|
2308
|
+
binary_version_probe_stdout_max_chars: 1024,
|
|
2309
|
+
codex_version_probe_stderr_max_bytes: 65536,
|
|
2310
|
+
codex_recovery_process_observations: 2,
|
|
2311
|
+
codex_recovery_process_observation_interval_ms: 250,
|
|
2312
|
+
codex_recovery_process_query_stdout_max_chars: 4e6,
|
|
2313
|
+
codex_recovery_process_query_stderr_max_chars: 4096,
|
|
2314
|
+
deepseek_transport_request_max_bytes: 8388608,
|
|
2315
|
+
exo_command_output_max_bytes: 4e6,
|
|
2316
|
+
exo_git_output_max_chars: 2e5,
|
|
2317
|
+
exo_bridge_request_max_bytes: 2e6,
|
|
2318
|
+
exo_bridge_request_timeout_ms: 3e4,
|
|
2319
|
+
exo_provider_retry_after_max_ms: 864e5,
|
|
2320
|
+
grok_preflight_timeout_ms: 3e4,
|
|
2321
|
+
grok_login_timeout_ms: 9e5,
|
|
2322
|
+
grok_command_timeout_ms: 3e4,
|
|
2323
|
+
grok_auth_output_max_bytes: 65536,
|
|
2324
|
+
grok_binary_max_bytes: 536870912,
|
|
2325
|
+
grok_acp_message_max_bytes: 2e6,
|
|
2326
|
+
grok_close_kill_delay_ms: 1500,
|
|
2327
|
+
grok_mcp_request_max_bytes: 3e5,
|
|
2328
|
+
grok_cwd_marker_max_bytes: 32768,
|
|
2329
|
+
grok_session_summary_max_bytes: 1048576,
|
|
2330
|
+
provider_error_body_timeout_ms: 1e3,
|
|
2331
|
+
provider_error_body_max_bytes: 16384,
|
|
2332
|
+
pi_receipt_event_max_chars: 2e6
|
|
1441
2333
|
},
|
|
1442
2334
|
quota_membership_cooldown_seconds: 300,
|
|
1443
|
-
transient_membership_cooldown_seconds: 30
|
|
2335
|
+
transient_membership_cooldown_seconds: 30,
|
|
2336
|
+
runtime_poll_interval_milliseconds: 250
|
|
1444
2337
|
},
|
|
1445
2338
|
desktop: {
|
|
1446
2339
|
runtime_watchdog: {
|
|
@@ -1455,6 +2348,19 @@ var runtime_policy_generated_default = {
|
|
|
1455
2348
|
resource_scheduler: {
|
|
1456
2349
|
client_lock_ttl_milliseconds: 12e4,
|
|
1457
2350
|
client_poll_interval_milliseconds: 250
|
|
2351
|
+
},
|
|
2352
|
+
ui_bounds: {
|
|
2353
|
+
screener_min_volume_usd_max: 1e9
|
|
2354
|
+
},
|
|
2355
|
+
runtime: {
|
|
2356
|
+
assignment_page_default_limit: 20,
|
|
2357
|
+
client_candidate_owner_lease_grace_ms: 6e4,
|
|
2358
|
+
client_server_heartbeats_per_owner_lease: 2,
|
|
2359
|
+
client_server_heartbeat_min_ms: 5e3,
|
|
2360
|
+
client_server_heartbeat_max_ms: 3e4
|
|
2361
|
+
},
|
|
2362
|
+
defaults: {
|
|
2363
|
+
adaptive_schedule_enabled: true
|
|
1458
2364
|
}
|
|
1459
2365
|
},
|
|
1460
2366
|
deployment: {
|
|
@@ -1576,13 +2482,27 @@ var runtime_policy_generated_default = {
|
|
|
1576
2482
|
},
|
|
1577
2483
|
market_data: {
|
|
1578
2484
|
chart_interest: {
|
|
1579
|
-
historical_backfill_candle_limit: 1e3
|
|
2485
|
+
historical_backfill_candle_limit: 1e3,
|
|
2486
|
+
heartbeat_retry_seconds: 15,
|
|
2487
|
+
heartbeat_min_delay_ms: 1e3,
|
|
2488
|
+
catch_up_candle_limit: 300
|
|
1580
2489
|
}
|
|
1581
2490
|
},
|
|
1582
2491
|
auth: {
|
|
1583
2492
|
tokens: {
|
|
1584
2493
|
email_2fa_code_length: 6,
|
|
1585
2494
|
totp_code_length: 6
|
|
2495
|
+
},
|
|
2496
|
+
passwords: {
|
|
2497
|
+
min_length: 12
|
|
2498
|
+
}
|
|
2499
|
+
},
|
|
2500
|
+
android: {
|
|
2501
|
+
app_host: {
|
|
2502
|
+
profiles_refresh_interval_seconds: 60,
|
|
2503
|
+
running_report_interval_seconds: 5,
|
|
2504
|
+
page_identity_retry_seconds: 5,
|
|
2505
|
+
profiles_read_timeout_seconds: 30
|
|
1586
2506
|
}
|
|
1587
2507
|
},
|
|
1588
2508
|
websocket: {
|
|
@@ -1597,6 +2517,9 @@ var runtime_policy_generated_default = {
|
|
|
1597
2517
|
notifications: {
|
|
1598
2518
|
desktop: {
|
|
1599
2519
|
heartbeat_seconds: 20
|
|
2520
|
+
},
|
|
2521
|
+
telegram: {
|
|
2522
|
+
connect_link_poll_ms: 3e3
|
|
1600
2523
|
}
|
|
1601
2524
|
},
|
|
1602
2525
|
validation: {
|
|
@@ -1611,12 +2534,116 @@ var runtime_policy_generated_default = {
|
|
|
1611
2534
|
handle_changes_per_window: 2,
|
|
1612
2535
|
handle_change_window_days: 14
|
|
1613
2536
|
}
|
|
2537
|
+
},
|
|
2538
|
+
copy_trading: {
|
|
2539
|
+
source_search: {
|
|
2540
|
+
min_query_length: 2
|
|
2541
|
+
},
|
|
2542
|
+
runtime: {
|
|
2543
|
+
client_account_mode_cache_budget_divisor: 2
|
|
2544
|
+
}
|
|
2545
|
+
},
|
|
2546
|
+
billing: {
|
|
2547
|
+
credit_purchase: {
|
|
2548
|
+
amount_usd_steps: [
|
|
2549
|
+
10,
|
|
2550
|
+
25,
|
|
2551
|
+
50,
|
|
2552
|
+
100,
|
|
2553
|
+
500,
|
|
2554
|
+
1e3
|
|
2555
|
+
]
|
|
2556
|
+
}
|
|
2557
|
+
},
|
|
2558
|
+
admin: {
|
|
2559
|
+
page: {
|
|
2560
|
+
credit_grant_amount_usd_steps: [
|
|
2561
|
+
10,
|
|
2562
|
+
25,
|
|
2563
|
+
50,
|
|
2564
|
+
100,
|
|
2565
|
+
500,
|
|
2566
|
+
1e3,
|
|
2567
|
+
5e3,
|
|
2568
|
+
1e4,
|
|
2569
|
+
5e4,
|
|
2570
|
+
1e5
|
|
2571
|
+
],
|
|
2572
|
+
user_lookup_blur_close_delay_ms: 200,
|
|
2573
|
+
selected_user_refresh_delay_ms: 300,
|
|
2574
|
+
handle_preview_count: 3
|
|
2575
|
+
},
|
|
2576
|
+
models: {
|
|
2577
|
+
analytics: {
|
|
2578
|
+
summary_failure_kinds: 3
|
|
2579
|
+
}
|
|
2580
|
+
},
|
|
2581
|
+
user_search: {
|
|
2582
|
+
min_query_length: 2
|
|
2583
|
+
}
|
|
2584
|
+
},
|
|
2585
|
+
profile_setting_changelog: {
|
|
2586
|
+
public_profile_search_limit: 10,
|
|
2587
|
+
page_default_limit: 50
|
|
2588
|
+
},
|
|
2589
|
+
history: {
|
|
2590
|
+
full_history_default_limit: 20,
|
|
2591
|
+
default_page_size: 50,
|
|
2592
|
+
trade_lookup_max_order_ids: 200,
|
|
2593
|
+
decision_batch_default_limit: 50
|
|
2594
|
+
},
|
|
2595
|
+
updates: {
|
|
2596
|
+
posts: {
|
|
2597
|
+
list_default_limit: 20,
|
|
2598
|
+
list_max_limit: 100
|
|
2599
|
+
}
|
|
2600
|
+
},
|
|
2601
|
+
security: {
|
|
2602
|
+
byok: {
|
|
2603
|
+
max_provider_keys_per_provider: 5
|
|
2604
|
+
}
|
|
2605
|
+
},
|
|
2606
|
+
analysis: {
|
|
2607
|
+
live_request_candles: {
|
|
2608
|
+
default_limit: 100
|
|
2609
|
+
}
|
|
2610
|
+
},
|
|
2611
|
+
users: {
|
|
2612
|
+
search: {
|
|
2613
|
+
min_query_length: 2
|
|
2614
|
+
}
|
|
2615
|
+
},
|
|
2616
|
+
referrals: {
|
|
2617
|
+
code_max_length: 24,
|
|
2618
|
+
dashboard_default_limit: 20
|
|
2619
|
+
},
|
|
2620
|
+
insights: {
|
|
2621
|
+
client_host: {
|
|
2622
|
+
device_read_default_result_bytes: 2e5
|
|
2623
|
+
}
|
|
2624
|
+
},
|
|
2625
|
+
agent_tokens: {
|
|
2626
|
+
browser_login_ttl_seconds: 600,
|
|
2627
|
+
browser_login_poll_interval_seconds: 2
|
|
1614
2628
|
}
|
|
1615
2629
|
};
|
|
1616
2630
|
|
|
1617
2631
|
// lib/cli-release/updater.ts
|
|
2632
|
+
init_constants();
|
|
1618
2633
|
init_config();
|
|
1619
2634
|
|
|
2635
|
+
// lib/agent-core/stop-signals.ts
|
|
2636
|
+
init_define_VTX_EXO_POLICY();
|
|
2637
|
+
init_define_VTX_GROK_POLICY();
|
|
2638
|
+
init_define_VTX_PI_MODEL_POLICY();
|
|
2639
|
+
var HEADLESS_RUNTIME_STOP_SIGNALS = ["SIGINT", "SIGTERM", "SIGHUP"];
|
|
2640
|
+
var ignoreClosedTerminalWrites = () => {
|
|
2641
|
+
for (const stream of [process.stdout, process.stderr]) {
|
|
2642
|
+
if (!stream.listeners("error").includes(dropWriteError)) stream.on("error", dropWriteError);
|
|
2643
|
+
}
|
|
2644
|
+
};
|
|
2645
|
+
var dropWriteError = () => void 0;
|
|
2646
|
+
|
|
1620
2647
|
// lib/inference-host/config.ts
|
|
1621
2648
|
init_define_VTX_EXO_POLICY();
|
|
1622
2649
|
init_define_VTX_GROK_POLICY();
|
|
@@ -1679,13 +2706,15 @@ init_define_VTX_GROK_POLICY();
|
|
|
1679
2706
|
init_define_VTX_PI_MODEL_POLICY();
|
|
1680
2707
|
|
|
1681
2708
|
// lib/inference-host/config.ts
|
|
2709
|
+
init_constants();
|
|
2710
|
+
var HOST_CORE_POLICY = runtime_policy_generated_default.external_inference.host_core;
|
|
1682
2711
|
var InferenceHostProcessLockBusyError = class extends Error {
|
|
1683
2712
|
constructor() {
|
|
1684
2713
|
super("Another inference host process already owns this local host.");
|
|
1685
2714
|
this.name = "InferenceHostProcessLockBusyError";
|
|
1686
2715
|
}
|
|
1687
2716
|
};
|
|
1688
|
-
var MAX_INFERENCE_PRIVATE_FILE_BYTES =
|
|
2717
|
+
var MAX_INFERENCE_PRIVATE_FILE_BYTES = HOST_CORE_POLICY.private_file_max_bytes;
|
|
1689
2718
|
var WINDOWS_PRIVATE_ACL_MODES = ["harden", "verify", "verify-owner", "verify-private"];
|
|
1690
2719
|
var WINDOWS_PRIVATE_ACL_BROKER_SCRIPT = `$ErrorActionPreference='Stop'
|
|
1691
2720
|
$ProgressPreference='SilentlyContinue'
|
|
@@ -1693,7 +2722,7 @@ while(($line=[Console]::In.ReadLine()) -ne $null) {
|
|
|
1693
2722
|
$requestId=$null
|
|
1694
2723
|
$failureStage='request_validation'
|
|
1695
2724
|
try {
|
|
1696
|
-
if($line.Length -lt 2 -or $line.Length -gt
|
|
2725
|
+
if($line.Length -lt 2 -or $line.Length -gt ${HOST_CORE_POLICY.windows_acl_broker_request_max_bytes}) { throw 'invalid request size' }
|
|
1697
2726
|
$request=$line | ConvertFrom-Json
|
|
1698
2727
|
$names=@($request.PSObject.Properties.Name | Sort-Object)
|
|
1699
2728
|
if(($names -join ',') -ne 'id,kind,mode,path_b64') { throw 'invalid request shape' }
|
|
@@ -1769,9 +2798,9 @@ while(($line=[Console]::In.ReadLine()) -ne $null) {
|
|
|
1769
2798
|
[Console]::Out.WriteLine((@{id=$requestId;status='error';error_code=$failureStage} | ConvertTo-Json -Compress))
|
|
1770
2799
|
}
|
|
1771
2800
|
}`;
|
|
1772
|
-
var WINDOWS_IDENTITY_COMMAND_TIMEOUT_MS =
|
|
1773
|
-
var WINDOWS_PRIVATE_ACL_BROKER_STARTUP_TIMEOUT_MS =
|
|
1774
|
-
var SMALL_IDENTITY_COMMAND_TIMEOUT_MS =
|
|
2801
|
+
var WINDOWS_IDENTITY_COMMAND_TIMEOUT_MS = HOST_CORE_POLICY.windows_identity_command_timeout_ms;
|
|
2802
|
+
var WINDOWS_PRIVATE_ACL_BROKER_STARTUP_TIMEOUT_MS = HOST_CORE_POLICY.windows_acl_broker_startup_timeout_ms;
|
|
2803
|
+
var SMALL_IDENTITY_COMMAND_TIMEOUT_MS = HOST_CORE_POLICY.identity_command_timeout_ms;
|
|
1775
2804
|
var windowsPowerShellEnvironment = (extra = {}) => {
|
|
1776
2805
|
const sanitizedExtra = { ...extra };
|
|
1777
2806
|
delete sanitizedExtra.PSModulePath;
|
|
@@ -1814,9 +2843,9 @@ var WindowsPrivateAclBroker = class {
|
|
|
1814
2843
|
this.queue = operation.then(() => void 0, () => void 0);
|
|
1815
2844
|
await operation;
|
|
1816
2845
|
};
|
|
1817
|
-
this.requestTimeoutMs = dependencies.requestTimeoutMs ??
|
|
2846
|
+
this.requestTimeoutMs = dependencies.requestTimeoutMs ?? HOST_CORE_POLICY.windows_acl_broker_request_timeout_ms;
|
|
1818
2847
|
this.startupRequestTimeoutMs = dependencies.startupRequestTimeoutMs ?? WINDOWS_PRIVATE_ACL_BROKER_STARTUP_TIMEOUT_MS;
|
|
1819
|
-
this.idleShutdownMs = dependencies.idleShutdownMs ??
|
|
2848
|
+
this.idleShutdownMs = dependencies.idleShutdownMs ?? HOST_CORE_POLICY.windows_acl_broker_idle_shutdown_ms;
|
|
1820
2849
|
this.spawnProcess = dependencies.spawnProcess ?? (() => {
|
|
1821
2850
|
const invocation = windowsPrivateAclBrokerInvocation();
|
|
1822
2851
|
return spawn("powershell.exe", [...invocation.args], {
|
|
@@ -1835,7 +2864,7 @@ var WindowsPrivateAclBroker = class {
|
|
|
1835
2864
|
this.child = null;
|
|
1836
2865
|
this.outputBuffer = "";
|
|
1837
2866
|
child.stdin.end();
|
|
1838
|
-
const force = setTimeout(() => child.kill("SIGKILL"),
|
|
2867
|
+
const force = setTimeout(() => child.kill("SIGKILL"), HOST_CORE_POLICY.windows_acl_broker_kill_grace_ms);
|
|
1839
2868
|
force.unref();
|
|
1840
2869
|
child.once("exit", () => clearTimeout(force));
|
|
1841
2870
|
}, this.idleShutdownMs);
|
|
@@ -1859,7 +2888,7 @@ var WindowsPrivateAclBroker = class {
|
|
|
1859
2888
|
}
|
|
1860
2889
|
acceptLine(child, line) {
|
|
1861
2890
|
const pending = this.pending;
|
|
1862
|
-
if (!pending || !line || line.length >
|
|
2891
|
+
if (!pending || !line || line.length > HOST_CORE_POLICY.windows_acl_broker_response_line_max_chars) {
|
|
1863
2892
|
this.failChild(child, new Error("Windows private ACL broker returned malformed output."));
|
|
1864
2893
|
return;
|
|
1865
2894
|
}
|
|
@@ -1910,7 +2939,7 @@ var WindowsPrivateAclBroker = class {
|
|
|
1910
2939
|
child.stdout.on("data", (chunk) => {
|
|
1911
2940
|
if (this.child !== child) return;
|
|
1912
2941
|
this.outputBuffer += chunk;
|
|
1913
|
-
if (this.outputBuffer.length >
|
|
2942
|
+
if (this.outputBuffer.length > HOST_CORE_POLICY.windows_acl_broker_output_max_chars) {
|
|
1914
2943
|
this.failChild(child, new Error("Windows private ACL broker exceeded its output limit."));
|
|
1915
2944
|
return;
|
|
1916
2945
|
}
|
|
@@ -1948,7 +2977,7 @@ var WindowsPrivateAclBroker = class {
|
|
|
1948
2977
|
path_b64: Buffer.from(path, "utf8").toString("base64")
|
|
1949
2978
|
})}
|
|
1950
2979
|
`;
|
|
1951
|
-
if (Buffer.byteLength(request, "utf8") >
|
|
2980
|
+
if (Buffer.byteLength(request, "utf8") > HOST_CORE_POLICY.windows_acl_broker_request_max_bytes) {
|
|
1952
2981
|
throw new Error("Windows private ACL broker request exceeds its input limit.");
|
|
1953
2982
|
}
|
|
1954
2983
|
const { child, startedNow } = this.ensureChild();
|
|
@@ -2053,7 +3082,7 @@ var linuxProcessIdentity = async (pid) => {
|
|
|
2053
3082
|
readFile2("/proc/sys/kernel/random/boot_id", "utf8"),
|
|
2054
3083
|
readFile2(`/proc/${pid}/stat`, "utf8")
|
|
2055
3084
|
]);
|
|
2056
|
-
const fields = statLine.slice(statLine.lastIndexOf(")") +
|
|
3085
|
+
const fields = statLine.slice(statLine.lastIndexOf(")") + LINUX_PROC_STAT_COMM_TERMINATOR_CHARS).trim().split(/\s+/u);
|
|
2057
3086
|
const startTicks = fields[19];
|
|
2058
3087
|
return startTicks ? `linux:${bootId.trim()}:${startTicks}` : null;
|
|
2059
3088
|
} catch {
|
|
@@ -2108,7 +3137,7 @@ var windowsProcessIdentity = async (pid) => await new Promise((resolvePromise) =
|
|
|
2108
3137
|
settle(null);
|
|
2109
3138
|
}, invocation.timeoutMs);
|
|
2110
3139
|
child.stdout.on("data", (chunk) => {
|
|
2111
|
-
if (output.reduce((total, item) => total + item.byteLength, 0) + Buffer.byteLength(chunk) >
|
|
3140
|
+
if (output.reduce((total, item) => total + item.byteLength, 0) + Buffer.byteLength(chunk) > HOST_CORE_POLICY.windows_process_identity_output_max_bytes) {
|
|
2112
3141
|
child.kill("SIGKILL");
|
|
2113
3142
|
settle(null);
|
|
2114
3143
|
return;
|
|
@@ -2136,12 +3165,12 @@ var darwinProcessIdentity = async (pid) => await new Promise((resolvePromise) =>
|
|
|
2136
3165
|
const timer = setTimeout(() => {
|
|
2137
3166
|
child.kill("SIGKILL");
|
|
2138
3167
|
settle(null);
|
|
2139
|
-
},
|
|
3168
|
+
}, SMALL_IDENTITY_COMMAND_TIMEOUT_MS);
|
|
2140
3169
|
child.stdout.on("data", (chunk) => output.push(Buffer.from(chunk)));
|
|
2141
3170
|
child.once("error", () => settle(null));
|
|
2142
3171
|
child.once("exit", (code) => {
|
|
2143
3172
|
const started = Date.parse(Buffer.concat(output).toString("utf8").trim());
|
|
2144
|
-
settle(code === 0 && Number.isFinite(started) ? `darwin:${Math.floor(started /
|
|
3173
|
+
settle(code === 0 && Number.isFinite(started) ? `darwin:${Math.floor(started / MS_PER_SECOND)}` : null);
|
|
2145
3174
|
});
|
|
2146
3175
|
});
|
|
2147
3176
|
var runSmallIdentityCommand = async (command, args, env, timeoutMs = SMALL_IDENTITY_COMMAND_TIMEOUT_MS) => await new Promise((resolvePromise) => {
|
|
@@ -2165,7 +3194,7 @@ var runSmallIdentityCommand = async (command, args, env, timeoutMs = SMALL_IDENT
|
|
|
2165
3194
|
}, timeoutMs);
|
|
2166
3195
|
child.stdout.on("data", (chunk) => {
|
|
2167
3196
|
bytes += Buffer.byteLength(chunk);
|
|
2168
|
-
if (bytes >
|
|
3197
|
+
if (bytes > HOST_CORE_POLICY.identity_command_output_max_bytes) {
|
|
2169
3198
|
child.kill("SIGKILL");
|
|
2170
3199
|
settle(null);
|
|
2171
3200
|
return;
|
|
@@ -2258,7 +3287,7 @@ async function ensureInferencePrivateDirectory(path, dependencies = {}) {
|
|
|
2258
3287
|
}
|
|
2259
3288
|
} catch (error) {
|
|
2260
3289
|
if (error.code !== "ENOENT") throw error;
|
|
2261
|
-
await mkdir2(path, { recursive: true, mode:
|
|
3290
|
+
await mkdir2(path, { recursive: true, mode: OWNER_ONLY_DIRECTORY_MODE });
|
|
2262
3291
|
created = true;
|
|
2263
3292
|
}
|
|
2264
3293
|
const after = await lstat(path);
|
|
@@ -2279,7 +3308,7 @@ async function ensureInferencePrivateDirectory(path, dependencies = {}) {
|
|
|
2279
3308
|
}
|
|
2280
3309
|
return;
|
|
2281
3310
|
}
|
|
2282
|
-
if ((after.mode &
|
|
3311
|
+
if ((after.mode & GROUP_OTHER_PERMISSION_BITS) !== 0) {
|
|
2283
3312
|
throw new Error("Inference host state directory must have mode 0700.");
|
|
2284
3313
|
}
|
|
2285
3314
|
if (typeof process.getuid === "function" && after.uid !== process.getuid()) {
|
|
@@ -2310,8 +3339,8 @@ async function replaceAtomicInferencePrivateFile(temporaryPath, destinationPath,
|
|
|
2310
3339
|
const platform = options.platform ?? process.platform;
|
|
2311
3340
|
const renameFile = options.renameFile ?? rename;
|
|
2312
3341
|
const sleep = options.sleep ?? ((milliseconds) => new Promise((resolve3) => setTimeout(resolve3, milliseconds)));
|
|
2313
|
-
const maxAttempts = Math.max(1, options.maxAttempts ??
|
|
2314
|
-
const retryDelayMs = Math.max(0, options.retryDelayMs ??
|
|
3342
|
+
const maxAttempts = Math.max(1, options.maxAttempts ?? HOST_CORE_POLICY.private_file_replace_attempts);
|
|
3343
|
+
const retryDelayMs = Math.max(0, options.retryDelayMs ?? HOST_CORE_POLICY.private_file_replace_retry_delay_ms);
|
|
2315
3344
|
for (let attempt = 0; attempt < maxAttempts; attempt += 1) {
|
|
2316
3345
|
try {
|
|
2317
3346
|
await renameFile(temporaryPath, destinationPath);
|
|
@@ -2337,12 +3366,12 @@ async function writeAtomicInferencePrivateFile(path, contents, dependencies = {}
|
|
|
2337
3366
|
}
|
|
2338
3367
|
const temporary = join2(
|
|
2339
3368
|
directory,
|
|
2340
|
-
`.${process.pid}.${randomBytes(
|
|
3369
|
+
`.${process.pid}.${randomBytes(INFERENCE_HOST_RANDOM_BYTES.TEMP_FILE_SUFFIX).toString("hex")}.tmp`
|
|
2341
3370
|
);
|
|
2342
3371
|
const handle = await open(
|
|
2343
3372
|
temporary,
|
|
2344
3373
|
constants.O_CREAT | constants.O_EXCL | constants.O_WRONLY | constants.O_NOFOLLOW,
|
|
2345
|
-
|
|
3374
|
+
OWNER_ONLY_FILE_MODE
|
|
2346
3375
|
);
|
|
2347
3376
|
try {
|
|
2348
3377
|
await handle.writeFile(contents, "utf8");
|
|
@@ -2391,12 +3420,12 @@ async function writeAtomicInferencePrivateFile(path, contents, dependencies = {}
|
|
|
2391
3420
|
throw error;
|
|
2392
3421
|
}
|
|
2393
3422
|
}
|
|
2394
|
-
var PROCESS_LOCK_PUBLICATION_GRACE_MS =
|
|
2395
|
-
var PROCESS_LOCK_MAX_RECORD_BYTES =
|
|
2396
|
-
var PROCESS_LOCK_GUARD_ELECTION_LEASE_MS =
|
|
2397
|
-
var PROCESS_LOCK_GUARD_ELECTION_STALE_MS =
|
|
2398
|
-
var PROCESS_LOCK_GUARD_ELECTION_ATTEMPTS =
|
|
2399
|
-
var PROCESS_LOCK_GUARD_ELECTION_BACKOFF_MS =
|
|
3423
|
+
var PROCESS_LOCK_PUBLICATION_GRACE_MS = HOST_CORE_POLICY.process_lock_publication_grace_ms;
|
|
3424
|
+
var PROCESS_LOCK_MAX_RECORD_BYTES = HOST_CORE_POLICY.process_lock_record_max_bytes;
|
|
3425
|
+
var PROCESS_LOCK_GUARD_ELECTION_LEASE_MS = HOST_CORE_POLICY.process_lock_guard_election_lease_ms;
|
|
3426
|
+
var PROCESS_LOCK_GUARD_ELECTION_STALE_MS = HOST_CORE_POLICY.process_lock_guard_election_stale_ms;
|
|
3427
|
+
var PROCESS_LOCK_GUARD_ELECTION_ATTEMPTS = HOST_CORE_POLICY.process_lock_guard_election_attempts;
|
|
3428
|
+
var PROCESS_LOCK_GUARD_ELECTION_BACKOFF_MS = HOST_CORE_POLICY.process_lock_guard_election_backoff_ms;
|
|
2400
3429
|
var PROCESS_LOCK_LABEL = "Inference host process lock";
|
|
2401
3430
|
var PROCESS_LOCK_GUARD_LABEL = "Inference host process lock reclamation guard";
|
|
2402
3431
|
var sameProcessLockFile = (left, right) => left.dev === right.dev && left.ino === right.ino && left.size === right.size && left.mtimeMs === right.mtimeMs && left.ctimeMs === right.ctimeMs;
|
|
@@ -2405,7 +3434,7 @@ var openExclusiveProcessLockFile = async (path) => {
|
|
|
2405
3434
|
return await open(
|
|
2406
3435
|
path,
|
|
2407
3436
|
constants.O_CREAT | constants.O_EXCL | constants.O_WRONLY | constants.O_NOFOLLOW,
|
|
2408
|
-
|
|
3437
|
+
OWNER_ONLY_FILE_MODE
|
|
2409
3438
|
);
|
|
2410
3439
|
} catch (error) {
|
|
2411
3440
|
if (error.code === "EEXIST") return null;
|
|
@@ -2420,7 +3449,7 @@ var inspectProcessLockFile = async (path, label, probes) => {
|
|
|
2420
3449
|
if (error.code === "ENOENT") return { state: "missing" };
|
|
2421
3450
|
throw error;
|
|
2422
3451
|
}
|
|
2423
|
-
if (before.isSymbolicLink() || !before.isFile() || process.platform !== "win32" && (before.mode &
|
|
3452
|
+
if (before.isSymbolicLink() || !before.isFile() || process.platform !== "win32" && (before.mode & GROUP_OTHER_PERMISSION_BITS) !== 0 || typeof process.getuid === "function" && before.uid !== process.getuid()) {
|
|
2424
3453
|
throw new Error(`${label} is unsafe.`);
|
|
2425
3454
|
}
|
|
2426
3455
|
let handle;
|
|
@@ -2447,7 +3476,7 @@ var inspectProcessLockFile = async (path, label, probes) => {
|
|
|
2447
3476
|
} catch {
|
|
2448
3477
|
record = null;
|
|
2449
3478
|
}
|
|
2450
|
-
if (!record || record.schema_version !==
|
|
3479
|
+
if (!record || record.schema_version !== INFERENCE_HOST_PROCESS_LOCK_RECORD_SCHEMA_VERSION || !Number.isSafeInteger(record.pid) || Number(record.pid) < 1 || typeof record.owner_token !== "string" || !record.owner_token || typeof record.process_identity !== "string" || !record.process_identity || typeof record.boot_identity !== "string" || !record.boot_identity) {
|
|
2451
3480
|
if (Date.now() - stat.mtimeMs < PROCESS_LOCK_PUBLICATION_GRACE_MS) return { state: "busy" };
|
|
2452
3481
|
stale = true;
|
|
2453
3482
|
return { state: "stale", handle, stat };
|
|
@@ -2457,7 +3486,7 @@ var inspectProcessLockFile = async (path, label, probes) => {
|
|
|
2457
3486
|
const cacheKey = resolve(path);
|
|
2458
3487
|
if (await probes.currentBootIdentity() === record.boot_identity && probes.isProcessAlive(ownerPid)) {
|
|
2459
3488
|
const cached = processLockObservationCache.get(cacheKey);
|
|
2460
|
-
const observedIdentity = cached && cached.dev === stat.dev && cached.ino === stat.ino && cached.pid === ownerPid && cached.storedIdentity === storedIdentity && Date.now() - cached.observedAtMs <
|
|
3489
|
+
const observedIdentity = cached && cached.dev === stat.dev && cached.ino === stat.ino && cached.pid === ownerPid && cached.storedIdentity === storedIdentity && Date.now() - cached.observedAtMs < HOST_CORE_POLICY.process_lock_identity_cache_ms ? cached.observedIdentity : await probes.observeIdentity(ownerPid);
|
|
2461
3490
|
if (!observedIdentity) {
|
|
2462
3491
|
throw new Error("Inference host could not verify the existing lock owner identity.");
|
|
2463
3492
|
}
|
|
@@ -2514,7 +3543,7 @@ var removeStaleProcessLockReclaimGuard = async (lockPath, guardPath, inspection)
|
|
|
2514
3543
|
if (attempt > 0) {
|
|
2515
3544
|
await new Promise((resolvePromise) => setTimeout(
|
|
2516
3545
|
resolvePromise,
|
|
2517
|
-
Math.floor(Math.random() * PROCESS_LOCK_GUARD_ELECTION_BACKOFF_MS *
|
|
3546
|
+
Math.floor(Math.random() * PROCESS_LOCK_GUARD_ELECTION_BACKOFF_MS * BACKOFF_GROWTH_FACTOR ** Math.min(attempt, HOST_CORE_POLICY.process_lock_guard_election_backoff_exponent_max))
|
|
2518
3547
|
));
|
|
2519
3548
|
let current;
|
|
2520
3549
|
try {
|
|
@@ -2525,7 +3554,7 @@ var removeStaleProcessLockReclaimGuard = async (lockPath, guardPath, inspection)
|
|
|
2525
3554
|
}
|
|
2526
3555
|
if (!sameProcessLockFile(current, inspection.stat)) return;
|
|
2527
3556
|
}
|
|
2528
|
-
const ballotName = `${prefix}${randomBytes(
|
|
3557
|
+
const ballotName = `${prefix}${randomBytes(INFERENCE_HOST_RANDOM_BYTES.LOCK_BALLOT_NAME).toString("hex")}`;
|
|
2529
3558
|
const ballotPath = join2(directory, ballotName);
|
|
2530
3559
|
const ballot = await openExclusiveProcessLockFile(ballotPath);
|
|
2531
3560
|
if (!ballot) continue;
|
|
@@ -2567,8 +3596,8 @@ var removeStaleProcessLockReclaimGuard = async (lockPath, guardPath, inspection)
|
|
|
2567
3596
|
};
|
|
2568
3597
|
var acquireProcessLockReclaimGuard = async (lockPath, ownerRecord, probes) => {
|
|
2569
3598
|
const guardPath = `${lockPath}.reclaim`;
|
|
2570
|
-
const guardToken = randomBytes(
|
|
2571
|
-
for (let attempt = 0; attempt <
|
|
3599
|
+
const guardToken = randomBytes(INFERENCE_HOST_RANDOM_BYTES.LOCK_TOKEN).toString("base64url");
|
|
3600
|
+
for (let attempt = 0; attempt < INFERENCE_HOST_RECLAIM_GUARD_CREATE_PASSES; attempt += 1) {
|
|
2572
3601
|
const handle = await openExclusiveProcessLockFile(guardPath);
|
|
2573
3602
|
if (handle) {
|
|
2574
3603
|
try {
|
|
@@ -2630,7 +3659,7 @@ var acquireProcessLockReclaimGuard = async (lockPath, ownerRecord, probes) => {
|
|
|
2630
3659
|
async function acquireInferenceHostProcessLock(path, dependencies = {}) {
|
|
2631
3660
|
const directory = dirname2(path);
|
|
2632
3661
|
await ensureInferencePrivateDirectory(directory);
|
|
2633
|
-
const ownerToken = randomBytes(
|
|
3662
|
+
const ownerToken = randomBytes(INFERENCE_HOST_RANDOM_BYTES.LOCK_TOKEN).toString("base64url");
|
|
2634
3663
|
const probes = {
|
|
2635
3664
|
currentBootIdentity: dependencies.currentBootIdentity ?? (() => readInferenceSystemBootIdentity()),
|
|
2636
3665
|
observeIdentity: dependencies.processIdentity ?? defaultProcessIdentity,
|
|
@@ -2649,7 +3678,7 @@ async function acquireInferenceHostProcessLock(path, dependencies = {}) {
|
|
|
2649
3678
|
probes.currentBootIdentity()
|
|
2650
3679
|
]);
|
|
2651
3680
|
const ownerRecord = (token) => `${JSON.stringify({
|
|
2652
|
-
schema_version:
|
|
3681
|
+
schema_version: INFERENCE_HOST_PROCESS_LOCK_RECORD_SCHEMA_VERSION,
|
|
2653
3682
|
pid: process.pid,
|
|
2654
3683
|
owner_token: token,
|
|
2655
3684
|
process_identity: ownerIdentity,
|
|
@@ -2895,8 +3924,8 @@ var ensureUpdaterPrivateDirectory = async (path, root, dependencies = {}) => {
|
|
|
2895
3924
|
}
|
|
2896
3925
|
if (resolve2(path) === resolve2(root) || isPathWithin(root, path)) {
|
|
2897
3926
|
const existing = await lstat2(path).catch(() => null);
|
|
2898
|
-
if (existing && existing.isDirectory() && !existing.isSymbolicLink() && (existing.mode &
|
|
2899
|
-
await chmod(path,
|
|
3927
|
+
if (existing && existing.isDirectory() && !existing.isSymbolicLink() && (existing.mode & GROUP_OTHER_PERMISSION_BITS) !== 0 && (typeof process.getuid !== "function" || existing.uid === process.getuid())) {
|
|
3928
|
+
await chmod(path, OWNER_ONLY_DIRECTORY_MODE);
|
|
2900
3929
|
}
|
|
2901
3930
|
}
|
|
2902
3931
|
await ensureInferencePrivateDirectory(path, { ...dependencies, defaultRoot: root });
|
|
@@ -3025,7 +4054,7 @@ var writeCliReleaseRejection = async (path, rejection, privateRoot) => {
|
|
|
3025
4054
|
if (privateRoot) await ensureUpdaterPrivateDirectory(privateRoot, privateRoot);
|
|
3026
4055
|
await writeAtomicInferencePrivateFile(
|
|
3027
4056
|
path,
|
|
3028
|
-
`${JSON.stringify(rejection, null,
|
|
4057
|
+
`${JSON.stringify(rejection, null, JSON_INDENT_SPACES)}
|
|
3029
4058
|
`,
|
|
3030
4059
|
privateRoot ? { defaultRoot: privateRoot } : {}
|
|
3031
4060
|
);
|
|
@@ -3108,7 +4137,7 @@ var writeState = async (paths, state) => {
|
|
|
3108
4137
|
await ensureUpdaterPrivateDirectory(paths.root, paths.root);
|
|
3109
4138
|
await writeAtomicInferencePrivateFile(
|
|
3110
4139
|
paths.statePath,
|
|
3111
|
-
`${JSON.stringify(state, null,
|
|
4140
|
+
`${JSON.stringify(state, null, JSON_INDENT_SPACES)}
|
|
3112
4141
|
`,
|
|
3113
4142
|
{ defaultRoot: paths.root }
|
|
3114
4143
|
);
|
|
@@ -3120,7 +4149,7 @@ var appendCliUpdateLog = async (paths, event, fields = {}) => {
|
|
|
3120
4149
|
paths.logPath,
|
|
3121
4150
|
`${JSON.stringify({ at: (/* @__PURE__ */ new Date()).toISOString(), event, ...fields })}
|
|
3122
4151
|
`,
|
|
3123
|
-
{ encoding: "utf8", mode:
|
|
4152
|
+
{ encoding: "utf8", mode: OWNER_ONLY_FILE_MODE }
|
|
3124
4153
|
);
|
|
3125
4154
|
} catch {
|
|
3126
4155
|
}
|
|
@@ -3202,7 +4231,7 @@ var stageAndSelect = async (paths, target, input) => {
|
|
|
3202
4231
|
try {
|
|
3203
4232
|
await ensureUpdaterPrivateDirectory(paths.root, paths.root, { platform: input.platform });
|
|
3204
4233
|
} catch (error) {
|
|
3205
|
-
const reason = `update_directory_unsafe: ${error instanceof Error ? error.message.slice(0,
|
|
4234
|
+
const reason = `update_directory_unsafe: ${error instanceof Error ? error.message.slice(0, runtime_policy_generated_default.agent_cli.update_directory_failure_reason_max_chars) : "unknown"}`;
|
|
3206
4235
|
await appendCliUpdateLog(paths, "cli_update_failed", { package_version: target.version, reason });
|
|
3207
4236
|
return { kind: "failed", reason };
|
|
3208
4237
|
}
|
|
@@ -3235,7 +4264,7 @@ var stageAndSelect = async (paths, target, input) => {
|
|
|
3235
4264
|
await appendCliUpdateLog(paths, "cli_release_staged", { package_version: selection.package_version });
|
|
3236
4265
|
return { kind: "staged", selection };
|
|
3237
4266
|
} catch (error) {
|
|
3238
|
-
const reason = error instanceof Error ? error.message.slice(0,
|
|
4267
|
+
const reason = error instanceof Error ? error.message.slice(0, runtime_policy_generated_default.agent_cli.update_failure_reason_max_chars) : "unknown";
|
|
3239
4268
|
await appendCliUpdateLog(paths, "cli_update_failed", { package_version: target.version, reason });
|
|
3240
4269
|
return { kind: "failed", reason };
|
|
3241
4270
|
} finally {
|
|
@@ -3323,7 +4352,7 @@ var planCliEntryUpdate = async (entry, argv, env, script, dependencies = {}) =>
|
|
|
3323
4352
|
return runSelected();
|
|
3324
4353
|
} catch (error) {
|
|
3325
4354
|
await appendCliUpdateLog(paths, "cli_update_check_failed", {
|
|
3326
|
-
reason: error instanceof Error ? error.message.slice(0,
|
|
4355
|
+
reason: error instanceof Error ? error.message.slice(0, runtime_policy_generated_default.agent_cli.update_failure_reason_max_chars) : "unknown"
|
|
3327
4356
|
});
|
|
3328
4357
|
return { kind: "run" };
|
|
3329
4358
|
}
|
|
@@ -3360,6 +4389,7 @@ var installStopTracker = () => {
|
|
|
3360
4389
|
const stopped = new AbortController();
|
|
3361
4390
|
const tracker = {
|
|
3362
4391
|
stops: 0,
|
|
4392
|
+
hungUp: false,
|
|
3363
4393
|
child: null,
|
|
3364
4394
|
stopped: stopped.signal,
|
|
3365
4395
|
uninstall: () => void 0
|
|
@@ -3374,14 +4404,19 @@ var installStopTracker = () => {
|
|
|
3374
4404
|
}
|
|
3375
4405
|
};
|
|
3376
4406
|
const forward = (signal) => () => {
|
|
4407
|
+
if (signal === "SIGHUP") {
|
|
4408
|
+
ignoreClosedTerminalWrites();
|
|
4409
|
+
if (tracker.stops === 0) tracker.hungUp = true;
|
|
4410
|
+
}
|
|
3377
4411
|
tracker.stops += 1;
|
|
3378
4412
|
stopped.abort();
|
|
4413
|
+
if (signal === "SIGHUP" && process.platform === "win32") return;
|
|
3379
4414
|
try {
|
|
3380
4415
|
tracker.child?.kill(signal);
|
|
3381
4416
|
} catch {
|
|
3382
4417
|
}
|
|
3383
4418
|
};
|
|
3384
|
-
const forwarded =
|
|
4419
|
+
const forwarded = HEADLESS_RUNTIME_STOP_SIGNALS.filter((signal) => signal !== "SIGINT").map((signal) => [signal, forward(signal)]);
|
|
3385
4420
|
process.on("SIGINT", onInterrupt);
|
|
3386
4421
|
for (const [signal, handler] of forwarded) process.on(signal, handler);
|
|
3387
4422
|
tracker.uninstall = () => {
|
|
@@ -3501,7 +4536,7 @@ var finishRollBack = async (paths, selection, reason, fallback) => {
|
|
|
3501
4536
|
});
|
|
3502
4537
|
return fallback?.package_version ?? null;
|
|
3503
4538
|
};
|
|
3504
|
-
var INTERRUPTED_EXIT_CODE =
|
|
4539
|
+
var INTERRUPTED_EXIT_CODE = EXIT_CODE_INTERRUPTED;
|
|
3505
4540
|
var superviseRuntime = async (argv, dependencies, env, launcher) => {
|
|
3506
4541
|
const stderr = dependencies.stderr ?? process.stderr;
|
|
3507
4542
|
const paths = resolveCliUpdatePaths(env);
|
|
@@ -3513,6 +4548,7 @@ var superviseRuntime = async (argv, dependencies, env, launcher) => {
|
|
|
3513
4548
|
};
|
|
3514
4549
|
const stops = installStopTracker();
|
|
3515
4550
|
const endAfterStop = async (exitCode) => {
|
|
4551
|
+
if (stops.hungUp) return exitCode;
|
|
3516
4552
|
if (!await readRuntimeResume(supervisorEnv) || !dependencies.stopRuntimeBetweenChildren) return exitCode;
|
|
3517
4553
|
const stopExitCode = await dependencies.stopRuntimeBetweenChildren(supervisorEnv);
|
|
3518
4554
|
return stopExitCode === 0 ? exitCode : stopExitCode;
|
|
@@ -3568,10 +4604,10 @@ var superviseRuntime = async (argv, dependencies, env, launcher) => {
|
|
|
3568
4604
|
continue;
|
|
3569
4605
|
}
|
|
3570
4606
|
if (result.kind === "exited" || result.kind === "interrupted") {
|
|
3571
|
-
const childExitCode = result.signal ?
|
|
4607
|
+
const childExitCode = result.signal ? EXIT_CODE_SIGNAL_BASE + (osConstants.signals[result.signal] ?? 0) : result.exitCode;
|
|
3572
4608
|
return stops.stops > 0 ? await endAfterStop(childExitCode) : childExitCode;
|
|
3573
4609
|
}
|
|
3574
|
-
if (plan.kind !== "reexec" || plan.selection.confirmed_at || failedStarts >=
|
|
4610
|
+
if (plan.kind !== "reexec" || plan.selection.confirmed_at || failedStarts >= runtime_policy_generated_default.agent_cli.supervisor_max_failed_release_starts) {
|
|
3575
4611
|
return result.exitCode;
|
|
3576
4612
|
}
|
|
3577
4613
|
failedStarts += 1;
|
|
@@ -3610,7 +4646,7 @@ var runCliEntry = async (entry, argv, runHere, dependencies = {}, env = process.
|
|
|
3610
4646
|
const paths = resolveCliUpdatePaths(env);
|
|
3611
4647
|
const now = dependencies.now ?? (() => /* @__PURE__ */ new Date());
|
|
3612
4648
|
const current = dependencies.currentVersion ?? agent_cli_release_default.package_version;
|
|
3613
|
-
for (let attempt = 0; attempt <
|
|
4649
|
+
for (let attempt = 0; attempt < runtime_policy_generated_default.agent_cli.update_plan_max_attempts; attempt += 1) {
|
|
3614
4650
|
const plan = await planCliEntryUpdate(entry, argv, env, script, dependencies);
|
|
3615
4651
|
if (plan.kind === "refuse") {
|
|
3616
4652
|
stderr.write(`${plan.message}
|
|
@@ -3653,7 +4689,7 @@ var runCliEntry = async (entry, argv, runHere, dependencies = {}, env = process.
|
|
|
3653
4689
|
}
|
|
3654
4690
|
return await runHere();
|
|
3655
4691
|
};
|
|
3656
|
-
var RUNTIME_RESTART_FOR_UPDATE_EXIT_CODE =
|
|
4692
|
+
var RUNTIME_RESTART_FOR_UPDATE_EXIT_CODE = EXIT_CODE_TEMPFAIL;
|
|
3657
4693
|
var RUNTIME_SUPERVISED_ENV = "VTX_CLI_RUNTIME_SUPERVISED";
|
|
3658
4694
|
var RUNTIME_RESUME_ENV = "VTX_CLI_RUNTIME_RESUME";
|
|
3659
4695
|
var RUNTIME_SUPERVISOR_PID_ENV = "VTX_CLI_RUNTIME_SUPERVISOR_PID";
|
|
@@ -3695,7 +4731,8 @@ var isSupervisableRuntimeCommand = (argv) => {
|
|
|
3695
4731
|
};
|
|
3696
4732
|
|
|
3697
4733
|
// bin/vtx-mcp.ts
|
|
3698
|
-
|
|
4734
|
+
init_constants();
|
|
4735
|
+
process.exitCode = await runCliEntry("vtx-mcp", process.argv.slice(NODE_ARGV_COMMAND_ARGS_START), async () => {
|
|
3699
4736
|
const { runVtxMcpStdioServer: runVtxMcpStdioServer2 } = await Promise.resolve().then(() => (init_stdio(), stdio_exports));
|
|
3700
4737
|
await reportCliEntryReady();
|
|
3701
4738
|
await runVtxMcpStdioServer2();
|