@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
|
@@ -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.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" } } };
|
|
18
18
|
|
|
19
19
|
// lib/runtime-policy.generated.json
|
|
20
20
|
var runtime_policy_generated_default = {
|
|
@@ -44,6 +44,7 @@ var runtime_policy_generated_default = {
|
|
|
44
44
|
post_execution_refresh_delay_ms: 3e3,
|
|
45
45
|
account_read_backoff_min_ms: 2e3,
|
|
46
46
|
account_read_backoff_max_ms: 6e4,
|
|
47
|
+
account_read_backoff_exponent_max: 30,
|
|
47
48
|
ai_start_grace_min_ms: 45e3
|
|
48
49
|
},
|
|
49
50
|
deployment_reload_observability: {
|
|
@@ -63,6 +64,603 @@ var runtime_policy_generated_default = {
|
|
|
63
64
|
refresh_interval_ms: 1e4,
|
|
64
65
|
watchdog_interval_ms: 1e3,
|
|
65
66
|
watchdog_grace_ms: 500
|
|
67
|
+
},
|
|
68
|
+
preferences: {
|
|
69
|
+
load_timeout_ms: 5e3,
|
|
70
|
+
initial_load_settle_ms: 100,
|
|
71
|
+
external_save_timeout_ms: 8e3,
|
|
72
|
+
guest_cookie_max_age_days: 9999,
|
|
73
|
+
dropdown_search_max_chars: 200
|
|
74
|
+
},
|
|
75
|
+
navigation_feedback: {
|
|
76
|
+
finish_fallback_ms: 2250
|
|
77
|
+
},
|
|
78
|
+
confirmation_notices: {
|
|
79
|
+
success_indicator_ms: 2e3,
|
|
80
|
+
byok_success_message_ms: 3e3
|
|
81
|
+
},
|
|
82
|
+
screener_runtime_config_retry: {
|
|
83
|
+
base_delay_ms: 1e3,
|
|
84
|
+
max_delay_ms: 3e4
|
|
85
|
+
},
|
|
86
|
+
advanced_chart: {
|
|
87
|
+
debug_log_throttle_ms: 1e3,
|
|
88
|
+
initial_history_stall_ms: 15e3,
|
|
89
|
+
initial_history_recovery_cooldown_ms: 3e4,
|
|
90
|
+
viewport_restore_settle_ms: 100,
|
|
91
|
+
symbol_price_wait_ms: 2e3,
|
|
92
|
+
layout_auto_save_delay_ms: 250
|
|
93
|
+
},
|
|
94
|
+
ai_panel: {
|
|
95
|
+
message_limit: 100,
|
|
96
|
+
post_execution_history_sync_delay_ms: 2e3,
|
|
97
|
+
runtime_error_attempt_group_window_seconds: 120,
|
|
98
|
+
debug_runtime_error_preview_chars: 180
|
|
99
|
+
},
|
|
100
|
+
ai_settings: {
|
|
101
|
+
storage_authority_broadcast_dedupe_window_ms: 2e3,
|
|
102
|
+
margin_type_external_authority_ttl_ms: 12e4,
|
|
103
|
+
screener_status_refresh_delay_ms: 75,
|
|
104
|
+
preference_message_dedupe_keys: 24,
|
|
105
|
+
available_assets_retry_default_ms: 15e3,
|
|
106
|
+
available_assets_retry_min_ms: 1e3,
|
|
107
|
+
available_assets_retry_max_ms: 6e4,
|
|
108
|
+
external_sync_settle_ms: 1e3,
|
|
109
|
+
billing_stats_reuse_ms: 3e3,
|
|
110
|
+
prompt_commit_debounce_ms: 180,
|
|
111
|
+
model_count_display_settle_ms: 320,
|
|
112
|
+
model_picker_scroll_settle_ms: 60
|
|
113
|
+
},
|
|
114
|
+
ai_settings_debug: {
|
|
115
|
+
model_debug_event_limit: 160,
|
|
116
|
+
browser_resource_timings: 40,
|
|
117
|
+
browser_resource_panel_rows: 12,
|
|
118
|
+
browser_timing_refresh_delay_ms: 1500,
|
|
119
|
+
comparable_hash_full_max_chars: 16,
|
|
120
|
+
comparable_hash_edge_chars: 8,
|
|
121
|
+
console_message_chars: 4e3,
|
|
122
|
+
comparable_diff_max_depth: 4,
|
|
123
|
+
react_profile_min_duration_ms: 20,
|
|
124
|
+
react_profile_slower_margin_ms: 25,
|
|
125
|
+
react_profile_slow_update_ms: 100,
|
|
126
|
+
react_profile_repeat_interval_ms: 1500,
|
|
127
|
+
snapshot_ids_head: 10,
|
|
128
|
+
longtask_samples: 12,
|
|
129
|
+
recent_events: 20,
|
|
130
|
+
hydration_recent_events: 12,
|
|
131
|
+
dirty_state_recent_events: 12,
|
|
132
|
+
navbar_profile_entries: 30,
|
|
133
|
+
dropdown_search_paint_events: 6,
|
|
134
|
+
dropdown_options_debounce_ms: 220,
|
|
135
|
+
dropdown_hover_min_interval_ms: 80,
|
|
136
|
+
slow_render_ms: 80,
|
|
137
|
+
render_min_ms: 24,
|
|
138
|
+
render_min_interval_ms: 300,
|
|
139
|
+
model_fingerprint_head: 24,
|
|
140
|
+
models_head: 12
|
|
141
|
+
},
|
|
142
|
+
insights_charts: {
|
|
143
|
+
max_charts: 3,
|
|
144
|
+
max_line_points: 160,
|
|
145
|
+
max_bars: 8
|
|
146
|
+
},
|
|
147
|
+
analysis_chat: {
|
|
148
|
+
new_message_scroll_delay_ms: 100
|
|
149
|
+
},
|
|
150
|
+
snapshot_selector: {
|
|
151
|
+
sync_resolution_pending_ms: 350,
|
|
152
|
+
own_broadcast_window_ms: 5e3,
|
|
153
|
+
seen_imported_ids_limit: 200,
|
|
154
|
+
post_import_reload_delay_ms: 1e3,
|
|
155
|
+
debug_value_chars: 220,
|
|
156
|
+
debug_fingerprint_head_chars: 64,
|
|
157
|
+
debug_head_snapshot_ids: 8,
|
|
158
|
+
debug_comparable_head_chars: 240,
|
|
159
|
+
debug_panel_comparable_head_chars: 120
|
|
160
|
+
},
|
|
161
|
+
safe_mode_settings: {
|
|
162
|
+
usdc_slider_cents_steps: [
|
|
163
|
+
10,
|
|
164
|
+
25,
|
|
165
|
+
50,
|
|
166
|
+
75,
|
|
167
|
+
100,
|
|
168
|
+
150,
|
|
169
|
+
200,
|
|
170
|
+
300,
|
|
171
|
+
400,
|
|
172
|
+
500,
|
|
173
|
+
750,
|
|
174
|
+
1e3,
|
|
175
|
+
1500,
|
|
176
|
+
2e3,
|
|
177
|
+
2500,
|
|
178
|
+
3e3,
|
|
179
|
+
4e3,
|
|
180
|
+
5e3,
|
|
181
|
+
7500,
|
|
182
|
+
1e4,
|
|
183
|
+
15e3,
|
|
184
|
+
2e4,
|
|
185
|
+
25e3,
|
|
186
|
+
3e4,
|
|
187
|
+
4e4,
|
|
188
|
+
5e4,
|
|
189
|
+
75e3,
|
|
190
|
+
1e5,
|
|
191
|
+
125e3,
|
|
192
|
+
15e4,
|
|
193
|
+
2e5,
|
|
194
|
+
25e4,
|
|
195
|
+
3e5,
|
|
196
|
+
4e5,
|
|
197
|
+
5e5,
|
|
198
|
+
6e5,
|
|
199
|
+
7e5,
|
|
200
|
+
8e5,
|
|
201
|
+
9e5,
|
|
202
|
+
1e6
|
|
203
|
+
],
|
|
204
|
+
percent_input_step_bps: 1
|
|
205
|
+
},
|
|
206
|
+
copy_trading_settings: {
|
|
207
|
+
scale_multiplier_slider_thousandths_steps: [
|
|
208
|
+
10,
|
|
209
|
+
20,
|
|
210
|
+
30,
|
|
211
|
+
40,
|
|
212
|
+
50,
|
|
213
|
+
75,
|
|
214
|
+
100,
|
|
215
|
+
150,
|
|
216
|
+
200,
|
|
217
|
+
250,
|
|
218
|
+
300,
|
|
219
|
+
400,
|
|
220
|
+
500,
|
|
221
|
+
600,
|
|
222
|
+
700,
|
|
223
|
+
800,
|
|
224
|
+
850,
|
|
225
|
+
900,
|
|
226
|
+
950,
|
|
227
|
+
975,
|
|
228
|
+
1e3,
|
|
229
|
+
1025,
|
|
230
|
+
1050,
|
|
231
|
+
1100,
|
|
232
|
+
1250,
|
|
233
|
+
1500,
|
|
234
|
+
1750,
|
|
235
|
+
2e3,
|
|
236
|
+
2500,
|
|
237
|
+
3e3,
|
|
238
|
+
4e3,
|
|
239
|
+
5e3,
|
|
240
|
+
7500,
|
|
241
|
+
1e4,
|
|
242
|
+
15e3,
|
|
243
|
+
2e4,
|
|
244
|
+
3e4,
|
|
245
|
+
4e4,
|
|
246
|
+
5e4,
|
|
247
|
+
75e3,
|
|
248
|
+
1e5
|
|
249
|
+
]
|
|
250
|
+
},
|
|
251
|
+
analysis_settings: {
|
|
252
|
+
lookback_slider_candles_steps: [
|
|
253
|
+
1,
|
|
254
|
+
2,
|
|
255
|
+
3,
|
|
256
|
+
4,
|
|
257
|
+
5,
|
|
258
|
+
6,
|
|
259
|
+
7,
|
|
260
|
+
8,
|
|
261
|
+
9,
|
|
262
|
+
10,
|
|
263
|
+
12,
|
|
264
|
+
14,
|
|
265
|
+
16,
|
|
266
|
+
18,
|
|
267
|
+
20,
|
|
268
|
+
24,
|
|
269
|
+
28,
|
|
270
|
+
32,
|
|
271
|
+
36,
|
|
272
|
+
40,
|
|
273
|
+
42,
|
|
274
|
+
44,
|
|
275
|
+
48,
|
|
276
|
+
52,
|
|
277
|
+
56,
|
|
278
|
+
60,
|
|
279
|
+
65,
|
|
280
|
+
70,
|
|
281
|
+
75,
|
|
282
|
+
80,
|
|
283
|
+
90,
|
|
284
|
+
100,
|
|
285
|
+
110,
|
|
286
|
+
120,
|
|
287
|
+
130,
|
|
288
|
+
140,
|
|
289
|
+
150,
|
|
290
|
+
160,
|
|
291
|
+
180,
|
|
292
|
+
200
|
|
293
|
+
]
|
|
294
|
+
},
|
|
295
|
+
trading_limit_settings: {
|
|
296
|
+
ai_trade_amount_usdc_steps: [
|
|
297
|
+
20,
|
|
298
|
+
30,
|
|
299
|
+
40,
|
|
300
|
+
50,
|
|
301
|
+
60,
|
|
302
|
+
70,
|
|
303
|
+
80,
|
|
304
|
+
90,
|
|
305
|
+
100,
|
|
306
|
+
150,
|
|
307
|
+
175,
|
|
308
|
+
200,
|
|
309
|
+
225,
|
|
310
|
+
250,
|
|
311
|
+
275,
|
|
312
|
+
300,
|
|
313
|
+
325,
|
|
314
|
+
350,
|
|
315
|
+
375,
|
|
316
|
+
400,
|
|
317
|
+
425,
|
|
318
|
+
450,
|
|
319
|
+
475,
|
|
320
|
+
500,
|
|
321
|
+
600,
|
|
322
|
+
700,
|
|
323
|
+
800,
|
|
324
|
+
900,
|
|
325
|
+
1e3,
|
|
326
|
+
1250,
|
|
327
|
+
1500,
|
|
328
|
+
1750,
|
|
329
|
+
2e3,
|
|
330
|
+
2250,
|
|
331
|
+
2500,
|
|
332
|
+
2750,
|
|
333
|
+
3e3,
|
|
334
|
+
3250,
|
|
335
|
+
3500,
|
|
336
|
+
3750,
|
|
337
|
+
4e3,
|
|
338
|
+
4250,
|
|
339
|
+
4500,
|
|
340
|
+
4750,
|
|
341
|
+
5e3,
|
|
342
|
+
6e3,
|
|
343
|
+
7e3,
|
|
344
|
+
8e3,
|
|
345
|
+
9e3,
|
|
346
|
+
1e4
|
|
347
|
+
],
|
|
348
|
+
ai_trade_amount_max_stop_count: 50
|
|
349
|
+
},
|
|
350
|
+
calendar_settings: {
|
|
351
|
+
buffer_input_step_seconds: 30
|
|
352
|
+
},
|
|
353
|
+
debug_logs: {
|
|
354
|
+
snapshot_card_lines: 80,
|
|
355
|
+
render_debug_overlay_entries: 120,
|
|
356
|
+
render_debug_entry_data_chars: 2400,
|
|
357
|
+
analytics_dashboard_lines: 220,
|
|
358
|
+
analytics_metric_capture_interval_ms: 400,
|
|
359
|
+
system_profile_mode_lines: 120,
|
|
360
|
+
admin_text_chars: 160,
|
|
361
|
+
admin_analysis_run_id_chars: 32,
|
|
362
|
+
hyperliquid_balance_preview_count: 3,
|
|
363
|
+
model_picker_preview_count: 5,
|
|
364
|
+
render_debug_entries: 250
|
|
365
|
+
},
|
|
366
|
+
history_panels: {
|
|
367
|
+
display_batch_size: 50,
|
|
368
|
+
load_more_threshold_px: 100,
|
|
369
|
+
trade_history_fetch_page_size: 100,
|
|
370
|
+
ai_panel_interaction_window_ms: 2500,
|
|
371
|
+
ai_panel_defer_max_staleness_ms: 1e4,
|
|
372
|
+
ai_panel_defer_retry_ms: 1500,
|
|
373
|
+
order_id_metadata_traversal_max_nodes: 400
|
|
374
|
+
},
|
|
375
|
+
trade_page: {
|
|
376
|
+
config_first_retry_delay_ms: 1e3,
|
|
377
|
+
margin_mode_min_loading_ms: 250,
|
|
378
|
+
preferences_load_retry_delay_ms_steps: [
|
|
379
|
+
1500,
|
|
380
|
+
3e3,
|
|
381
|
+
6e3,
|
|
382
|
+
12e3
|
|
383
|
+
],
|
|
384
|
+
preferences_retry_jitter_max_ms: 1500,
|
|
385
|
+
all_profile_preferences_save_delay_ms: 1500,
|
|
386
|
+
all_profile_save_interaction_window_ms: 2e3,
|
|
387
|
+
all_profile_read_concurrency: 2,
|
|
388
|
+
all_profile_ai_event_dedupe_limit: 200,
|
|
389
|
+
all_profile_order_history_limit: 50,
|
|
390
|
+
all_profile_section_timeout_min_ms: 1e3,
|
|
391
|
+
all_profile_account_summary_poll_min_ms: 1e3,
|
|
392
|
+
all_profile_trade_history_poll_min_ms: 1e3,
|
|
393
|
+
all_profile_live_refresh_idle_timeout_ms: 5e3,
|
|
394
|
+
copy_trading_message_limit: 25,
|
|
395
|
+
browser_account_refresh_min_interval_ms: 1250,
|
|
396
|
+
browser_account_watchdog_poll_min_ms: 1e4,
|
|
397
|
+
rate_limit_retry_buffer_ms: 250,
|
|
398
|
+
restricted_runtime_poll_min_ms: 3e3,
|
|
399
|
+
restricted_runtime_event_limit: 20,
|
|
400
|
+
server_account_rest_catchup_min_interval_ms: 5e3,
|
|
401
|
+
server_account_catchup_poll_min_ms: 5e3,
|
|
402
|
+
execution_rest_catchup_delay_ms_steps: [
|
|
403
|
+
2e3,
|
|
404
|
+
8e3
|
|
405
|
+
],
|
|
406
|
+
unified_bootstrap_hold_min_ms: 4e3,
|
|
407
|
+
unified_bootstrap_hold_max_ms: 8e3,
|
|
408
|
+
observed_activity_recent_ms: 8e3,
|
|
409
|
+
startup_hold_activation_gap_ms: 9e4,
|
|
410
|
+
hidden_ticker_update_interval_ms: 16,
|
|
411
|
+
client_close_fill_sync_attempts: 3,
|
|
412
|
+
client_close_fill_sync_retry_step_ms: 300,
|
|
413
|
+
leverage_update_debounce_ms: 250,
|
|
414
|
+
post_leverage_update_order_delay_ms: 250,
|
|
415
|
+
ai_control_lookback_fallback_candles: 25,
|
|
416
|
+
takeover_telemetry_error_chars: 500,
|
|
417
|
+
takeover_telemetry_error_name_chars: 120,
|
|
418
|
+
takeover_telemetry_failure_chars: 300,
|
|
419
|
+
client_next_run_interval_min_ms: 1e3,
|
|
420
|
+
ws_server_time_reorder_tolerance_ms: 1e3
|
|
421
|
+
},
|
|
422
|
+
trade_account_summary: {
|
|
423
|
+
unified_min_balances_usd: 25,
|
|
424
|
+
unified_balances_account_value_multiple: 3,
|
|
425
|
+
unified_spot_ratio_percent: 50
|
|
426
|
+
},
|
|
427
|
+
trade_debug_logs: {
|
|
428
|
+
text_chars: 180,
|
|
429
|
+
runtime_identity_tail_chars: 18,
|
|
430
|
+
run_id_chars: 8,
|
|
431
|
+
control_step_error_chars: 160,
|
|
432
|
+
control_note_chars: 120,
|
|
433
|
+
error_detail_chars: 120,
|
|
434
|
+
click_target_text_chars: 120,
|
|
435
|
+
ai_log_text_chars: 120,
|
|
436
|
+
preferences_error_chars: 160,
|
|
437
|
+
ssr_error_detail_chars: 160,
|
|
438
|
+
breadcrumb_payload_chars: 500,
|
|
439
|
+
render_debug_data_chars: 1200,
|
|
440
|
+
server_execution_value_chars: 700,
|
|
441
|
+
server_execution_error_chars: 250,
|
|
442
|
+
cost_trace_execution_debug_chars: 500,
|
|
443
|
+
positions_fetch_error_chars: 220,
|
|
444
|
+
ai_debug_lines: 100,
|
|
445
|
+
ai_model_status_lines: 100,
|
|
446
|
+
ai_model_status_shown_lines: 80,
|
|
447
|
+
ai_status_bar_trace_lines: 200,
|
|
448
|
+
ai_status_bar_trace_shown_lines: 120,
|
|
449
|
+
ai_status_bar_transition_lines: 200,
|
|
450
|
+
ai_status_bar_transition_shown_lines: 120,
|
|
451
|
+
ai_status_role_compare_lines: 240,
|
|
452
|
+
ai_status_role_compare_shown_lines: 160,
|
|
453
|
+
ai_status_bar_input_lines: 200,
|
|
454
|
+
ai_status_bar_input_shown_lines: 120,
|
|
455
|
+
ai_engine_transition_lines: 200,
|
|
456
|
+
ai_engine_transition_shown_lines: 120,
|
|
457
|
+
ai_panel_cost_lines: 120,
|
|
458
|
+
ai_panel_cost_shown_lines: 80,
|
|
459
|
+
ai_runtime_error_label_lines: 100,
|
|
460
|
+
ai_runtime_error_label_shown_lines: 80,
|
|
461
|
+
loop_status_mutation_lines: 200,
|
|
462
|
+
loop_status_mutation_shown_lines: 120,
|
|
463
|
+
login_recovery_trace_lines: 240,
|
|
464
|
+
sparkle_ownership_lines: 120,
|
|
465
|
+
ai_trader_start_lines: 100,
|
|
466
|
+
ai_trader_restart_trace_lines: 120,
|
|
467
|
+
ai_control_button_trace_lines: 240,
|
|
468
|
+
profile_status_hydration_lines: 120,
|
|
469
|
+
profile_status_hydration_shown_lines: 100,
|
|
470
|
+
cross_profile_runtime_lines: 120,
|
|
471
|
+
cross_profile_runtime_shown_lines: 80,
|
|
472
|
+
all_mode_ai_history_lines: 120,
|
|
473
|
+
positions_pnl_lines: 240,
|
|
474
|
+
positions_pnl_shown_lines: 200,
|
|
475
|
+
positions_pnl_changed_rows: 12,
|
|
476
|
+
account_state_lines: 80,
|
|
477
|
+
account_state_shown_lines: 200,
|
|
478
|
+
symbol_hydration_lines: 120,
|
|
479
|
+
trade_ui_click_lines: 200,
|
|
480
|
+
manual_close_lines: 80,
|
|
481
|
+
all_mode_interaction_lines: 160,
|
|
482
|
+
chart_render_entries: 80,
|
|
483
|
+
control_state_lines: 80,
|
|
484
|
+
runtime_network_lines: 80,
|
|
485
|
+
provider_fallback_trace_lines: 60,
|
|
486
|
+
runtime_stop_trace_lines: 80,
|
|
487
|
+
runtime_stop_breadcrumb_lines: 40,
|
|
488
|
+
prompt_contract_trace_lines: 80,
|
|
489
|
+
execution_trace_lines: 120,
|
|
490
|
+
single_history_trace_lines: 40,
|
|
491
|
+
ignored_ticker_channels: 8,
|
|
492
|
+
recent_network_targets: 8,
|
|
493
|
+
provider_failure_blocks: 6,
|
|
494
|
+
market_data_failure_blocks: 8,
|
|
495
|
+
pricing_candidates_shown: 10,
|
|
496
|
+
balance_delta_coins: 3,
|
|
497
|
+
all_mode_ai_head_messages: 5,
|
|
498
|
+
server_execution_decisions: 10,
|
|
499
|
+
server_decisions_shown: 5,
|
|
500
|
+
server_execution_refresh_ms: 1e4,
|
|
501
|
+
interaction_sample_delay_ms: 250,
|
|
502
|
+
local_breadcrumb_refresh_ms: 1e3,
|
|
503
|
+
flicker_direction_flip_window_ms: 6e3,
|
|
504
|
+
flicker_warmup_window_ms: 3e4,
|
|
505
|
+
upnl_double_count_min_cents: 50,
|
|
506
|
+
upnl_double_count_tolerance_cents: 5,
|
|
507
|
+
upnl_source_gap_min_cents: 50,
|
|
508
|
+
nonzero_upnl_jump_min_cents: 25,
|
|
509
|
+
nonzero_upnl_jump_min_relative_percent: 50,
|
|
510
|
+
nonzero_upnl_jump_min_margin_percent: 2,
|
|
511
|
+
cross_source_upnl_flicker_max_age_ms: 1e3,
|
|
512
|
+
cross_source_upnl_flicker_min_cents: 5,
|
|
513
|
+
restart_trace_manual_stop_window_minutes: 15,
|
|
514
|
+
hold_age_rounding_ms: 100,
|
|
515
|
+
account_summary_missing_trace_ms: 5e3
|
|
516
|
+
},
|
|
517
|
+
insights_access: {
|
|
518
|
+
initial_prompt_idea_count: 6,
|
|
519
|
+
section_preview_blocks: 2
|
|
520
|
+
},
|
|
521
|
+
marketing: {
|
|
522
|
+
arena_leaderboard_entries: 3,
|
|
523
|
+
data_revalidate_seconds: 60
|
|
524
|
+
},
|
|
525
|
+
calendar: {
|
|
526
|
+
event_highlight_window_minutes: 60,
|
|
527
|
+
search_save_debounce_ms: 250
|
|
528
|
+
},
|
|
529
|
+
system_page: {
|
|
530
|
+
hyperliquid_manual_refresh_cooldown_ms: 800,
|
|
531
|
+
config_retry_initial_delay_ms: 1e3,
|
|
532
|
+
debug_api_profile_poll_ms: 500,
|
|
533
|
+
debug_save_lines: 120,
|
|
534
|
+
debug_model_sync_lines: 80,
|
|
535
|
+
debug_byok_trace_lines: 160,
|
|
536
|
+
debug_profile_delete_trace_lines: 80,
|
|
537
|
+
debug_local_ai_trace_lines: 120,
|
|
538
|
+
debug_hyperliquid_trace_lines: 120,
|
|
539
|
+
debug_oac_trace_lines: 120,
|
|
540
|
+
debug_oac_applied_state_lines: 40,
|
|
541
|
+
debug_report_trace_lines: 40,
|
|
542
|
+
debug_report_trace_line_chars: 360,
|
|
543
|
+
debug_field_value_chars: 96,
|
|
544
|
+
debug_identity_redact_max_chars: 8,
|
|
545
|
+
debug_identity_edge_chars: 4
|
|
546
|
+
},
|
|
547
|
+
analysis_page: {
|
|
548
|
+
debug_log_lines: 120
|
|
549
|
+
},
|
|
550
|
+
changelog_page: {
|
|
551
|
+
profile_search_debounce_ms: 300,
|
|
552
|
+
search_debounce_ms: 300,
|
|
553
|
+
scope_navigation_filters_max_age_ms: 3e4,
|
|
554
|
+
prompt_diff_context_lines: 3,
|
|
555
|
+
debug_event_lines: 120
|
|
556
|
+
},
|
|
557
|
+
help_page: {
|
|
558
|
+
hash_scroll_settle_ms: 250
|
|
559
|
+
},
|
|
560
|
+
history_page: {
|
|
561
|
+
preferences_save_debounce_ms: 500,
|
|
562
|
+
tracked_ws_prompt_id_count: 500,
|
|
563
|
+
ws_prompt_fingerprint_text_chars: 80,
|
|
564
|
+
load_more_visibility_percent: 10
|
|
565
|
+
},
|
|
566
|
+
leaderboard_page: {
|
|
567
|
+
debug_panel_entries: 80,
|
|
568
|
+
debug_navbar_profile_entries: 12
|
|
569
|
+
},
|
|
570
|
+
login_page: {
|
|
571
|
+
desktop_bridge_poll_ms: 250,
|
|
572
|
+
turnstile_site_key_log_chars: 10
|
|
573
|
+
},
|
|
574
|
+
screener_page: {
|
|
575
|
+
search_save_debounce_ms: 250,
|
|
576
|
+
ws_refresh_debounce_ms: 40,
|
|
577
|
+
stop_client_run_wait_checks: 30,
|
|
578
|
+
stop_client_run_wait_poll_ms: 50,
|
|
579
|
+
assignment_load_more_threshold_px: 48,
|
|
580
|
+
debug_log_lines: 160,
|
|
581
|
+
debug_runtime_events: 30,
|
|
582
|
+
debug_search_transitions: 40,
|
|
583
|
+
debug_expansion_transitions: 80,
|
|
584
|
+
debug_value_chars: 260,
|
|
585
|
+
debug_text_chars: 180,
|
|
586
|
+
debug_array_items: 20,
|
|
587
|
+
debug_event_preview_items: 12,
|
|
588
|
+
debug_snapshot_keys: 25,
|
|
589
|
+
debug_snapshot_rows: 8
|
|
590
|
+
},
|
|
591
|
+
sitemap: {
|
|
592
|
+
leaderboard_page_batch_size: 5,
|
|
593
|
+
leaderboard_max_pages: 160,
|
|
594
|
+
leaderboard_scan_attempts: 3,
|
|
595
|
+
home_priority_percent: 100,
|
|
596
|
+
team_priority_percent: 50,
|
|
597
|
+
contact_priority_percent: 50,
|
|
598
|
+
methodology_priority_percent: 80,
|
|
599
|
+
trust_priority_percent: 70,
|
|
600
|
+
insights_priority_percent: 90,
|
|
601
|
+
referrals_priority_percent: 60,
|
|
602
|
+
start_priority_percent: 80,
|
|
603
|
+
leaderboard_priority_percent: 90,
|
|
604
|
+
updates_priority_percent: 80,
|
|
605
|
+
changelog_priority_percent: 70,
|
|
606
|
+
models_priority_percent: 70,
|
|
607
|
+
calendar_priority_percent: 60,
|
|
608
|
+
help_priority_percent: 70,
|
|
609
|
+
faq_priority_percent: 70,
|
|
610
|
+
download_priority_percent: 70,
|
|
611
|
+
privacy_priority_percent: 30,
|
|
612
|
+
terms_priority_percent: 30,
|
|
613
|
+
update_post_priority_percent: 60,
|
|
614
|
+
profile_trade_priority_percent: 70,
|
|
615
|
+
profile_analytics_priority_percent: 70,
|
|
616
|
+
profile_changelog_priority_percent: 60
|
|
617
|
+
},
|
|
618
|
+
tax_page: {
|
|
619
|
+
display_batch_size: 50,
|
|
620
|
+
load_more_delay_ms: 120,
|
|
621
|
+
load_more_visibility_percent: 10,
|
|
622
|
+
selectable_year_count: 5,
|
|
623
|
+
debug_log_lines: 150
|
|
624
|
+
},
|
|
625
|
+
updates_page: {
|
|
626
|
+
post_edited_label_min_gap_ms: 6e4,
|
|
627
|
+
comment_edited_label_min_gap_ms: 2e3,
|
|
628
|
+
meta_description_chars: 160
|
|
629
|
+
},
|
|
630
|
+
social_previews: {
|
|
631
|
+
subject_max_chars: 96,
|
|
632
|
+
viewport_width: 1600,
|
|
633
|
+
viewport_height: 900,
|
|
634
|
+
chart_painted_min_px: 100,
|
|
635
|
+
chart_paint_poll_ms: 200
|
|
636
|
+
},
|
|
637
|
+
manual_order_retry: {
|
|
638
|
+
max_attempts: 2,
|
|
639
|
+
default_retry_after_milliseconds: 1500,
|
|
640
|
+
retry_after_padding_milliseconds: 200,
|
|
641
|
+
min_delay_milliseconds: 500,
|
|
642
|
+
max_delay_milliseconds: 8e3
|
|
643
|
+
},
|
|
644
|
+
api_client: {
|
|
645
|
+
get_dedupe_ttl_ms: 2e3,
|
|
646
|
+
runtime_statuses_dedupe_ttl_ms: 5e3,
|
|
647
|
+
llm_config_prime_ttl_ms: 1e4,
|
|
648
|
+
leaderboard_dedupe_ttl_ms: 2e3,
|
|
649
|
+
platform_pricing_revalidate_seconds: 300,
|
|
650
|
+
platform_pricing_timeout_ms: 2e3,
|
|
651
|
+
market_data_error_detail_chars: 240,
|
|
652
|
+
market_data_interest_error_detail_chars: 200,
|
|
653
|
+
ai_trade_history_order_id_lookup_concurrency: 4,
|
|
654
|
+
exchange_evidence_rejection_detail_chars: 200
|
|
655
|
+
},
|
|
656
|
+
interaction: {
|
|
657
|
+
debounce_ms: 250,
|
|
658
|
+
command_list_scroll_settle_ms: 60
|
|
659
|
+
},
|
|
660
|
+
model_selection: {
|
|
661
|
+
local_context_cache_ttl_hours: 12,
|
|
662
|
+
pending_local_main_selection_ttl_hours: 12,
|
|
663
|
+
pending_openai_compatible_main_selection_ttl_hours: 12
|
|
66
664
|
}
|
|
67
665
|
},
|
|
68
666
|
ai_dashboard: {
|
|
@@ -104,6 +702,13 @@ var runtime_policy_generated_default = {
|
|
|
104
702
|
72,
|
|
105
703
|
168
|
|
106
704
|
]
|
|
705
|
+
},
|
|
706
|
+
defaults: {
|
|
707
|
+
calendar_settings: {
|
|
708
|
+
pre_buffer_mins: 60,
|
|
709
|
+
post_buffer_mins: 30
|
|
710
|
+
},
|
|
711
|
+
max_chat_turns: 9999
|
|
107
712
|
}
|
|
108
713
|
},
|
|
109
714
|
trading: {
|
|
@@ -115,10 +720,14 @@ var runtime_policy_generated_default = {
|
|
|
115
720
|
network_backoff_max_seconds: 300,
|
|
116
721
|
steal_ack_timeout_ms: 5e3,
|
|
117
722
|
explicit_claim_max_waits: 3,
|
|
118
|
-
local_ai_preflight_timeout_ms: 3e3
|
|
723
|
+
local_ai_preflight_timeout_ms: 3e3,
|
|
724
|
+
wake_debounce_ms: 250,
|
|
725
|
+
claim_settle_poll_ms: 50,
|
|
726
|
+
network_backoff_exponent_max: 16
|
|
119
727
|
},
|
|
120
728
|
observability: {
|
|
121
|
-
deployment_reload_stall_warning_ms: 15e3
|
|
729
|
+
deployment_reload_stall_warning_ms: 15e3,
|
|
730
|
+
prompt_parity_error_detail_max_chars: 500
|
|
122
731
|
},
|
|
123
732
|
protective_actions: {
|
|
124
733
|
adoption_request_timeout_milliseconds: 2e4,
|
|
@@ -126,11 +735,16 @@ var runtime_policy_generated_default = {
|
|
|
126
735
|
attention_refresh_seconds: 60,
|
|
127
736
|
evidence_max_items: 32,
|
|
128
737
|
evidence_shared_read_seconds: 10,
|
|
129
|
-
retry_delay_seconds: 15
|
|
738
|
+
retry_delay_seconds: 15,
|
|
739
|
+
evidence_min_sweep_delay_milliseconds: 1e3,
|
|
740
|
+
device_sweep_max_actions: 8,
|
|
741
|
+
remaining_recheck_milliseconds: 2e3,
|
|
742
|
+
evidence_max_age_seconds: 45
|
|
130
743
|
},
|
|
131
744
|
exchange_mutation: {
|
|
132
745
|
settlement_retry_milliseconds: 1e3,
|
|
133
|
-
settlement_retry_window_seconds: 120
|
|
746
|
+
settlement_retry_window_seconds: 120,
|
|
747
|
+
reconciliation_margin_milliseconds: 250
|
|
134
748
|
},
|
|
135
749
|
protective_plan_set_lock: {
|
|
136
750
|
wait_seconds: 120
|
|
@@ -144,7 +758,8 @@ var runtime_policy_generated_default = {
|
|
|
144
758
|
device_retry_seconds: 60
|
|
145
759
|
},
|
|
146
760
|
panel_reads: {
|
|
147
|
-
device_open_orders_reuse_seconds: 2
|
|
761
|
+
device_open_orders_reuse_seconds: 2,
|
|
762
|
+
all_view_profile_concurrency: 2
|
|
148
763
|
},
|
|
149
764
|
account_stream: {
|
|
150
765
|
fill_forward_interval_ms: 1e3,
|
|
@@ -161,9 +776,56 @@ var runtime_policy_generated_default = {
|
|
|
161
776
|
ai_schedule_pause_unknown_milliseconds: 6e4,
|
|
162
777
|
provider_failure_diagnostics_delay_milliseconds: 2500,
|
|
163
778
|
provider_failure_diagnostics_max_age_milliseconds: 3e4,
|
|
164
|
-
killswitch_timer_floor_milliseconds: 1e3
|
|
779
|
+
killswitch_timer_floor_milliseconds: 1e3,
|
|
780
|
+
cycle_timeout_floor_milliseconds: 1e3,
|
|
781
|
+
decision_settlement_reserve_max_budget_divisor: 2,
|
|
782
|
+
close_fill_sync_max_attempts: 3,
|
|
783
|
+
close_fill_sync_retry_step_milliseconds: 300,
|
|
784
|
+
execution_mode_mismatch_stop_checks: 2,
|
|
785
|
+
request_bounds: {
|
|
786
|
+
min_agent_instruction_retry_after_ms: 25,
|
|
787
|
+
max_fallback_error_length: 500
|
|
788
|
+
},
|
|
789
|
+
pending_protection_recovery: {
|
|
790
|
+
retry_exponent_max: 30
|
|
791
|
+
},
|
|
792
|
+
device_diagnostics: {
|
|
793
|
+
error_cause_max_depth: 4,
|
|
794
|
+
request_path_chars: 200,
|
|
795
|
+
request_method_chars: 12,
|
|
796
|
+
error_kind_chars: 40,
|
|
797
|
+
request_id_chars: 128,
|
|
798
|
+
contract_token_prefix_chars: 12,
|
|
799
|
+
copy_trading_request_id_chars: 80,
|
|
800
|
+
copy_trading_status_chars: 80,
|
|
801
|
+
browser_platform_chars: 40,
|
|
802
|
+
breadcrumbs_max_entries: 40,
|
|
803
|
+
breadcrumb_detail_chars: 280,
|
|
804
|
+
network_debug_max_entries: 80,
|
|
805
|
+
provider_failure_debug_max_entries: 20,
|
|
806
|
+
market_data_failure_debug_max_entries: 20,
|
|
807
|
+
request_string_compact_above_chars: 500,
|
|
808
|
+
prompt_preview_chars: 220,
|
|
809
|
+
provider_failure_snapshot_max_age_seconds: 300,
|
|
810
|
+
local_provider_probe_timeout_ms: 2e3,
|
|
811
|
+
preflight_failure_reason_chars: 200,
|
|
812
|
+
host_error_note_chars: 160,
|
|
813
|
+
tick_failure_note_chars: 300,
|
|
814
|
+
auto_resume_failure_detail_chars: 500,
|
|
815
|
+
vault_migration_error_chars: 200
|
|
816
|
+
},
|
|
817
|
+
request_retry: {
|
|
818
|
+
max_attempts: 3,
|
|
819
|
+
base_delay_milliseconds: 300,
|
|
820
|
+
max_delay_milliseconds: 8e3,
|
|
821
|
+
min_retry_after_milliseconds: 250,
|
|
822
|
+
deadline_attempt_spacing_milliseconds: 250
|
|
823
|
+
}
|
|
165
824
|
},
|
|
166
825
|
server_runtime: {
|
|
826
|
+
exchange_mutation_reconciliation: {
|
|
827
|
+
protective_episode_end_fill_lookback_seconds: 120
|
|
828
|
+
},
|
|
167
829
|
prompt_rescue: {
|
|
168
830
|
request_ttl_seconds: 20,
|
|
169
831
|
snapshot_max_age_seconds: 5,
|
|
@@ -172,7 +834,14 @@ var runtime_policy_generated_default = {
|
|
|
172
834
|
client_claim_retry_delay_milliseconds: 1e3,
|
|
173
835
|
client_failure_report_timeout_milliseconds: 2e3,
|
|
174
836
|
client_presence_heartbeat_interval_milliseconds: 3e4,
|
|
175
|
-
client_presence_http_timeout_milliseconds: 5e3
|
|
837
|
+
client_presence_http_timeout_milliseconds: 5e3,
|
|
838
|
+
client_claim_completion_buffer_milliseconds: 250,
|
|
839
|
+
client_max_concurrent_jobs_max: 32,
|
|
840
|
+
diagnostics_max_elapsed_ms: 12e4,
|
|
841
|
+
diagnostics_max_pending_reads: 1e3,
|
|
842
|
+
diagnostics_max_clock_offset_ms: 864e5,
|
|
843
|
+
failure_max_reported_weight: 1e6,
|
|
844
|
+
failure_max_retry_after_ms: 36e5
|
|
176
845
|
}
|
|
177
846
|
}
|
|
178
847
|
},
|
|
@@ -180,19 +849,45 @@ var runtime_policy_generated_default = {
|
|
|
180
849
|
max_requests_per_read: 64,
|
|
181
850
|
history_start_ms: 16409952e5,
|
|
182
851
|
device_read_deadline_seconds: 180,
|
|
183
|
-
device_recent_window_hours: 24
|
|
852
|
+
device_recent_window_hours: 24,
|
|
853
|
+
order_history_default_limit: 2e3,
|
|
854
|
+
order_history_max_limit: 2e3
|
|
855
|
+
},
|
|
856
|
+
tradability: {
|
|
857
|
+
score_min: 1,
|
|
858
|
+
score_max: 10
|
|
184
859
|
}
|
|
185
860
|
},
|
|
186
861
|
agent_cli: {
|
|
187
862
|
update_check_interval_ms: 144e5,
|
|
188
863
|
update_check_timeout_ms: 5e3,
|
|
189
864
|
stage_timeout_ms: 6e5,
|
|
190
|
-
startup_ready_timeout_ms: 12e4
|
|
865
|
+
startup_ready_timeout_ms: 12e4,
|
|
866
|
+
headless_claim_max_waits: 10,
|
|
867
|
+
headless_stop_request_timeout_ms: 1e4,
|
|
868
|
+
headless_max_resumes_without_a_cycle: 5,
|
|
869
|
+
headless_resume_backoff_ms_steps: [
|
|
870
|
+
1e3,
|
|
871
|
+
5e3,
|
|
872
|
+
15e3,
|
|
873
|
+
3e4,
|
|
874
|
+
6e4
|
|
875
|
+
],
|
|
876
|
+
headless_backup_first_read_retry_ms_steps: [
|
|
877
|
+
1e3,
|
|
878
|
+
5e3
|
|
879
|
+
],
|
|
880
|
+
browser_login_verifier_bytes: 32,
|
|
881
|
+
update_failure_reason_max_chars: 160,
|
|
882
|
+
update_directory_failure_reason_max_chars: 120,
|
|
883
|
+
update_plan_max_attempts: 3,
|
|
884
|
+
supervisor_max_failed_release_starts: 2
|
|
191
885
|
},
|
|
192
886
|
leaderboard: {
|
|
193
887
|
device_portfolio: {
|
|
194
888
|
device_retry_seconds: 300
|
|
195
|
-
}
|
|
889
|
+
},
|
|
890
|
+
max_page_size: 100
|
|
196
891
|
},
|
|
197
892
|
external_inference: {
|
|
198
893
|
service: {
|
|
@@ -210,6 +905,13 @@ var runtime_policy_generated_default = {
|
|
|
210
905
|
update_readiness_timeout_ms: 6e5,
|
|
211
906
|
rollback_confirmation_min_attempts: 100,
|
|
212
907
|
ready_consecutive_observations: 2,
|
|
908
|
+
update_attempts: 3,
|
|
909
|
+
update_retry_interval_ms: 2e3,
|
|
910
|
+
update_failure_reason_max_chars: 160,
|
|
911
|
+
launcher_poll_interval_ms: 100,
|
|
912
|
+
log_tail_default_lines: 100,
|
|
913
|
+
worker_output_line_max_chars: 4096,
|
|
914
|
+
worker_stdout_tail_max_chars: 65536,
|
|
213
915
|
control_lock_wait_attempts: 400,
|
|
214
916
|
control_lock_retry_interval_ms: 250,
|
|
215
917
|
supervisor_manifest_poll_interval_ms: 250,
|
|
@@ -218,6 +920,44 @@ var runtime_policy_generated_default = {
|
|
|
218
920
|
claim_diagnostics: {
|
|
219
921
|
event_loop_sample_interval_ms: 100
|
|
220
922
|
},
|
|
923
|
+
host_core: {
|
|
924
|
+
oauth_request_timeout_ms: 15e3,
|
|
925
|
+
oauth_revocation_timeout_ms: 5e3,
|
|
926
|
+
oauth_login_timeout_ms: 6e5,
|
|
927
|
+
mcp_request_timeout_ms: 15e3,
|
|
928
|
+
mcp_retry_after_max_ms: 864e5,
|
|
929
|
+
credential_command_timeout_ms: 15e3,
|
|
930
|
+
credential_command_termination_timeout_ms: 5e3,
|
|
931
|
+
credential_command_output_max_bytes: 1048576,
|
|
932
|
+
private_file_max_bytes: 16777216,
|
|
933
|
+
private_file_replace_attempts: 40,
|
|
934
|
+
private_file_replace_retry_delay_ms: 25,
|
|
935
|
+
atomic_replacement_read_attempts: 3,
|
|
936
|
+
owned_directory_removal_attempts: 10,
|
|
937
|
+
owned_directory_removal_retry_step_ms: 100,
|
|
938
|
+
identity_command_timeout_ms: 5e3,
|
|
939
|
+
identity_command_output_max_bytes: 4096,
|
|
940
|
+
windows_identity_command_timeout_ms: 15e3,
|
|
941
|
+
windows_process_identity_output_max_bytes: 1024,
|
|
942
|
+
windows_acl_broker_startup_timeout_ms: 9e4,
|
|
943
|
+
windows_acl_broker_request_timeout_ms: 15e3,
|
|
944
|
+
windows_acl_broker_idle_shutdown_ms: 3e4,
|
|
945
|
+
windows_acl_broker_kill_grace_ms: 1e3,
|
|
946
|
+
windows_acl_broker_request_max_bytes: 65536,
|
|
947
|
+
windows_acl_broker_output_max_chars: 65536,
|
|
948
|
+
windows_acl_broker_response_line_max_chars: 4096,
|
|
949
|
+
process_lock_publication_grace_ms: 1e4,
|
|
950
|
+
process_lock_record_max_bytes: 65536,
|
|
951
|
+
process_lock_guard_election_lease_ms: 5e3,
|
|
952
|
+
process_lock_guard_election_stale_ms: 3e4,
|
|
953
|
+
process_lock_guard_election_attempts: 8,
|
|
954
|
+
process_lock_guard_election_backoff_ms: 10,
|
|
955
|
+
process_lock_guard_election_backoff_exponent_max: 4,
|
|
956
|
+
process_lock_identity_cache_ms: 5e3
|
|
957
|
+
},
|
|
958
|
+
agent_control: {
|
|
959
|
+
max_turn_decision_operation_ids: 128
|
|
960
|
+
},
|
|
221
961
|
host_runtime: {
|
|
222
962
|
advertisement_ttl_ms: 12e4,
|
|
223
963
|
advertisement_refresh_lead_ms: 3e4,
|
|
@@ -226,6 +966,9 @@ var runtime_policy_generated_default = {
|
|
|
226
966
|
agent_heartbeat_interval_ms: 3e3,
|
|
227
967
|
agent_heartbeat_max_retry_delay_ms: 9e3,
|
|
228
968
|
provider_rate_limit_refresh_ms: 6e4,
|
|
969
|
+
provider_quota_recovery_max_age_refresh_intervals: 2,
|
|
970
|
+
model_catalog_read_lead_divisor: 2,
|
|
971
|
+
agent_wake_summary_max_chars: 2e3,
|
|
229
972
|
drain_timeout_ms: 3e4,
|
|
230
973
|
remote_retry_limit: 3,
|
|
231
974
|
minimum_sleep_ms: 10,
|
|
@@ -250,10 +993,72 @@ var runtime_policy_generated_default = {
|
|
|
250
993
|
agent_turn_timeout_ms: 6e5,
|
|
251
994
|
codex_rate_limit_metadata_timeout_ms: 5e3,
|
|
252
995
|
codex_login_timeout_ms: 9e5,
|
|
253
|
-
codex_command_timeout_ms: 3e4
|
|
996
|
+
codex_command_timeout_ms: 3e4,
|
|
997
|
+
cli_wait_default_seconds: 50,
|
|
998
|
+
cli_wait_max_seconds: 300,
|
|
999
|
+
cli_log_lines_default: 100,
|
|
1000
|
+
cli_log_lines_max: 1e4,
|
|
1001
|
+
service_control_input_max_chars: 4096,
|
|
1002
|
+
codex_auth_file_max_bytes: 8388608,
|
|
1003
|
+
agent_stdin_max_bytes: 1e6,
|
|
1004
|
+
agent_next_poll_min_ms: 50,
|
|
1005
|
+
agent_assignment_poll_min_ms: 250,
|
|
1006
|
+
agent_assignment_poll_fallback_ms: 1e3,
|
|
1007
|
+
agent_assignment_poll_max_ms: 5e3,
|
|
1008
|
+
codex_recovery_scan_max_entries: 2e4,
|
|
1009
|
+
codex_recovery_scan_max_depth: 12,
|
|
1010
|
+
codex_recovery_thread_file_max_bytes: 33554432,
|
|
1011
|
+
codex_recovery_thread_scan_lines: 128,
|
|
1012
|
+
codex_quiescence_proof_max_age_ms: 3e4,
|
|
1013
|
+
codex_quiescence_proof_clock_skew_ms: 1e3,
|
|
1014
|
+
codex_guardian_start_timeout_ms: 1e4,
|
|
1015
|
+
codex_guardian_termination_timeout_ms: 5e3,
|
|
1016
|
+
codex_guardian_termination_deadline_min_ms: 25,
|
|
1017
|
+
codex_guardian_state_poll_ms: 25,
|
|
1018
|
+
codex_guardian_shutdown_grace_ms: 2e3,
|
|
1019
|
+
codex_guardian_shutdown_grace_min_ms: 25,
|
|
1020
|
+
codex_guardian_receipt_replace_attempts: 40,
|
|
1021
|
+
codex_guardian_receipt_replace_retry_ms: 25,
|
|
1022
|
+
codex_diagnostic_attempt_ids_max: 64,
|
|
1023
|
+
codex_retired_response_ids_max: 256,
|
|
1024
|
+
codex_stderr_classification_tail_chars: 1024,
|
|
1025
|
+
codex_request_timeout_ms: 3e4,
|
|
1026
|
+
codex_interrupt_timeout_ms: 5e3,
|
|
1027
|
+
codex_login_cancel_timeout_ms: 5e3,
|
|
1028
|
+
codex_close_exit_timeout_ms: 5e3,
|
|
1029
|
+
codex_close_terminate_timeout_ms: 1e3,
|
|
1030
|
+
codex_close_kill_timeout_ms: 1e3,
|
|
1031
|
+
codex_process_tree_cleanup_timeout_ms: 5e3,
|
|
1032
|
+
binary_version_probe_timeout_ms: 1e4,
|
|
1033
|
+
binary_version_probe_stdout_max_chars: 1024,
|
|
1034
|
+
codex_version_probe_stderr_max_bytes: 65536,
|
|
1035
|
+
codex_recovery_process_observations: 2,
|
|
1036
|
+
codex_recovery_process_observation_interval_ms: 250,
|
|
1037
|
+
codex_recovery_process_query_stdout_max_chars: 4e6,
|
|
1038
|
+
codex_recovery_process_query_stderr_max_chars: 4096,
|
|
1039
|
+
deepseek_transport_request_max_bytes: 8388608,
|
|
1040
|
+
exo_command_output_max_bytes: 4e6,
|
|
1041
|
+
exo_git_output_max_chars: 2e5,
|
|
1042
|
+
exo_bridge_request_max_bytes: 2e6,
|
|
1043
|
+
exo_bridge_request_timeout_ms: 3e4,
|
|
1044
|
+
exo_provider_retry_after_max_ms: 864e5,
|
|
1045
|
+
grok_preflight_timeout_ms: 3e4,
|
|
1046
|
+
grok_login_timeout_ms: 9e5,
|
|
1047
|
+
grok_command_timeout_ms: 3e4,
|
|
1048
|
+
grok_auth_output_max_bytes: 65536,
|
|
1049
|
+
grok_binary_max_bytes: 536870912,
|
|
1050
|
+
grok_acp_message_max_bytes: 2e6,
|
|
1051
|
+
grok_close_kill_delay_ms: 1500,
|
|
1052
|
+
grok_mcp_request_max_bytes: 3e5,
|
|
1053
|
+
grok_cwd_marker_max_bytes: 32768,
|
|
1054
|
+
grok_session_summary_max_bytes: 1048576,
|
|
1055
|
+
provider_error_body_timeout_ms: 1e3,
|
|
1056
|
+
provider_error_body_max_bytes: 16384,
|
|
1057
|
+
pi_receipt_event_max_chars: 2e6
|
|
254
1058
|
},
|
|
255
1059
|
quota_membership_cooldown_seconds: 300,
|
|
256
|
-
transient_membership_cooldown_seconds: 30
|
|
1060
|
+
transient_membership_cooldown_seconds: 30,
|
|
1061
|
+
runtime_poll_interval_milliseconds: 250
|
|
257
1062
|
},
|
|
258
1063
|
desktop: {
|
|
259
1064
|
runtime_watchdog: {
|
|
@@ -268,6 +1073,19 @@ var runtime_policy_generated_default = {
|
|
|
268
1073
|
resource_scheduler: {
|
|
269
1074
|
client_lock_ttl_milliseconds: 12e4,
|
|
270
1075
|
client_poll_interval_milliseconds: 250
|
|
1076
|
+
},
|
|
1077
|
+
ui_bounds: {
|
|
1078
|
+
screener_min_volume_usd_max: 1e9
|
|
1079
|
+
},
|
|
1080
|
+
runtime: {
|
|
1081
|
+
assignment_page_default_limit: 20,
|
|
1082
|
+
client_candidate_owner_lease_grace_ms: 6e4,
|
|
1083
|
+
client_server_heartbeats_per_owner_lease: 2,
|
|
1084
|
+
client_server_heartbeat_min_ms: 5e3,
|
|
1085
|
+
client_server_heartbeat_max_ms: 3e4
|
|
1086
|
+
},
|
|
1087
|
+
defaults: {
|
|
1088
|
+
adaptive_schedule_enabled: true
|
|
271
1089
|
}
|
|
272
1090
|
},
|
|
273
1091
|
deployment: {
|
|
@@ -389,13 +1207,27 @@ var runtime_policy_generated_default = {
|
|
|
389
1207
|
},
|
|
390
1208
|
market_data: {
|
|
391
1209
|
chart_interest: {
|
|
392
|
-
historical_backfill_candle_limit: 1e3
|
|
1210
|
+
historical_backfill_candle_limit: 1e3,
|
|
1211
|
+
heartbeat_retry_seconds: 15,
|
|
1212
|
+
heartbeat_min_delay_ms: 1e3,
|
|
1213
|
+
catch_up_candle_limit: 300
|
|
393
1214
|
}
|
|
394
1215
|
},
|
|
395
1216
|
auth: {
|
|
396
1217
|
tokens: {
|
|
397
1218
|
email_2fa_code_length: 6,
|
|
398
1219
|
totp_code_length: 6
|
|
1220
|
+
},
|
|
1221
|
+
passwords: {
|
|
1222
|
+
min_length: 12
|
|
1223
|
+
}
|
|
1224
|
+
},
|
|
1225
|
+
android: {
|
|
1226
|
+
app_host: {
|
|
1227
|
+
profiles_refresh_interval_seconds: 60,
|
|
1228
|
+
running_report_interval_seconds: 5,
|
|
1229
|
+
page_identity_retry_seconds: 5,
|
|
1230
|
+
profiles_read_timeout_seconds: 30
|
|
399
1231
|
}
|
|
400
1232
|
},
|
|
401
1233
|
websocket: {
|
|
@@ -410,6 +1242,9 @@ var runtime_policy_generated_default = {
|
|
|
410
1242
|
notifications: {
|
|
411
1243
|
desktop: {
|
|
412
1244
|
heartbeat_seconds: 20
|
|
1245
|
+
},
|
|
1246
|
+
telegram: {
|
|
1247
|
+
connect_link_poll_ms: 3e3
|
|
413
1248
|
}
|
|
414
1249
|
},
|
|
415
1250
|
validation: {
|
|
@@ -424,9 +1259,138 @@ var runtime_policy_generated_default = {
|
|
|
424
1259
|
handle_changes_per_window: 2,
|
|
425
1260
|
handle_change_window_days: 14
|
|
426
1261
|
}
|
|
1262
|
+
},
|
|
1263
|
+
copy_trading: {
|
|
1264
|
+
source_search: {
|
|
1265
|
+
min_query_length: 2
|
|
1266
|
+
},
|
|
1267
|
+
runtime: {
|
|
1268
|
+
client_account_mode_cache_budget_divisor: 2
|
|
1269
|
+
}
|
|
1270
|
+
},
|
|
1271
|
+
billing: {
|
|
1272
|
+
credit_purchase: {
|
|
1273
|
+
amount_usd_steps: [
|
|
1274
|
+
10,
|
|
1275
|
+
25,
|
|
1276
|
+
50,
|
|
1277
|
+
100,
|
|
1278
|
+
500,
|
|
1279
|
+
1e3
|
|
1280
|
+
]
|
|
1281
|
+
}
|
|
1282
|
+
},
|
|
1283
|
+
admin: {
|
|
1284
|
+
page: {
|
|
1285
|
+
credit_grant_amount_usd_steps: [
|
|
1286
|
+
10,
|
|
1287
|
+
25,
|
|
1288
|
+
50,
|
|
1289
|
+
100,
|
|
1290
|
+
500,
|
|
1291
|
+
1e3,
|
|
1292
|
+
5e3,
|
|
1293
|
+
1e4,
|
|
1294
|
+
5e4,
|
|
1295
|
+
1e5
|
|
1296
|
+
],
|
|
1297
|
+
user_lookup_blur_close_delay_ms: 200,
|
|
1298
|
+
selected_user_refresh_delay_ms: 300,
|
|
1299
|
+
handle_preview_count: 3
|
|
1300
|
+
},
|
|
1301
|
+
models: {
|
|
1302
|
+
analytics: {
|
|
1303
|
+
summary_failure_kinds: 3
|
|
1304
|
+
}
|
|
1305
|
+
},
|
|
1306
|
+
user_search: {
|
|
1307
|
+
min_query_length: 2
|
|
1308
|
+
}
|
|
1309
|
+
},
|
|
1310
|
+
profile_setting_changelog: {
|
|
1311
|
+
public_profile_search_limit: 10,
|
|
1312
|
+
page_default_limit: 50
|
|
1313
|
+
},
|
|
1314
|
+
history: {
|
|
1315
|
+
full_history_default_limit: 20,
|
|
1316
|
+
default_page_size: 50,
|
|
1317
|
+
trade_lookup_max_order_ids: 200,
|
|
1318
|
+
decision_batch_default_limit: 50
|
|
1319
|
+
},
|
|
1320
|
+
updates: {
|
|
1321
|
+
posts: {
|
|
1322
|
+
list_default_limit: 20,
|
|
1323
|
+
list_max_limit: 100
|
|
1324
|
+
}
|
|
1325
|
+
},
|
|
1326
|
+
security: {
|
|
1327
|
+
byok: {
|
|
1328
|
+
max_provider_keys_per_provider: 5
|
|
1329
|
+
}
|
|
1330
|
+
},
|
|
1331
|
+
analysis: {
|
|
1332
|
+
live_request_candles: {
|
|
1333
|
+
default_limit: 100
|
|
1334
|
+
}
|
|
1335
|
+
},
|
|
1336
|
+
users: {
|
|
1337
|
+
search: {
|
|
1338
|
+
min_query_length: 2
|
|
1339
|
+
}
|
|
1340
|
+
},
|
|
1341
|
+
referrals: {
|
|
1342
|
+
code_max_length: 24,
|
|
1343
|
+
dashboard_default_limit: 20
|
|
1344
|
+
},
|
|
1345
|
+
insights: {
|
|
1346
|
+
client_host: {
|
|
1347
|
+
device_read_default_result_bytes: 2e5
|
|
1348
|
+
}
|
|
1349
|
+
},
|
|
1350
|
+
agent_tokens: {
|
|
1351
|
+
browser_login_ttl_seconds: 600,
|
|
1352
|
+
browser_login_poll_interval_seconds: 2
|
|
427
1353
|
}
|
|
428
1354
|
};
|
|
429
1355
|
|
|
1356
|
+
// lib/constants.ts
|
|
1357
|
+
var MS_PER_SECOND = 1e3;
|
|
1358
|
+
var SECONDS_PER_MINUTE = 60;
|
|
1359
|
+
var MINUTES_PER_HOUR = 60;
|
|
1360
|
+
var HOURS_PER_DAY = 24;
|
|
1361
|
+
var DAYS_PER_WEEK = 7;
|
|
1362
|
+
var MS_PER_MINUTE = MS_PER_SECOND * SECONDS_PER_MINUTE;
|
|
1363
|
+
var SECONDS_PER_HOUR = SECONDS_PER_MINUTE * MINUTES_PER_HOUR;
|
|
1364
|
+
var SECONDS_PER_DAY = SECONDS_PER_HOUR * HOURS_PER_DAY;
|
|
1365
|
+
var SECONDS_PER_WEEK = SECONDS_PER_DAY * DAYS_PER_WEEK;
|
|
1366
|
+
var MINUTES_PER_DAY = MINUTES_PER_HOUR * HOURS_PER_DAY;
|
|
1367
|
+
var MINUTES_PER_WEEK = MINUTES_PER_DAY * DAYS_PER_WEEK;
|
|
1368
|
+
var MS_PER_HOUR = MS_PER_MINUTE * MINUTES_PER_HOUR;
|
|
1369
|
+
var MS_PER_DAY = MS_PER_HOUR * HOURS_PER_DAY;
|
|
1370
|
+
var READ_STAMP_TIE_MS = MS_PER_SECOND / 1e6;
|
|
1371
|
+
var BACKOFF_GROWTH_FACTOR = 2;
|
|
1372
|
+
var BYTES_PER_KIB = 1024;
|
|
1373
|
+
var BYTES_PER_MIB = BYTES_PER_KIB * BYTES_PER_KIB;
|
|
1374
|
+
var OWNER_ONLY_FILE_MODE = 384;
|
|
1375
|
+
var OWNER_ONLY_DIRECTORY_MODE = 448;
|
|
1376
|
+
var GROUP_OTHER_PERMISSION_BITS = 63;
|
|
1377
|
+
var JSON_INDENT_SPACES = 2;
|
|
1378
|
+
var INT32_MIN = -(2 ** 31);
|
|
1379
|
+
var INT32_MAX = 2 ** 31 - 1;
|
|
1380
|
+
var AI_COST_ESTIMATE_PERIOD_DAYS = 30;
|
|
1381
|
+
var SECONDS_PER_AI_COST_ESTIMATE_PERIOD = SECONDS_PER_DAY * AI_COST_ESTIMATE_PERIOD_DAYS;
|
|
1382
|
+
var INFERENCE_HOST_PROCESS_LOCK_RECORD_SCHEMA_VERSION = 2;
|
|
1383
|
+
var INFERENCE_HOST_RECLAIM_GUARD_CREATE_PASSES = 2;
|
|
1384
|
+
var LINUX_PROC_STAT_COMM_TERMINATOR_CHARS = 2;
|
|
1385
|
+
var INFERENCE_HOST_RANDOM_BYTES = {
|
|
1386
|
+
TEMP_FILE_SUFFIX: 12,
|
|
1387
|
+
LOCK_BALLOT_NAME: 16,
|
|
1388
|
+
LOCK_TOKEN: 24,
|
|
1389
|
+
OAUTH_PKCE_VERIFIER: 48,
|
|
1390
|
+
OAUTH_STATE: 32,
|
|
1391
|
+
OAUTH_CALLBACK_PATH: 16
|
|
1392
|
+
};
|
|
1393
|
+
|
|
430
1394
|
// lib/cli-release/updater.ts
|
|
431
1395
|
import { spawn as spawn2 } from "node:child_process";
|
|
432
1396
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -440,13 +1404,14 @@ import { constants } from "node:fs";
|
|
|
440
1404
|
import { lstat, mkdir, open, readdir, readFile, realpath, rename, rm } from "node:fs/promises";
|
|
441
1405
|
import { homedir } from "node:os";
|
|
442
1406
|
import { basename, dirname, isAbsolute, join, relative, resolve, win32 as windowsPath } from "node:path";
|
|
1407
|
+
var HOST_CORE_POLICY = runtime_policy_generated_default.external_inference.host_core;
|
|
443
1408
|
var InferenceHostProcessLockBusyError = class extends Error {
|
|
444
1409
|
constructor() {
|
|
445
1410
|
super("Another inference host process already owns this local host.");
|
|
446
1411
|
this.name = "InferenceHostProcessLockBusyError";
|
|
447
1412
|
}
|
|
448
1413
|
};
|
|
449
|
-
var MAX_INFERENCE_PRIVATE_FILE_BYTES =
|
|
1414
|
+
var MAX_INFERENCE_PRIVATE_FILE_BYTES = HOST_CORE_POLICY.private_file_max_bytes;
|
|
450
1415
|
var WINDOWS_PRIVATE_ACL_MODES = ["harden", "verify", "verify-owner", "verify-private"];
|
|
451
1416
|
var WINDOWS_PRIVATE_ACL_BROKER_SCRIPT = `$ErrorActionPreference='Stop'
|
|
452
1417
|
$ProgressPreference='SilentlyContinue'
|
|
@@ -454,7 +1419,7 @@ while(($line=[Console]::In.ReadLine()) -ne $null) {
|
|
|
454
1419
|
$requestId=$null
|
|
455
1420
|
$failureStage='request_validation'
|
|
456
1421
|
try {
|
|
457
|
-
if($line.Length -lt 2 -or $line.Length -gt
|
|
1422
|
+
if($line.Length -lt 2 -or $line.Length -gt ${HOST_CORE_POLICY.windows_acl_broker_request_max_bytes}) { throw 'invalid request size' }
|
|
458
1423
|
$request=$line | ConvertFrom-Json
|
|
459
1424
|
$names=@($request.PSObject.Properties.Name | Sort-Object)
|
|
460
1425
|
if(($names -join ',') -ne 'id,kind,mode,path_b64') { throw 'invalid request shape' }
|
|
@@ -530,9 +1495,9 @@ while(($line=[Console]::In.ReadLine()) -ne $null) {
|
|
|
530
1495
|
[Console]::Out.WriteLine((@{id=$requestId;status='error';error_code=$failureStage} | ConvertTo-Json -Compress))
|
|
531
1496
|
}
|
|
532
1497
|
}`;
|
|
533
|
-
var WINDOWS_IDENTITY_COMMAND_TIMEOUT_MS =
|
|
534
|
-
var WINDOWS_PRIVATE_ACL_BROKER_STARTUP_TIMEOUT_MS =
|
|
535
|
-
var SMALL_IDENTITY_COMMAND_TIMEOUT_MS =
|
|
1498
|
+
var WINDOWS_IDENTITY_COMMAND_TIMEOUT_MS = HOST_CORE_POLICY.windows_identity_command_timeout_ms;
|
|
1499
|
+
var WINDOWS_PRIVATE_ACL_BROKER_STARTUP_TIMEOUT_MS = HOST_CORE_POLICY.windows_acl_broker_startup_timeout_ms;
|
|
1500
|
+
var SMALL_IDENTITY_COMMAND_TIMEOUT_MS = HOST_CORE_POLICY.identity_command_timeout_ms;
|
|
536
1501
|
var windowsPowerShellEnvironment = (extra = {}) => {
|
|
537
1502
|
const sanitizedExtra = { ...extra };
|
|
538
1503
|
delete sanitizedExtra.PSModulePath;
|
|
@@ -575,9 +1540,9 @@ var WindowsPrivateAclBroker = class {
|
|
|
575
1540
|
this.queue = operation.then(() => void 0, () => void 0);
|
|
576
1541
|
await operation;
|
|
577
1542
|
};
|
|
578
|
-
this.requestTimeoutMs = dependencies.requestTimeoutMs ??
|
|
1543
|
+
this.requestTimeoutMs = dependencies.requestTimeoutMs ?? HOST_CORE_POLICY.windows_acl_broker_request_timeout_ms;
|
|
579
1544
|
this.startupRequestTimeoutMs = dependencies.startupRequestTimeoutMs ?? WINDOWS_PRIVATE_ACL_BROKER_STARTUP_TIMEOUT_MS;
|
|
580
|
-
this.idleShutdownMs = dependencies.idleShutdownMs ??
|
|
1545
|
+
this.idleShutdownMs = dependencies.idleShutdownMs ?? HOST_CORE_POLICY.windows_acl_broker_idle_shutdown_ms;
|
|
581
1546
|
this.spawnProcess = dependencies.spawnProcess ?? (() => {
|
|
582
1547
|
const invocation = windowsPrivateAclBrokerInvocation();
|
|
583
1548
|
return spawn("powershell.exe", [...invocation.args], {
|
|
@@ -596,7 +1561,7 @@ var WindowsPrivateAclBroker = class {
|
|
|
596
1561
|
this.child = null;
|
|
597
1562
|
this.outputBuffer = "";
|
|
598
1563
|
child.stdin.end();
|
|
599
|
-
const force = setTimeout(() => child.kill("SIGKILL"),
|
|
1564
|
+
const force = setTimeout(() => child.kill("SIGKILL"), HOST_CORE_POLICY.windows_acl_broker_kill_grace_ms);
|
|
600
1565
|
force.unref();
|
|
601
1566
|
child.once("exit", () => clearTimeout(force));
|
|
602
1567
|
}, this.idleShutdownMs);
|
|
@@ -620,7 +1585,7 @@ var WindowsPrivateAclBroker = class {
|
|
|
620
1585
|
}
|
|
621
1586
|
acceptLine(child, line) {
|
|
622
1587
|
const pending = this.pending;
|
|
623
|
-
if (!pending || !line || line.length >
|
|
1588
|
+
if (!pending || !line || line.length > HOST_CORE_POLICY.windows_acl_broker_response_line_max_chars) {
|
|
624
1589
|
this.failChild(child, new Error("Windows private ACL broker returned malformed output."));
|
|
625
1590
|
return;
|
|
626
1591
|
}
|
|
@@ -671,7 +1636,7 @@ var WindowsPrivateAclBroker = class {
|
|
|
671
1636
|
child.stdout.on("data", (chunk) => {
|
|
672
1637
|
if (this.child !== child) return;
|
|
673
1638
|
this.outputBuffer += chunk;
|
|
674
|
-
if (this.outputBuffer.length >
|
|
1639
|
+
if (this.outputBuffer.length > HOST_CORE_POLICY.windows_acl_broker_output_max_chars) {
|
|
675
1640
|
this.failChild(child, new Error("Windows private ACL broker exceeded its output limit."));
|
|
676
1641
|
return;
|
|
677
1642
|
}
|
|
@@ -709,7 +1674,7 @@ var WindowsPrivateAclBroker = class {
|
|
|
709
1674
|
path_b64: Buffer.from(path, "utf8").toString("base64")
|
|
710
1675
|
})}
|
|
711
1676
|
`;
|
|
712
|
-
if (Buffer.byteLength(request, "utf8") >
|
|
1677
|
+
if (Buffer.byteLength(request, "utf8") > HOST_CORE_POLICY.windows_acl_broker_request_max_bytes) {
|
|
713
1678
|
throw new Error("Windows private ACL broker request exceeds its input limit.");
|
|
714
1679
|
}
|
|
715
1680
|
const { child, startedNow } = this.ensureChild();
|
|
@@ -814,7 +1779,7 @@ var linuxProcessIdentity = async (pid) => {
|
|
|
814
1779
|
readFile("/proc/sys/kernel/random/boot_id", "utf8"),
|
|
815
1780
|
readFile(`/proc/${pid}/stat`, "utf8")
|
|
816
1781
|
]);
|
|
817
|
-
const fields = statLine.slice(statLine.lastIndexOf(")") +
|
|
1782
|
+
const fields = statLine.slice(statLine.lastIndexOf(")") + LINUX_PROC_STAT_COMM_TERMINATOR_CHARS).trim().split(/\s+/u);
|
|
818
1783
|
const startTicks = fields[19];
|
|
819
1784
|
return startTicks ? `linux:${bootId.trim()}:${startTicks}` : null;
|
|
820
1785
|
} catch {
|
|
@@ -869,7 +1834,7 @@ var windowsProcessIdentity = async (pid) => await new Promise((resolvePromise) =
|
|
|
869
1834
|
settle(null);
|
|
870
1835
|
}, invocation.timeoutMs);
|
|
871
1836
|
child.stdout.on("data", (chunk) => {
|
|
872
|
-
if (output.reduce((total, item) => total + item.byteLength, 0) + Buffer.byteLength(chunk) >
|
|
1837
|
+
if (output.reduce((total, item) => total + item.byteLength, 0) + Buffer.byteLength(chunk) > HOST_CORE_POLICY.windows_process_identity_output_max_bytes) {
|
|
873
1838
|
child.kill("SIGKILL");
|
|
874
1839
|
settle(null);
|
|
875
1840
|
return;
|
|
@@ -897,12 +1862,12 @@ var darwinProcessIdentity = async (pid) => await new Promise((resolvePromise) =>
|
|
|
897
1862
|
const timer = setTimeout(() => {
|
|
898
1863
|
child.kill("SIGKILL");
|
|
899
1864
|
settle(null);
|
|
900
|
-
},
|
|
1865
|
+
}, SMALL_IDENTITY_COMMAND_TIMEOUT_MS);
|
|
901
1866
|
child.stdout.on("data", (chunk) => output.push(Buffer.from(chunk)));
|
|
902
1867
|
child.once("error", () => settle(null));
|
|
903
1868
|
child.once("exit", (code) => {
|
|
904
1869
|
const started = Date.parse(Buffer.concat(output).toString("utf8").trim());
|
|
905
|
-
settle(code === 0 && Number.isFinite(started) ? `darwin:${Math.floor(started /
|
|
1870
|
+
settle(code === 0 && Number.isFinite(started) ? `darwin:${Math.floor(started / MS_PER_SECOND)}` : null);
|
|
906
1871
|
});
|
|
907
1872
|
});
|
|
908
1873
|
var runSmallIdentityCommand = async (command, args, env, timeoutMs = SMALL_IDENTITY_COMMAND_TIMEOUT_MS) => await new Promise((resolvePromise) => {
|
|
@@ -926,7 +1891,7 @@ var runSmallIdentityCommand = async (command, args, env, timeoutMs = SMALL_IDENT
|
|
|
926
1891
|
}, timeoutMs);
|
|
927
1892
|
child.stdout.on("data", (chunk) => {
|
|
928
1893
|
bytes += Buffer.byteLength(chunk);
|
|
929
|
-
if (bytes >
|
|
1894
|
+
if (bytes > HOST_CORE_POLICY.identity_command_output_max_bytes) {
|
|
930
1895
|
child.kill("SIGKILL");
|
|
931
1896
|
settle(null);
|
|
932
1897
|
return;
|
|
@@ -1013,7 +1978,7 @@ async function ensureInferencePrivateDirectory(path, dependencies = {}) {
|
|
|
1013
1978
|
}
|
|
1014
1979
|
} catch (error) {
|
|
1015
1980
|
if (error.code !== "ENOENT") throw error;
|
|
1016
|
-
await mkdir(path, { recursive: true, mode:
|
|
1981
|
+
await mkdir(path, { recursive: true, mode: OWNER_ONLY_DIRECTORY_MODE });
|
|
1017
1982
|
created = true;
|
|
1018
1983
|
}
|
|
1019
1984
|
const after = await lstat(path);
|
|
@@ -1034,7 +1999,7 @@ async function ensureInferencePrivateDirectory(path, dependencies = {}) {
|
|
|
1034
1999
|
}
|
|
1035
2000
|
return;
|
|
1036
2001
|
}
|
|
1037
|
-
if ((after.mode &
|
|
2002
|
+
if ((after.mode & GROUP_OTHER_PERMISSION_BITS) !== 0) {
|
|
1038
2003
|
throw new Error("Inference host state directory must have mode 0700.");
|
|
1039
2004
|
}
|
|
1040
2005
|
if (typeof process.getuid === "function" && after.uid !== process.getuid()) {
|
|
@@ -1065,8 +2030,8 @@ async function replaceAtomicInferencePrivateFile(temporaryPath, destinationPath,
|
|
|
1065
2030
|
const platform = options.platform ?? process.platform;
|
|
1066
2031
|
const renameFile = options.renameFile ?? rename;
|
|
1067
2032
|
const sleep = options.sleep ?? ((milliseconds) => new Promise((resolve5) => setTimeout(resolve5, milliseconds)));
|
|
1068
|
-
const maxAttempts = Math.max(1, options.maxAttempts ??
|
|
1069
|
-
const retryDelayMs = Math.max(0, options.retryDelayMs ??
|
|
2033
|
+
const maxAttempts = Math.max(1, options.maxAttempts ?? HOST_CORE_POLICY.private_file_replace_attempts);
|
|
2034
|
+
const retryDelayMs = Math.max(0, options.retryDelayMs ?? HOST_CORE_POLICY.private_file_replace_retry_delay_ms);
|
|
1070
2035
|
for (let attempt = 0; attempt < maxAttempts; attempt += 1) {
|
|
1071
2036
|
try {
|
|
1072
2037
|
await renameFile(temporaryPath, destinationPath);
|
|
@@ -1092,12 +2057,12 @@ async function writeAtomicInferencePrivateFile(path, contents, dependencies = {}
|
|
|
1092
2057
|
}
|
|
1093
2058
|
const temporary = join(
|
|
1094
2059
|
directory,
|
|
1095
|
-
`.${process.pid}.${randomBytes(
|
|
2060
|
+
`.${process.pid}.${randomBytes(INFERENCE_HOST_RANDOM_BYTES.TEMP_FILE_SUFFIX).toString("hex")}.tmp`
|
|
1096
2061
|
);
|
|
1097
2062
|
const handle = await open(
|
|
1098
2063
|
temporary,
|
|
1099
2064
|
constants.O_CREAT | constants.O_EXCL | constants.O_WRONLY | constants.O_NOFOLLOW,
|
|
1100
|
-
|
|
2065
|
+
OWNER_ONLY_FILE_MODE
|
|
1101
2066
|
);
|
|
1102
2067
|
try {
|
|
1103
2068
|
await handle.writeFile(contents, "utf8");
|
|
@@ -1146,12 +2111,12 @@ async function writeAtomicInferencePrivateFile(path, contents, dependencies = {}
|
|
|
1146
2111
|
throw error;
|
|
1147
2112
|
}
|
|
1148
2113
|
}
|
|
1149
|
-
var PROCESS_LOCK_PUBLICATION_GRACE_MS =
|
|
1150
|
-
var PROCESS_LOCK_MAX_RECORD_BYTES =
|
|
1151
|
-
var PROCESS_LOCK_GUARD_ELECTION_LEASE_MS =
|
|
1152
|
-
var PROCESS_LOCK_GUARD_ELECTION_STALE_MS =
|
|
1153
|
-
var PROCESS_LOCK_GUARD_ELECTION_ATTEMPTS =
|
|
1154
|
-
var PROCESS_LOCK_GUARD_ELECTION_BACKOFF_MS =
|
|
2114
|
+
var PROCESS_LOCK_PUBLICATION_GRACE_MS = HOST_CORE_POLICY.process_lock_publication_grace_ms;
|
|
2115
|
+
var PROCESS_LOCK_MAX_RECORD_BYTES = HOST_CORE_POLICY.process_lock_record_max_bytes;
|
|
2116
|
+
var PROCESS_LOCK_GUARD_ELECTION_LEASE_MS = HOST_CORE_POLICY.process_lock_guard_election_lease_ms;
|
|
2117
|
+
var PROCESS_LOCK_GUARD_ELECTION_STALE_MS = HOST_CORE_POLICY.process_lock_guard_election_stale_ms;
|
|
2118
|
+
var PROCESS_LOCK_GUARD_ELECTION_ATTEMPTS = HOST_CORE_POLICY.process_lock_guard_election_attempts;
|
|
2119
|
+
var PROCESS_LOCK_GUARD_ELECTION_BACKOFF_MS = HOST_CORE_POLICY.process_lock_guard_election_backoff_ms;
|
|
1155
2120
|
var PROCESS_LOCK_LABEL = "Inference host process lock";
|
|
1156
2121
|
var PROCESS_LOCK_GUARD_LABEL = "Inference host process lock reclamation guard";
|
|
1157
2122
|
var sameProcessLockFile = (left, right) => left.dev === right.dev && left.ino === right.ino && left.size === right.size && left.mtimeMs === right.mtimeMs && left.ctimeMs === right.ctimeMs;
|
|
@@ -1160,7 +2125,7 @@ var openExclusiveProcessLockFile = async (path) => {
|
|
|
1160
2125
|
return await open(
|
|
1161
2126
|
path,
|
|
1162
2127
|
constants.O_CREAT | constants.O_EXCL | constants.O_WRONLY | constants.O_NOFOLLOW,
|
|
1163
|
-
|
|
2128
|
+
OWNER_ONLY_FILE_MODE
|
|
1164
2129
|
);
|
|
1165
2130
|
} catch (error) {
|
|
1166
2131
|
if (error.code === "EEXIST") return null;
|
|
@@ -1175,7 +2140,7 @@ var inspectProcessLockFile = async (path, label, probes) => {
|
|
|
1175
2140
|
if (error.code === "ENOENT") return { state: "missing" };
|
|
1176
2141
|
throw error;
|
|
1177
2142
|
}
|
|
1178
|
-
if (before.isSymbolicLink() || !before.isFile() || process.platform !== "win32" && (before.mode &
|
|
2143
|
+
if (before.isSymbolicLink() || !before.isFile() || process.platform !== "win32" && (before.mode & GROUP_OTHER_PERMISSION_BITS) !== 0 || typeof process.getuid === "function" && before.uid !== process.getuid()) {
|
|
1179
2144
|
throw new Error(`${label} is unsafe.`);
|
|
1180
2145
|
}
|
|
1181
2146
|
let handle;
|
|
@@ -1202,7 +2167,7 @@ var inspectProcessLockFile = async (path, label, probes) => {
|
|
|
1202
2167
|
} catch {
|
|
1203
2168
|
record = null;
|
|
1204
2169
|
}
|
|
1205
|
-
if (!record || record.schema_version !==
|
|
2170
|
+
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) {
|
|
1206
2171
|
if (Date.now() - stat.mtimeMs < PROCESS_LOCK_PUBLICATION_GRACE_MS) return { state: "busy" };
|
|
1207
2172
|
stale = true;
|
|
1208
2173
|
return { state: "stale", handle, stat };
|
|
@@ -1212,7 +2177,7 @@ var inspectProcessLockFile = async (path, label, probes) => {
|
|
|
1212
2177
|
const cacheKey = resolve(path);
|
|
1213
2178
|
if (await probes.currentBootIdentity() === record.boot_identity && probes.isProcessAlive(ownerPid)) {
|
|
1214
2179
|
const cached = processLockObservationCache.get(cacheKey);
|
|
1215
|
-
const observedIdentity = cached && cached.dev === stat.dev && cached.ino === stat.ino && cached.pid === ownerPid && cached.storedIdentity === storedIdentity && Date.now() - cached.observedAtMs <
|
|
2180
|
+
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);
|
|
1216
2181
|
if (!observedIdentity) {
|
|
1217
2182
|
throw new Error("Inference host could not verify the existing lock owner identity.");
|
|
1218
2183
|
}
|
|
@@ -1269,7 +2234,7 @@ var removeStaleProcessLockReclaimGuard = async (lockPath, guardPath, inspection)
|
|
|
1269
2234
|
if (attempt > 0) {
|
|
1270
2235
|
await new Promise((resolvePromise) => setTimeout(
|
|
1271
2236
|
resolvePromise,
|
|
1272
|
-
Math.floor(Math.random() * PROCESS_LOCK_GUARD_ELECTION_BACKOFF_MS *
|
|
2237
|
+
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))
|
|
1273
2238
|
));
|
|
1274
2239
|
let current;
|
|
1275
2240
|
try {
|
|
@@ -1280,7 +2245,7 @@ var removeStaleProcessLockReclaimGuard = async (lockPath, guardPath, inspection)
|
|
|
1280
2245
|
}
|
|
1281
2246
|
if (!sameProcessLockFile(current, inspection.stat)) return;
|
|
1282
2247
|
}
|
|
1283
|
-
const ballotName = `${prefix}${randomBytes(
|
|
2248
|
+
const ballotName = `${prefix}${randomBytes(INFERENCE_HOST_RANDOM_BYTES.LOCK_BALLOT_NAME).toString("hex")}`;
|
|
1284
2249
|
const ballotPath = join(directory, ballotName);
|
|
1285
2250
|
const ballot = await openExclusiveProcessLockFile(ballotPath);
|
|
1286
2251
|
if (!ballot) continue;
|
|
@@ -1322,8 +2287,8 @@ var removeStaleProcessLockReclaimGuard = async (lockPath, guardPath, inspection)
|
|
|
1322
2287
|
};
|
|
1323
2288
|
var acquireProcessLockReclaimGuard = async (lockPath, ownerRecord, probes) => {
|
|
1324
2289
|
const guardPath = `${lockPath}.reclaim`;
|
|
1325
|
-
const guardToken = randomBytes(
|
|
1326
|
-
for (let attempt = 0; attempt <
|
|
2290
|
+
const guardToken = randomBytes(INFERENCE_HOST_RANDOM_BYTES.LOCK_TOKEN).toString("base64url");
|
|
2291
|
+
for (let attempt = 0; attempt < INFERENCE_HOST_RECLAIM_GUARD_CREATE_PASSES; attempt += 1) {
|
|
1327
2292
|
const handle = await openExclusiveProcessLockFile(guardPath);
|
|
1328
2293
|
if (handle) {
|
|
1329
2294
|
try {
|
|
@@ -1385,7 +2350,7 @@ var acquireProcessLockReclaimGuard = async (lockPath, ownerRecord, probes) => {
|
|
|
1385
2350
|
async function acquireInferenceHostProcessLock(path, dependencies = {}) {
|
|
1386
2351
|
const directory = dirname(path);
|
|
1387
2352
|
await ensureInferencePrivateDirectory(directory);
|
|
1388
|
-
const ownerToken = randomBytes(
|
|
2353
|
+
const ownerToken = randomBytes(INFERENCE_HOST_RANDOM_BYTES.LOCK_TOKEN).toString("base64url");
|
|
1389
2354
|
const probes = {
|
|
1390
2355
|
currentBootIdentity: dependencies.currentBootIdentity ?? (() => readInferenceSystemBootIdentity()),
|
|
1391
2356
|
observeIdentity: dependencies.processIdentity ?? defaultProcessIdentity,
|
|
@@ -1404,7 +2369,7 @@ async function acquireInferenceHostProcessLock(path, dependencies = {}) {
|
|
|
1404
2369
|
probes.currentBootIdentity()
|
|
1405
2370
|
]);
|
|
1406
2371
|
const ownerRecord = (token) => `${JSON.stringify({
|
|
1407
|
-
schema_version:
|
|
2372
|
+
schema_version: INFERENCE_HOST_PROCESS_LOCK_RECORD_SCHEMA_VERSION,
|
|
1408
2373
|
pid: process.pid,
|
|
1409
2374
|
owner_token: token,
|
|
1410
2375
|
process_identity: ownerIdentity,
|
|
@@ -1619,8 +2584,8 @@ var ensureUpdaterPrivateDirectory = async (path, root, dependencies = {}) => {
|
|
|
1619
2584
|
}
|
|
1620
2585
|
if (resolve2(path) === resolve2(root) || isPathWithin(root, path)) {
|
|
1621
2586
|
const existing = await lstat2(path).catch(() => null);
|
|
1622
|
-
if (existing && existing.isDirectory() && !existing.isSymbolicLink() && (existing.mode &
|
|
1623
|
-
await chmod(path,
|
|
2587
|
+
if (existing && existing.isDirectory() && !existing.isSymbolicLink() && (existing.mode & GROUP_OTHER_PERMISSION_BITS) !== 0 && (typeof process.getuid !== "function" || existing.uid === process.getuid())) {
|
|
2588
|
+
await chmod(path, OWNER_ONLY_DIRECTORY_MODE);
|
|
1624
2589
|
}
|
|
1625
2590
|
}
|
|
1626
2591
|
await ensureInferencePrivateDirectory(path, { ...dependencies, defaultRoot: root });
|
|
@@ -1749,7 +2714,7 @@ var writeCliReleaseRejection = async (path, rejection, privateRoot) => {
|
|
|
1749
2714
|
if (privateRoot) await ensureUpdaterPrivateDirectory(privateRoot, privateRoot);
|
|
1750
2715
|
await writeAtomicInferencePrivateFile(
|
|
1751
2716
|
path,
|
|
1752
|
-
`${JSON.stringify(rejection, null,
|
|
2717
|
+
`${JSON.stringify(rejection, null, JSON_INDENT_SPACES)}
|
|
1753
2718
|
`,
|
|
1754
2719
|
privateRoot ? { defaultRoot: privateRoot } : {}
|
|
1755
2720
|
);
|
|
@@ -1797,8 +2762,8 @@ var readLauncherState = async (manifest) => {
|
|
|
1797
2762
|
};
|
|
1798
2763
|
|
|
1799
2764
|
// lib/inference-host/service-bootstrap.ts
|
|
1800
|
-
var UPDATE_ATTEMPTS =
|
|
1801
|
-
var UPDATE_RETRY_MS =
|
|
2765
|
+
var UPDATE_ATTEMPTS = runtime_policy_generated_default.external_inference.service.update_attempts;
|
|
2766
|
+
var UPDATE_RETRY_MS = runtime_policy_generated_default.external_inference.service.update_retry_interval_ms;
|
|
1802
2767
|
var CANDIDATE_READINESS_TIMEOUT_MS = runtime_policy_generated_default.external_inference.service.bootstrap_readiness_timeout_ms;
|
|
1803
2768
|
var SERVICE_DRAIN_COMMAND = "vtx-inference-host-service-drain-v1";
|
|
1804
2769
|
var SERVICE_QUIESCE_COMMAND = "vtx-inference-host-service-quiesce-v1";
|
|
@@ -1902,12 +2867,12 @@ var defaultRunSupervisor = (executable, args) => {
|
|
|
1902
2867
|
};
|
|
1903
2868
|
};
|
|
1904
2869
|
var appendBootstrapLog = async (path, event, fields = {}) => {
|
|
1905
|
-
await mkdir3(dirname4(path), { recursive: true, mode:
|
|
2870
|
+
await mkdir3(dirname4(path), { recursive: true, mode: OWNER_ONLY_DIRECTORY_MODE });
|
|
1906
2871
|
await appendFile2(
|
|
1907
2872
|
path,
|
|
1908
2873
|
`${JSON.stringify({ at: (/* @__PURE__ */ new Date()).toISOString(), event, ...fields })}
|
|
1909
2874
|
`,
|
|
1910
|
-
{ encoding: "utf8", mode:
|
|
2875
|
+
{ encoding: "utf8", mode: OWNER_ONLY_FILE_MODE }
|
|
1911
2876
|
);
|
|
1912
2877
|
};
|
|
1913
2878
|
var fetchLatestRelease = async (fetchImpl, signal) => await fetchLatestCliRelease(fetchImpl, {
|
|
@@ -1917,7 +2882,7 @@ var fetchLatestRelease = async (fetchImpl, signal) => await fetchLatestCliReleas
|
|
|
1917
2882
|
var atomicWriteSelection = async (manifestPath, selection) => {
|
|
1918
2883
|
await writeAtomicInferencePrivateFile(
|
|
1919
2884
|
selectionPathFor(manifestPath),
|
|
1920
|
-
`${JSON.stringify(selection, null,
|
|
2885
|
+
`${JSON.stringify(selection, null, JSON_INDENT_SPACES)}
|
|
1921
2886
|
`
|
|
1922
2887
|
);
|
|
1923
2888
|
};
|
|
@@ -1994,7 +2959,7 @@ var waitForCandidateReadiness = async (manifestPath, candidate, signal, timeoutM
|
|
|
1994
2959
|
}
|
|
1995
2960
|
} catch {
|
|
1996
2961
|
}
|
|
1997
|
-
await waitForUpdateCheck(
|
|
2962
|
+
await waitForUpdateCheck(runtime_policy_generated_default.external_inference.service.startup_poll_interval_ms, signal);
|
|
1998
2963
|
}
|
|
1999
2964
|
return signal.aborted ? "aborted" : "timeout";
|
|
2000
2965
|
};
|
|
@@ -2092,7 +3057,7 @@ var runInferenceHostServiceBootstrap = async (manifestPathValue, dependencies =
|
|
|
2092
3057
|
return await updateSelection(manifestPath, manifest, updateDependencies);
|
|
2093
3058
|
} catch (error) {
|
|
2094
3059
|
await appendBootstrapLog(manifest.log_path, "service_update_deferred", {
|
|
2095
|
-
reason: error instanceof Error ? error.message.slice(0,
|
|
3060
|
+
reason: error instanceof Error ? error.message.slice(0, runtime_policy_generated_default.external_inference.service.update_failure_reason_max_chars) : "unknown"
|
|
2096
3061
|
});
|
|
2097
3062
|
return { active, candidate: null };
|
|
2098
3063
|
}
|