jcc_hyper_tool 0.1.5 → 0.1.6

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.
Files changed (135) hide show
  1. package/README.md +124 -17
  2. package/dist/advisor/actionRunner.d.ts +6 -0
  3. package/dist/advisor/actionRunner.d.ts.map +1 -1
  4. package/dist/advisor/actionRunner.js +38 -7
  5. package/dist/advisor/actionRunner.js.map +1 -1
  6. package/dist/advisor/actionSchema.d.ts +1209 -75
  7. package/dist/advisor/actionSchema.d.ts.map +1 -1
  8. package/dist/advisor/actionSchema.js +117 -5
  9. package/dist/advisor/actionSchema.js.map +1 -1
  10. package/dist/advisor/adviseDisplay.d.ts +26 -0
  11. package/dist/advisor/adviseDisplay.d.ts.map +1 -0
  12. package/dist/advisor/adviseDisplay.js +174 -0
  13. package/dist/advisor/adviseDisplay.js.map +1 -0
  14. package/dist/advisor/adviseEngine.d.ts +12 -2
  15. package/dist/advisor/adviseEngine.d.ts.map +1 -1
  16. package/dist/advisor/adviseEngine.js +88 -7
  17. package/dist/advisor/adviseEngine.js.map +1 -1
  18. package/dist/advisor/ambushPolicy.d.ts +47 -0
  19. package/dist/advisor/ambushPolicy.d.ts.map +1 -0
  20. package/dist/advisor/ambushPolicy.js +161 -0
  21. package/dist/advisor/ambushPolicy.js.map +1 -0
  22. package/dist/advisor/contextBuilder.d.ts +17 -0
  23. package/dist/advisor/contextBuilder.d.ts.map +1 -1
  24. package/dist/advisor/contextBuilder.js +25 -6
  25. package/dist/advisor/contextBuilder.js.map +1 -1
  26. package/dist/advisor/executionPolicy.d.ts +92 -0
  27. package/dist/advisor/executionPolicy.d.ts.map +1 -0
  28. package/dist/advisor/executionPolicy.js +273 -0
  29. package/dist/advisor/executionPolicy.js.map +1 -0
  30. package/dist/advisor/guards.d.ts +14 -0
  31. package/dist/advisor/guards.d.ts.map +1 -1
  32. package/dist/advisor/guards.js +143 -16
  33. package/dist/advisor/guards.js.map +1 -1
  34. package/dist/advisor/indicatorCompute.d.ts +45 -0
  35. package/dist/advisor/indicatorCompute.d.ts.map +1 -0
  36. package/dist/advisor/indicatorCompute.js +259 -0
  37. package/dist/advisor/indicatorCompute.js.map +1 -0
  38. package/dist/advisor/positionPlan.d.ts +33 -0
  39. package/dist/advisor/positionPlan.d.ts.map +1 -0
  40. package/dist/advisor/positionPlan.js +118 -0
  41. package/dist/advisor/positionPlan.js.map +1 -0
  42. package/dist/advisor/promptTemplate.d.ts +8 -2
  43. package/dist/advisor/promptTemplate.d.ts.map +1 -1
  44. package/dist/advisor/promptTemplate.js +175 -23
  45. package/dist/advisor/promptTemplate.js.map +1 -1
  46. package/dist/advisor/touchProbability.d.ts +54 -0
  47. package/dist/advisor/touchProbability.d.ts.map +1 -0
  48. package/dist/advisor/touchProbability.js +215 -0
  49. package/dist/advisor/touchProbability.js.map +1 -0
  50. package/dist/advisor/tpslPolicy.d.ts +22 -0
  51. package/dist/advisor/tpslPolicy.d.ts.map +1 -0
  52. package/dist/advisor/tpslPolicy.js +120 -0
  53. package/dist/advisor/tpslPolicy.js.map +1 -0
  54. package/dist/cli/advisorCli.d.ts.map +1 -1
  55. package/dist/cli/advisorCli.js +478 -126
  56. package/dist/cli/advisorCli.js.map +1 -1
  57. package/dist/cli/index.js +2 -0
  58. package/dist/cli/index.js.map +1 -1
  59. package/dist/cli/riskCli.d.ts +3 -0
  60. package/dist/cli/riskCli.d.ts.map +1 -0
  61. package/dist/cli/riskCli.js +120 -0
  62. package/dist/cli/riskCli.js.map +1 -0
  63. package/dist/cli/strategyCli.d.ts.map +1 -1
  64. package/dist/cli/strategyCli.js +3 -1
  65. package/dist/cli/strategyCli.js.map +1 -1
  66. package/dist/cli/tradingCli.d.ts.map +1 -1
  67. package/dist/cli/tradingCli.js +31 -1
  68. package/dist/cli/tradingCli.js.map +1 -1
  69. package/dist/core/hyperliquid/asset.d.ts +2 -0
  70. package/dist/core/hyperliquid/asset.d.ts.map +1 -1
  71. package/dist/core/hyperliquid/asset.js +25 -0
  72. package/dist/core/hyperliquid/asset.js.map +1 -1
  73. package/dist/core/hyperliquid/orders.d.ts +5 -0
  74. package/dist/core/hyperliquid/orders.d.ts.map +1 -1
  75. package/dist/core/hyperliquid/orders.js +15 -5
  76. package/dist/core/hyperliquid/orders.js.map +1 -1
  77. package/dist/core/hyperliquid/rounding.d.ts +23 -0
  78. package/dist/core/hyperliquid/rounding.d.ts.map +1 -0
  79. package/dist/core/hyperliquid/rounding.js +53 -0
  80. package/dist/core/hyperliquid/rounding.js.map +1 -0
  81. package/dist/core/risk/isolatedTopUp.d.ts +112 -0
  82. package/dist/core/risk/isolatedTopUp.d.ts.map +1 -0
  83. package/dist/core/risk/isolatedTopUp.js +209 -0
  84. package/dist/core/risk/isolatedTopUp.js.map +1 -0
  85. package/dist/core/risk/isolatedTopUpHistory.d.ts +7 -0
  86. package/dist/core/risk/isolatedTopUpHistory.d.ts.map +1 -0
  87. package/dist/core/risk/isolatedTopUpHistory.js +26 -0
  88. package/dist/core/risk/isolatedTopUpHistory.js.map +1 -0
  89. package/dist/core/risk/isolatedTopUpParse.d.ts +16 -0
  90. package/dist/core/risk/isolatedTopUpParse.d.ts.map +1 -0
  91. package/dist/core/risk/isolatedTopUpParse.js +78 -0
  92. package/dist/core/risk/isolatedTopUpParse.js.map +1 -0
  93. package/dist/core/risk/runIsolatedTopUpReconcile.d.ts +28 -0
  94. package/dist/core/risk/runIsolatedTopUpReconcile.d.ts.map +1 -0
  95. package/dist/core/risk/runIsolatedTopUpReconcile.js +184 -0
  96. package/dist/core/risk/runIsolatedTopUpReconcile.js.map +1 -0
  97. package/dist/core/state/gridReconcile.d.ts +2 -0
  98. package/dist/core/state/gridReconcile.d.ts.map +1 -1
  99. package/dist/core/state/gridReconcile.js +42 -2
  100. package/dist/core/state/gridReconcile.js.map +1 -1
  101. package/dist/core/state/intentFactory.d.ts +1 -0
  102. package/dist/core/state/intentFactory.d.ts.map +1 -1
  103. package/dist/core/state/intentFactory.js +1 -0
  104. package/dist/core/state/intentFactory.js.map +1 -1
  105. package/dist/core/state/profileStore.d.ts.map +1 -1
  106. package/dist/core/state/profileStore.js +12 -16
  107. package/dist/core/state/profileStore.js.map +1 -1
  108. package/dist/core/state/runReconcile.d.ts.map +1 -1
  109. package/dist/core/state/runReconcile.js +53 -18
  110. package/dist/core/state/runReconcile.js.map +1 -1
  111. package/dist/core/state/schema.d.ts +439 -68
  112. package/dist/core/state/schema.d.ts.map +1 -1
  113. package/dist/core/state/schema.js +51 -0
  114. package/dist/core/state/schema.js.map +1 -1
  115. package/dist/core/state/snapshot.d.ts +13 -0
  116. package/dist/core/state/snapshot.d.ts.map +1 -1
  117. package/dist/core/state/snapshot.js +36 -0
  118. package/dist/core/state/snapshot.js.map +1 -1
  119. package/dist/core/state/store.d.ts +21 -3
  120. package/dist/core/state/store.d.ts.map +1 -1
  121. package/dist/core/state/store.js +122 -13
  122. package/dist/core/state/store.js.map +1 -1
  123. package/dist/core/state/types.d.ts +13 -0
  124. package/dist/core/state/types.d.ts.map +1 -1
  125. package/dist/daemon/index.js +47 -2
  126. package/dist/daemon/index.js.map +1 -1
  127. package/dist/daemon/validateChild.d.ts +13 -0
  128. package/dist/daemon/validateChild.d.ts.map +1 -0
  129. package/dist/daemon/validateChild.js +77 -0
  130. package/dist/daemon/validateChild.js.map +1 -0
  131. package/dist/strategies/grid.d.ts +1 -0
  132. package/dist/strategies/grid.d.ts.map +1 -1
  133. package/dist/strategies/grid.js +1 -0
  134. package/dist/strategies/grid.js.map +1 -1
  135. package/package.json +3 -1
@@ -15,10 +15,26 @@ export declare const PriceTargetSchema: z.ZodObject<{
15
15
  time_est: string;
16
16
  probability?: number | undefined;
17
17
  }>;
18
+ export declare const Range15_30mSchema: z.ZodObject<{
19
+ low: z.ZodNumber;
20
+ high: z.ZodNumber;
21
+ optimistic_side: z.ZodEnum<["buy", "sell"]>;
22
+ confidence: z.ZodOptional<z.ZodNumber>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ low: number;
25
+ high: number;
26
+ optimistic_side: "buy" | "sell";
27
+ confidence?: number | undefined;
28
+ }, {
29
+ low: number;
30
+ high: number;
31
+ optimistic_side: "buy" | "sell";
32
+ confidence?: number | undefined;
33
+ }>;
18
34
  export declare const AnalysisSchema: z.ZodObject<{
19
- indicators: z.ZodOptional<z.ZodString>;
20
- elliott_wave: z.ZodOptional<z.ZodString>;
21
- chan_theory: z.ZodOptional<z.ZodString>;
35
+ indicators: z.ZodString;
36
+ elliott_wave: z.ZodString;
37
+ chan_theory: z.ZodString;
22
38
  price_targets: z.ZodOptional<z.ZodArray<z.ZodObject<{
23
39
  level: z.ZodNumber;
24
40
  label: z.ZodString;
@@ -36,10 +52,26 @@ export declare const AnalysisSchema: z.ZodObject<{
36
52
  probability?: number | undefined;
37
53
  }>, "many">>;
38
54
  time_horizon: z.ZodOptional<z.ZodString>;
55
+ range_15_30m: z.ZodOptional<z.ZodObject<{
56
+ low: z.ZodNumber;
57
+ high: z.ZodNumber;
58
+ optimistic_side: z.ZodEnum<["buy", "sell"]>;
59
+ confidence: z.ZodOptional<z.ZodNumber>;
60
+ }, "strip", z.ZodTypeAny, {
61
+ low: number;
62
+ high: number;
63
+ optimistic_side: "buy" | "sell";
64
+ confidence?: number | undefined;
65
+ }, {
66
+ low: number;
67
+ high: number;
68
+ optimistic_side: "buy" | "sell";
69
+ confidence?: number | undefined;
70
+ }>>;
39
71
  }, "strip", z.ZodTypeAny, {
40
- indicators?: string | undefined;
41
- elliott_wave?: string | undefined;
42
- chan_theory?: string | undefined;
72
+ indicators: string;
73
+ elliott_wave: string;
74
+ chan_theory: string;
43
75
  price_targets?: {
44
76
  level: number;
45
77
  label: string;
@@ -47,10 +79,16 @@ export declare const AnalysisSchema: z.ZodObject<{
47
79
  probability?: number | undefined;
48
80
  }[] | undefined;
49
81
  time_horizon?: string | undefined;
82
+ range_15_30m?: {
83
+ low: number;
84
+ high: number;
85
+ optimistic_side: "buy" | "sell";
86
+ confidence?: number | undefined;
87
+ } | undefined;
50
88
  }, {
51
- indicators?: string | undefined;
52
- elliott_wave?: string | undefined;
53
- chan_theory?: string | undefined;
89
+ indicators: string;
90
+ elliott_wave: string;
91
+ chan_theory: string;
54
92
  price_targets?: {
55
93
  level: number;
56
94
  label: string;
@@ -58,14 +96,20 @@ export declare const AnalysisSchema: z.ZodObject<{
58
96
  probability?: number | undefined;
59
97
  }[] | undefined;
60
98
  time_horizon?: string | undefined;
99
+ range_15_30m?: {
100
+ low: number;
101
+ high: number;
102
+ optimistic_side: "buy" | "sell";
103
+ confidence?: number | undefined;
104
+ } | undefined;
61
105
  }>;
62
106
  export type AdvisorAnalysis = z.infer<typeof AnalysisSchema>;
63
107
  export type PriceTarget = z.infer<typeof PriceTargetSchema>;
64
108
  export declare const AdvisorActionSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
65
109
  analysis: z.ZodOptional<z.ZodObject<{
66
- indicators: z.ZodOptional<z.ZodString>;
67
- elliott_wave: z.ZodOptional<z.ZodString>;
68
- chan_theory: z.ZodOptional<z.ZodString>;
110
+ indicators: z.ZodString;
111
+ elliott_wave: z.ZodString;
112
+ chan_theory: z.ZodString;
69
113
  price_targets: z.ZodOptional<z.ZodArray<z.ZodObject<{
70
114
  level: z.ZodNumber;
71
115
  label: z.ZodString;
@@ -83,10 +127,26 @@ export declare const AdvisorActionSchema: z.ZodDiscriminatedUnion<"action", [z.Z
83
127
  probability?: number | undefined;
84
128
  }>, "many">>;
85
129
  time_horizon: z.ZodOptional<z.ZodString>;
130
+ range_15_30m: z.ZodOptional<z.ZodObject<{
131
+ low: z.ZodNumber;
132
+ high: z.ZodNumber;
133
+ optimistic_side: z.ZodEnum<["buy", "sell"]>;
134
+ confidence: z.ZodOptional<z.ZodNumber>;
135
+ }, "strip", z.ZodTypeAny, {
136
+ low: number;
137
+ high: number;
138
+ optimistic_side: "buy" | "sell";
139
+ confidence?: number | undefined;
140
+ }, {
141
+ low: number;
142
+ high: number;
143
+ optimistic_side: "buy" | "sell";
144
+ confidence?: number | undefined;
145
+ }>>;
86
146
  }, "strip", z.ZodTypeAny, {
87
- indicators?: string | undefined;
88
- elliott_wave?: string | undefined;
89
- chan_theory?: string | undefined;
147
+ indicators: string;
148
+ elliott_wave: string;
149
+ chan_theory: string;
90
150
  price_targets?: {
91
151
  level: number;
92
152
  label: string;
@@ -94,10 +154,16 @@ export declare const AdvisorActionSchema: z.ZodDiscriminatedUnion<"action", [z.Z
94
154
  probability?: number | undefined;
95
155
  }[] | undefined;
96
156
  time_horizon?: string | undefined;
157
+ range_15_30m?: {
158
+ low: number;
159
+ high: number;
160
+ optimistic_side: "buy" | "sell";
161
+ confidence?: number | undefined;
162
+ } | undefined;
97
163
  }, {
98
- indicators?: string | undefined;
99
- elliott_wave?: string | undefined;
100
- chan_theory?: string | undefined;
164
+ indicators: string;
165
+ elliott_wave: string;
166
+ chan_theory: string;
101
167
  price_targets?: {
102
168
  level: number;
103
169
  label: string;
@@ -105,18 +171,24 @@ export declare const AdvisorActionSchema: z.ZodDiscriminatedUnion<"action", [z.Z
105
171
  probability?: number | undefined;
106
172
  }[] | undefined;
107
173
  time_horizon?: string | undefined;
174
+ range_15_30m?: {
175
+ low: number;
176
+ high: number;
177
+ optimistic_side: "buy" | "sell";
178
+ confidence?: number | undefined;
179
+ } | undefined;
108
180
  }>>;
109
181
  action: z.ZodLiteral<"wait">;
110
182
  reason: z.ZodString;
111
183
  confidence: z.ZodNumber;
112
184
  }, "strip", z.ZodTypeAny, {
185
+ confidence: number;
113
186
  action: "wait";
114
187
  reason: string;
115
- confidence: number;
116
188
  analysis?: {
117
- indicators?: string | undefined;
118
- elliott_wave?: string | undefined;
119
- chan_theory?: string | undefined;
189
+ indicators: string;
190
+ elliott_wave: string;
191
+ chan_theory: string;
120
192
  price_targets?: {
121
193
  level: number;
122
194
  label: string;
@@ -124,15 +196,21 @@ export declare const AdvisorActionSchema: z.ZodDiscriminatedUnion<"action", [z.Z
124
196
  probability?: number | undefined;
125
197
  }[] | undefined;
126
198
  time_horizon?: string | undefined;
199
+ range_15_30m?: {
200
+ low: number;
201
+ high: number;
202
+ optimistic_side: "buy" | "sell";
203
+ confidence?: number | undefined;
204
+ } | undefined;
127
205
  } | undefined;
128
206
  }, {
207
+ confidence: number;
129
208
  action: "wait";
130
209
  reason: string;
131
- confidence: number;
132
210
  analysis?: {
133
- indicators?: string | undefined;
134
- elliott_wave?: string | undefined;
135
- chan_theory?: string | undefined;
211
+ indicators: string;
212
+ elliott_wave: string;
213
+ chan_theory: string;
136
214
  price_targets?: {
137
215
  level: number;
138
216
  label: string;
@@ -140,12 +218,18 @@ export declare const AdvisorActionSchema: z.ZodDiscriminatedUnion<"action", [z.Z
140
218
  probability?: number | undefined;
141
219
  }[] | undefined;
142
220
  time_horizon?: string | undefined;
221
+ range_15_30m?: {
222
+ low: number;
223
+ high: number;
224
+ optimistic_side: "buy" | "sell";
225
+ confidence?: number | undefined;
226
+ } | undefined;
143
227
  } | undefined;
144
228
  }>, z.ZodObject<{
145
229
  analysis: z.ZodOptional<z.ZodObject<{
146
- indicators: z.ZodOptional<z.ZodString>;
147
- elliott_wave: z.ZodOptional<z.ZodString>;
148
- chan_theory: z.ZodOptional<z.ZodString>;
230
+ indicators: z.ZodString;
231
+ elliott_wave: z.ZodString;
232
+ chan_theory: z.ZodString;
149
233
  price_targets: z.ZodOptional<z.ZodArray<z.ZodObject<{
150
234
  level: z.ZodNumber;
151
235
  label: z.ZodString;
@@ -163,10 +247,26 @@ export declare const AdvisorActionSchema: z.ZodDiscriminatedUnion<"action", [z.Z
163
247
  probability?: number | undefined;
164
248
  }>, "many">>;
165
249
  time_horizon: z.ZodOptional<z.ZodString>;
250
+ range_15_30m: z.ZodOptional<z.ZodObject<{
251
+ low: z.ZodNumber;
252
+ high: z.ZodNumber;
253
+ optimistic_side: z.ZodEnum<["buy", "sell"]>;
254
+ confidence: z.ZodOptional<z.ZodNumber>;
255
+ }, "strip", z.ZodTypeAny, {
256
+ low: number;
257
+ high: number;
258
+ optimistic_side: "buy" | "sell";
259
+ confidence?: number | undefined;
260
+ }, {
261
+ low: number;
262
+ high: number;
263
+ optimistic_side: "buy" | "sell";
264
+ confidence?: number | undefined;
265
+ }>>;
166
266
  }, "strip", z.ZodTypeAny, {
167
- indicators?: string | undefined;
168
- elliott_wave?: string | undefined;
169
- chan_theory?: string | undefined;
267
+ indicators: string;
268
+ elliott_wave: string;
269
+ chan_theory: string;
170
270
  price_targets?: {
171
271
  level: number;
172
272
  label: string;
@@ -174,10 +274,16 @@ export declare const AdvisorActionSchema: z.ZodDiscriminatedUnion<"action", [z.Z
174
274
  probability?: number | undefined;
175
275
  }[] | undefined;
176
276
  time_horizon?: string | undefined;
277
+ range_15_30m?: {
278
+ low: number;
279
+ high: number;
280
+ optimistic_side: "buy" | "sell";
281
+ confidence?: number | undefined;
282
+ } | undefined;
177
283
  }, {
178
- indicators?: string | undefined;
179
- elliott_wave?: string | undefined;
180
- chan_theory?: string | undefined;
284
+ indicators: string;
285
+ elliott_wave: string;
286
+ chan_theory: string;
181
287
  price_targets?: {
182
288
  level: number;
183
289
  label: string;
@@ -185,6 +291,12 @@ export declare const AdvisorActionSchema: z.ZodDiscriminatedUnion<"action", [z.Z
185
291
  probability?: number | undefined;
186
292
  }[] | undefined;
187
293
  time_horizon?: string | undefined;
294
+ range_15_30m?: {
295
+ low: number;
296
+ high: number;
297
+ optimistic_side: "buy" | "sell";
298
+ confidence?: number | undefined;
299
+ } | undefined;
188
300
  }>>;
189
301
  action: z.ZodLiteral<"open_with_bracket">;
190
302
  side: z.ZodEnum<["buy", "sell"]>;
@@ -198,9 +310,9 @@ export declare const AdvisorActionSchema: z.ZodDiscriminatedUnion<"action", [z.Z
198
310
  confidence: z.ZodNumber;
199
311
  risk_flags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
200
312
  }, "strip", z.ZodTypeAny, {
313
+ confidence: number;
201
314
  action: "open_with_bracket";
202
315
  reason: string;
203
- confidence: number;
204
316
  side: "buy" | "sell";
205
317
  limit_px: number;
206
318
  sz: number;
@@ -209,9 +321,9 @@ export declare const AdvisorActionSchema: z.ZodDiscriminatedUnion<"action", [z.Z
209
321
  is_market: boolean;
210
322
  risk_flags: string[];
211
323
  analysis?: {
212
- indicators?: string | undefined;
213
- elliott_wave?: string | undefined;
214
- chan_theory?: string | undefined;
324
+ indicators: string;
325
+ elliott_wave: string;
326
+ chan_theory: string;
215
327
  price_targets?: {
216
328
  level: number;
217
329
  label: string;
@@ -219,21 +331,27 @@ export declare const AdvisorActionSchema: z.ZodDiscriminatedUnion<"action", [z.Z
219
331
  probability?: number | undefined;
220
332
  }[] | undefined;
221
333
  time_horizon?: string | undefined;
334
+ range_15_30m?: {
335
+ low: number;
336
+ high: number;
337
+ optimistic_side: "buy" | "sell";
338
+ confidence?: number | undefined;
339
+ } | undefined;
222
340
  } | undefined;
223
341
  protection_limit_px?: number | undefined;
224
342
  }, {
343
+ confidence: number;
225
344
  action: "open_with_bracket";
226
345
  reason: string;
227
- confidence: number;
228
346
  side: "buy" | "sell";
229
347
  limit_px: number;
230
348
  sz: number;
231
349
  tp_px: number;
232
350
  sl_px: number;
233
351
  analysis?: {
234
- indicators?: string | undefined;
235
- elliott_wave?: string | undefined;
236
- chan_theory?: string | undefined;
352
+ indicators: string;
353
+ elliott_wave: string;
354
+ chan_theory: string;
237
355
  price_targets?: {
238
356
  level: number;
239
357
  label: string;
@@ -241,15 +359,21 @@ export declare const AdvisorActionSchema: z.ZodDiscriminatedUnion<"action", [z.Z
241
359
  probability?: number | undefined;
242
360
  }[] | undefined;
243
361
  time_horizon?: string | undefined;
362
+ range_15_30m?: {
363
+ low: number;
364
+ high: number;
365
+ optimistic_side: "buy" | "sell";
366
+ confidence?: number | undefined;
367
+ } | undefined;
244
368
  } | undefined;
245
369
  is_market?: boolean | undefined;
246
370
  protection_limit_px?: number | undefined;
247
371
  risk_flags?: string[] | undefined;
248
372
  }>, z.ZodObject<{
249
373
  analysis: z.ZodOptional<z.ZodObject<{
250
- indicators: z.ZodOptional<z.ZodString>;
251
- elliott_wave: z.ZodOptional<z.ZodString>;
252
- chan_theory: z.ZodOptional<z.ZodString>;
374
+ indicators: z.ZodString;
375
+ elliott_wave: z.ZodString;
376
+ chan_theory: z.ZodString;
253
377
  price_targets: z.ZodOptional<z.ZodArray<z.ZodObject<{
254
378
  level: z.ZodNumber;
255
379
  label: z.ZodString;
@@ -267,10 +391,26 @@ export declare const AdvisorActionSchema: z.ZodDiscriminatedUnion<"action", [z.Z
267
391
  probability?: number | undefined;
268
392
  }>, "many">>;
269
393
  time_horizon: z.ZodOptional<z.ZodString>;
394
+ range_15_30m: z.ZodOptional<z.ZodObject<{
395
+ low: z.ZodNumber;
396
+ high: z.ZodNumber;
397
+ optimistic_side: z.ZodEnum<["buy", "sell"]>;
398
+ confidence: z.ZodOptional<z.ZodNumber>;
399
+ }, "strip", z.ZodTypeAny, {
400
+ low: number;
401
+ high: number;
402
+ optimistic_side: "buy" | "sell";
403
+ confidence?: number | undefined;
404
+ }, {
405
+ low: number;
406
+ high: number;
407
+ optimistic_side: "buy" | "sell";
408
+ confidence?: number | undefined;
409
+ }>>;
270
410
  }, "strip", z.ZodTypeAny, {
271
- indicators?: string | undefined;
272
- elliott_wave?: string | undefined;
273
- chan_theory?: string | undefined;
411
+ indicators: string;
412
+ elliott_wave: string;
413
+ chan_theory: string;
274
414
  price_targets?: {
275
415
  level: number;
276
416
  label: string;
@@ -278,10 +418,16 @@ export declare const AdvisorActionSchema: z.ZodDiscriminatedUnion<"action", [z.Z
278
418
  probability?: number | undefined;
279
419
  }[] | undefined;
280
420
  time_horizon?: string | undefined;
421
+ range_15_30m?: {
422
+ low: number;
423
+ high: number;
424
+ optimistic_side: "buy" | "sell";
425
+ confidence?: number | undefined;
426
+ } | undefined;
281
427
  }, {
282
- indicators?: string | undefined;
283
- elliott_wave?: string | undefined;
284
- chan_theory?: string | undefined;
428
+ indicators: string;
429
+ elliott_wave: string;
430
+ chan_theory: string;
285
431
  price_targets?: {
286
432
  level: number;
287
433
  label: string;
@@ -289,21 +435,32 @@ export declare const AdvisorActionSchema: z.ZodDiscriminatedUnion<"action", [z.Z
289
435
  probability?: number | undefined;
290
436
  }[] | undefined;
291
437
  time_horizon?: string | undefined;
438
+ range_15_30m?: {
439
+ low: number;
440
+ high: number;
441
+ optimistic_side: "buy" | "sell";
442
+ confidence?: number | undefined;
443
+ } | undefined;
292
444
  }>>;
293
445
  action: z.ZodLiteral<"close_position">;
294
446
  method: z.ZodEnum<["market", "limit"]>;
295
447
  limit_px: z.ZodOptional<z.ZodNumber>;
448
+ /**
449
+ * Required when active_position_plan shows trend_toward_tp: model asserts price
450
+ * is unlikely to reach TP before SL/time horizon (not merely "no protection on book").
451
+ */
452
+ tp_unreachable: z.ZodOptional<z.ZodBoolean>;
296
453
  reason: z.ZodString;
297
454
  confidence: z.ZodNumber;
298
455
  }, "strip", z.ZodTypeAny, {
456
+ confidence: number;
299
457
  action: "close_position";
300
458
  reason: string;
301
- confidence: number;
302
459
  method: "market" | "limit";
303
460
  analysis?: {
304
- indicators?: string | undefined;
305
- elliott_wave?: string | undefined;
306
- chan_theory?: string | undefined;
461
+ indicators: string;
462
+ elliott_wave: string;
463
+ chan_theory: string;
307
464
  price_targets?: {
308
465
  level: number;
309
466
  label: string;
@@ -311,17 +468,24 @@ export declare const AdvisorActionSchema: z.ZodDiscriminatedUnion<"action", [z.Z
311
468
  probability?: number | undefined;
312
469
  }[] | undefined;
313
470
  time_horizon?: string | undefined;
471
+ range_15_30m?: {
472
+ low: number;
473
+ high: number;
474
+ optimistic_side: "buy" | "sell";
475
+ confidence?: number | undefined;
476
+ } | undefined;
314
477
  } | undefined;
315
478
  limit_px?: number | undefined;
479
+ tp_unreachable?: boolean | undefined;
316
480
  }, {
481
+ confidence: number;
317
482
  action: "close_position";
318
483
  reason: string;
319
- confidence: number;
320
484
  method: "market" | "limit";
321
485
  analysis?: {
322
- indicators?: string | undefined;
323
- elliott_wave?: string | undefined;
324
- chan_theory?: string | undefined;
486
+ indicators: string;
487
+ elliott_wave: string;
488
+ chan_theory: string;
325
489
  price_targets?: {
326
490
  level: number;
327
491
  label: string;
@@ -329,13 +493,20 @@ export declare const AdvisorActionSchema: z.ZodDiscriminatedUnion<"action", [z.Z
329
493
  probability?: number | undefined;
330
494
  }[] | undefined;
331
495
  time_horizon?: string | undefined;
496
+ range_15_30m?: {
497
+ low: number;
498
+ high: number;
499
+ optimistic_side: "buy" | "sell";
500
+ confidence?: number | undefined;
501
+ } | undefined;
332
502
  } | undefined;
333
503
  limit_px?: number | undefined;
504
+ tp_unreachable?: boolean | undefined;
334
505
  }>, z.ZodObject<{
335
506
  analysis: z.ZodOptional<z.ZodObject<{
336
- indicators: z.ZodOptional<z.ZodString>;
337
- elliott_wave: z.ZodOptional<z.ZodString>;
338
- chan_theory: z.ZodOptional<z.ZodString>;
507
+ indicators: z.ZodString;
508
+ elliott_wave: z.ZodString;
509
+ chan_theory: z.ZodString;
339
510
  price_targets: z.ZodOptional<z.ZodArray<z.ZodObject<{
340
511
  level: z.ZodNumber;
341
512
  label: z.ZodString;
@@ -353,10 +524,26 @@ export declare const AdvisorActionSchema: z.ZodDiscriminatedUnion<"action", [z.Z
353
524
  probability?: number | undefined;
354
525
  }>, "many">>;
355
526
  time_horizon: z.ZodOptional<z.ZodString>;
527
+ range_15_30m: z.ZodOptional<z.ZodObject<{
528
+ low: z.ZodNumber;
529
+ high: z.ZodNumber;
530
+ optimistic_side: z.ZodEnum<["buy", "sell"]>;
531
+ confidence: z.ZodOptional<z.ZodNumber>;
532
+ }, "strip", z.ZodTypeAny, {
533
+ low: number;
534
+ high: number;
535
+ optimistic_side: "buy" | "sell";
536
+ confidence?: number | undefined;
537
+ }, {
538
+ low: number;
539
+ high: number;
540
+ optimistic_side: "buy" | "sell";
541
+ confidence?: number | undefined;
542
+ }>>;
356
543
  }, "strip", z.ZodTypeAny, {
357
- indicators?: string | undefined;
358
- elliott_wave?: string | undefined;
359
- chan_theory?: string | undefined;
544
+ indicators: string;
545
+ elliott_wave: string;
546
+ chan_theory: string;
360
547
  price_targets?: {
361
548
  level: number;
362
549
  label: string;
@@ -364,10 +551,16 @@ export declare const AdvisorActionSchema: z.ZodDiscriminatedUnion<"action", [z.Z
364
551
  probability?: number | undefined;
365
552
  }[] | undefined;
366
553
  time_horizon?: string | undefined;
554
+ range_15_30m?: {
555
+ low: number;
556
+ high: number;
557
+ optimistic_side: "buy" | "sell";
558
+ confidence?: number | undefined;
559
+ } | undefined;
367
560
  }, {
368
- indicators?: string | undefined;
369
- elliott_wave?: string | undefined;
370
- chan_theory?: string | undefined;
561
+ indicators: string;
562
+ elliott_wave: string;
563
+ chan_theory: string;
371
564
  price_targets?: {
372
565
  level: number;
373
566
  label: string;
@@ -375,6 +568,12 @@ export declare const AdvisorActionSchema: z.ZodDiscriminatedUnion<"action", [z.Z
375
568
  probability?: number | undefined;
376
569
  }[] | undefined;
377
570
  time_horizon?: string | undefined;
571
+ range_15_30m?: {
572
+ low: number;
573
+ high: number;
574
+ optimistic_side: "buy" | "sell";
575
+ confidence?: number | undefined;
576
+ } | undefined;
378
577
  }>>;
379
578
  action: z.ZodLiteral<"cancel_all">;
380
579
  reason: z.ZodString;
@@ -382,9 +581,9 @@ export declare const AdvisorActionSchema: z.ZodDiscriminatedUnion<"action", [z.Z
382
581
  action: "cancel_all";
383
582
  reason: string;
384
583
  analysis?: {
385
- indicators?: string | undefined;
386
- elliott_wave?: string | undefined;
387
- chan_theory?: string | undefined;
584
+ indicators: string;
585
+ elliott_wave: string;
586
+ chan_theory: string;
388
587
  price_targets?: {
389
588
  level: number;
390
589
  label: string;
@@ -392,14 +591,193 @@ export declare const AdvisorActionSchema: z.ZodDiscriminatedUnion<"action", [z.Z
392
591
  probability?: number | undefined;
393
592
  }[] | undefined;
394
593
  time_horizon?: string | undefined;
594
+ range_15_30m?: {
595
+ low: number;
596
+ high: number;
597
+ optimistic_side: "buy" | "sell";
598
+ confidence?: number | undefined;
599
+ } | undefined;
395
600
  } | undefined;
396
601
  }, {
397
602
  action: "cancel_all";
398
603
  reason: string;
399
604
  analysis?: {
400
- indicators?: string | undefined;
401
- elliott_wave?: string | undefined;
402
- chan_theory?: string | undefined;
605
+ indicators: string;
606
+ elliott_wave: string;
607
+ chan_theory: string;
608
+ price_targets?: {
609
+ level: number;
610
+ label: string;
611
+ time_est: string;
612
+ probability?: number | undefined;
613
+ }[] | undefined;
614
+ time_horizon?: string | undefined;
615
+ range_15_30m?: {
616
+ low: number;
617
+ high: number;
618
+ optimistic_side: "buy" | "sell";
619
+ confidence?: number | undefined;
620
+ } | undefined;
621
+ } | undefined;
622
+ }>, z.ZodObject<{
623
+ analysis: z.ZodOptional<z.ZodObject<{
624
+ indicators: z.ZodString;
625
+ elliott_wave: z.ZodString;
626
+ chan_theory: z.ZodString;
627
+ price_targets: z.ZodOptional<z.ZodArray<z.ZodObject<{
628
+ level: z.ZodNumber;
629
+ label: z.ZodString;
630
+ time_est: z.ZodString;
631
+ probability: z.ZodOptional<z.ZodNumber>;
632
+ }, "strip", z.ZodTypeAny, {
633
+ level: number;
634
+ label: string;
635
+ time_est: string;
636
+ probability?: number | undefined;
637
+ }, {
638
+ level: number;
639
+ label: string;
640
+ time_est: string;
641
+ probability?: number | undefined;
642
+ }>, "many">>;
643
+ time_horizon: z.ZodOptional<z.ZodString>;
644
+ range_15_30m: z.ZodOptional<z.ZodObject<{
645
+ low: z.ZodNumber;
646
+ high: z.ZodNumber;
647
+ optimistic_side: z.ZodEnum<["buy", "sell"]>;
648
+ confidence: z.ZodOptional<z.ZodNumber>;
649
+ }, "strip", z.ZodTypeAny, {
650
+ low: number;
651
+ high: number;
652
+ optimistic_side: "buy" | "sell";
653
+ confidence?: number | undefined;
654
+ }, {
655
+ low: number;
656
+ high: number;
657
+ optimistic_side: "buy" | "sell";
658
+ confidence?: number | undefined;
659
+ }>>;
660
+ }, "strip", z.ZodTypeAny, {
661
+ indicators: string;
662
+ elliott_wave: string;
663
+ chan_theory: string;
664
+ price_targets?: {
665
+ level: number;
666
+ label: string;
667
+ time_est: string;
668
+ probability?: number | undefined;
669
+ }[] | undefined;
670
+ time_horizon?: string | undefined;
671
+ range_15_30m?: {
672
+ low: number;
673
+ high: number;
674
+ optimistic_side: "buy" | "sell";
675
+ confidence?: number | undefined;
676
+ } | undefined;
677
+ }, {
678
+ indicators: string;
679
+ elliott_wave: string;
680
+ chan_theory: string;
681
+ price_targets?: {
682
+ level: number;
683
+ label: string;
684
+ time_est: string;
685
+ probability?: number | undefined;
686
+ }[] | undefined;
687
+ time_horizon?: string | undefined;
688
+ range_15_30m?: {
689
+ low: number;
690
+ high: number;
691
+ optimistic_side: "buy" | "sell";
692
+ confidence?: number | undefined;
693
+ } | undefined;
694
+ }>>;
695
+ action: z.ZodLiteral<"place_limit_ambush">;
696
+ side: z.ZodEnum<["buy", "sell"]>;
697
+ limit_px: z.ZodNumber;
698
+ sz: z.ZodNumber;
699
+ tp_px: z.ZodNumber;
700
+ sl_px: z.ZodNumber;
701
+ /** TTL minutes for unfilled entry (typical 15–30). */
702
+ expires_in_min: z.ZodNumber;
703
+ is_market: z.ZodDefault<z.ZodBoolean>;
704
+ protection_limit_px: z.ZodOptional<z.ZodNumber>;
705
+ range_15_30m: z.ZodOptional<z.ZodObject<{
706
+ low: z.ZodNumber;
707
+ high: z.ZodNumber;
708
+ optimistic_side: z.ZodEnum<["buy", "sell"]>;
709
+ confidence: z.ZodOptional<z.ZodNumber>;
710
+ }, "strip", z.ZodTypeAny, {
711
+ low: number;
712
+ high: number;
713
+ optimistic_side: "buy" | "sell";
714
+ confidence?: number | undefined;
715
+ }, {
716
+ low: number;
717
+ high: number;
718
+ optimistic_side: "buy" | "sell";
719
+ confidence?: number | undefined;
720
+ }>>;
721
+ reason: z.ZodString;
722
+ confidence: z.ZodNumber;
723
+ risk_flags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
724
+ }, "strip", z.ZodTypeAny, {
725
+ confidence: number;
726
+ action: "place_limit_ambush";
727
+ reason: string;
728
+ side: "buy" | "sell";
729
+ limit_px: number;
730
+ sz: number;
731
+ tp_px: number;
732
+ sl_px: number;
733
+ is_market: boolean;
734
+ risk_flags: string[];
735
+ expires_in_min: number;
736
+ range_15_30m?: {
737
+ low: number;
738
+ high: number;
739
+ optimistic_side: "buy" | "sell";
740
+ confidence?: number | undefined;
741
+ } | undefined;
742
+ analysis?: {
743
+ indicators: string;
744
+ elliott_wave: string;
745
+ chan_theory: string;
746
+ price_targets?: {
747
+ level: number;
748
+ label: string;
749
+ time_est: string;
750
+ probability?: number | undefined;
751
+ }[] | undefined;
752
+ time_horizon?: string | undefined;
753
+ range_15_30m?: {
754
+ low: number;
755
+ high: number;
756
+ optimistic_side: "buy" | "sell";
757
+ confidence?: number | undefined;
758
+ } | undefined;
759
+ } | undefined;
760
+ protection_limit_px?: number | undefined;
761
+ }, {
762
+ confidence: number;
763
+ action: "place_limit_ambush";
764
+ reason: string;
765
+ side: "buy" | "sell";
766
+ limit_px: number;
767
+ sz: number;
768
+ tp_px: number;
769
+ sl_px: number;
770
+ expires_in_min: number;
771
+ range_15_30m?: {
772
+ low: number;
773
+ high: number;
774
+ optimistic_side: "buy" | "sell";
775
+ confidence?: number | undefined;
776
+ } | undefined;
777
+ analysis?: {
778
+ indicators: string;
779
+ elliott_wave: string;
780
+ chan_theory: string;
403
781
  price_targets?: {
404
782
  level: number;
405
783
  label: string;
@@ -407,11 +785,767 @@ export declare const AdvisorActionSchema: z.ZodDiscriminatedUnion<"action", [z.Z
407
785
  probability?: number | undefined;
408
786
  }[] | undefined;
409
787
  time_horizon?: string | undefined;
788
+ range_15_30m?: {
789
+ low: number;
790
+ high: number;
791
+ optimistic_side: "buy" | "sell";
792
+ confidence?: number | undefined;
793
+ } | undefined;
410
794
  } | undefined;
795
+ is_market?: boolean | undefined;
796
+ protection_limit_px?: number | undefined;
797
+ risk_flags?: string[] | undefined;
411
798
  }>]>;
412
799
  export type AdvisorAction = z.infer<typeof AdvisorActionSchema>;
800
+ export type AdvisorBracketOpenAction = Extract<AdvisorAction, {
801
+ action: "open_with_bracket" | "place_limit_ambush";
802
+ }>;
803
+ export declare function isAdvisorBracketOpenAction(action: AdvisorAction): action is AdvisorBracketOpenAction;
413
804
  /** Bracket and non–is_market paths need an explicit protection limit. */
414
805
  export declare function refineBracketProtection(action: AdvisorAction): AdvisorAction;
415
806
  export declare function extractJsonObjectFromModelText(raw: string): string;
416
807
  export declare function parseAdvisorActionFromModelText(raw: string): AdvisorAction;
808
+ declare const StrategyActionSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
809
+ action: z.ZodLiteral<"wait">;
810
+ reason: z.ZodString;
811
+ confidence: z.ZodNumber;
812
+ }, "strip", z.ZodTypeAny, {
813
+ confidence: number;
814
+ action: "wait";
815
+ reason: string;
816
+ }, {
817
+ confidence: number;
818
+ action: "wait";
819
+ reason: string;
820
+ }>, z.ZodObject<{
821
+ action: z.ZodLiteral<"open_with_bracket">;
822
+ side: z.ZodEnum<["buy", "sell"]>;
823
+ limit_px: z.ZodNumber;
824
+ sz: z.ZodNumber;
825
+ tp_px: z.ZodNumber;
826
+ sl_px: z.ZodNumber;
827
+ is_market: z.ZodDefault<z.ZodBoolean>;
828
+ protection_limit_px: z.ZodOptional<z.ZodNumber>;
829
+ reason: z.ZodString;
830
+ confidence: z.ZodNumber;
831
+ risk_flags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
832
+ }, "strip", z.ZodTypeAny, {
833
+ confidence: number;
834
+ action: "open_with_bracket";
835
+ reason: string;
836
+ side: "buy" | "sell";
837
+ limit_px: number;
838
+ sz: number;
839
+ tp_px: number;
840
+ sl_px: number;
841
+ is_market: boolean;
842
+ risk_flags: string[];
843
+ protection_limit_px?: number | undefined;
844
+ }, {
845
+ confidence: number;
846
+ action: "open_with_bracket";
847
+ reason: string;
848
+ side: "buy" | "sell";
849
+ limit_px: number;
850
+ sz: number;
851
+ tp_px: number;
852
+ sl_px: number;
853
+ is_market?: boolean | undefined;
854
+ protection_limit_px?: number | undefined;
855
+ risk_flags?: string[] | undefined;
856
+ }>, z.ZodObject<{
857
+ action: z.ZodLiteral<"close_position">;
858
+ method: z.ZodEnum<["market", "limit"]>;
859
+ limit_px: z.ZodOptional<z.ZodNumber>;
860
+ tp_unreachable: z.ZodOptional<z.ZodBoolean>;
861
+ reason: z.ZodString;
862
+ confidence: z.ZodNumber;
863
+ }, "strip", z.ZodTypeAny, {
864
+ confidence: number;
865
+ action: "close_position";
866
+ reason: string;
867
+ method: "market" | "limit";
868
+ limit_px?: number | undefined;
869
+ tp_unreachable?: boolean | undefined;
870
+ }, {
871
+ confidence: number;
872
+ action: "close_position";
873
+ reason: string;
874
+ method: "market" | "limit";
875
+ limit_px?: number | undefined;
876
+ tp_unreachable?: boolean | undefined;
877
+ }>, z.ZodObject<{
878
+ action: z.ZodLiteral<"cancel_all">;
879
+ reason: z.ZodString;
880
+ }, "strip", z.ZodTypeAny, {
881
+ action: "cancel_all";
882
+ reason: string;
883
+ }, {
884
+ action: "cancel_all";
885
+ reason: string;
886
+ }>, z.ZodObject<{
887
+ action: z.ZodLiteral<"place_limit_ambush">;
888
+ side: z.ZodEnum<["buy", "sell"]>;
889
+ limit_px: z.ZodNumber;
890
+ sz: z.ZodNumber;
891
+ tp_px: z.ZodNumber;
892
+ sl_px: z.ZodNumber;
893
+ expires_in_min: z.ZodNumber;
894
+ is_market: z.ZodDefault<z.ZodBoolean>;
895
+ protection_limit_px: z.ZodOptional<z.ZodNumber>;
896
+ range_15_30m: z.ZodOptional<z.ZodObject<{
897
+ low: z.ZodNumber;
898
+ high: z.ZodNumber;
899
+ optimistic_side: z.ZodEnum<["buy", "sell"]>;
900
+ confidence: z.ZodOptional<z.ZodNumber>;
901
+ }, "strip", z.ZodTypeAny, {
902
+ low: number;
903
+ high: number;
904
+ optimistic_side: "buy" | "sell";
905
+ confidence?: number | undefined;
906
+ }, {
907
+ low: number;
908
+ high: number;
909
+ optimistic_side: "buy" | "sell";
910
+ confidence?: number | undefined;
911
+ }>>;
912
+ reason: z.ZodString;
913
+ confidence: z.ZodNumber;
914
+ risk_flags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
915
+ }, "strip", z.ZodTypeAny, {
916
+ confidence: number;
917
+ action: "place_limit_ambush";
918
+ reason: string;
919
+ side: "buy" | "sell";
920
+ limit_px: number;
921
+ sz: number;
922
+ tp_px: number;
923
+ sl_px: number;
924
+ is_market: boolean;
925
+ risk_flags: string[];
926
+ expires_in_min: number;
927
+ range_15_30m?: {
928
+ low: number;
929
+ high: number;
930
+ optimistic_side: "buy" | "sell";
931
+ confidence?: number | undefined;
932
+ } | undefined;
933
+ protection_limit_px?: number | undefined;
934
+ }, {
935
+ confidence: number;
936
+ action: "place_limit_ambush";
937
+ reason: string;
938
+ side: "buy" | "sell";
939
+ limit_px: number;
940
+ sz: number;
941
+ tp_px: number;
942
+ sl_px: number;
943
+ expires_in_min: number;
944
+ range_15_30m?: {
945
+ low: number;
946
+ high: number;
947
+ optimistic_side: "buy" | "sell";
948
+ confidence?: number | undefined;
949
+ } | undefined;
950
+ is_market?: boolean | undefined;
951
+ protection_limit_px?: number | undefined;
952
+ risk_flags?: string[] | undefined;
953
+ }>]>;
954
+ export type StrategyAction = z.infer<typeof StrategyActionSchema>;
955
+ export declare const DualAdvisorResponseSchema: z.ZodObject<{
956
+ analysis: z.ZodObject<{
957
+ indicators: z.ZodString;
958
+ elliott_wave: z.ZodString;
959
+ chan_theory: z.ZodString;
960
+ price_targets: z.ZodOptional<z.ZodArray<z.ZodObject<{
961
+ level: z.ZodNumber;
962
+ label: z.ZodString;
963
+ time_est: z.ZodString;
964
+ probability: z.ZodOptional<z.ZodNumber>;
965
+ }, "strip", z.ZodTypeAny, {
966
+ level: number;
967
+ label: string;
968
+ time_est: string;
969
+ probability?: number | undefined;
970
+ }, {
971
+ level: number;
972
+ label: string;
973
+ time_est: string;
974
+ probability?: number | undefined;
975
+ }>, "many">>;
976
+ time_horizon: z.ZodOptional<z.ZodString>;
977
+ range_15_30m: z.ZodOptional<z.ZodObject<{
978
+ low: z.ZodNumber;
979
+ high: z.ZodNumber;
980
+ optimistic_side: z.ZodEnum<["buy", "sell"]>;
981
+ confidence: z.ZodOptional<z.ZodNumber>;
982
+ }, "strip", z.ZodTypeAny, {
983
+ low: number;
984
+ high: number;
985
+ optimistic_side: "buy" | "sell";
986
+ confidence?: number | undefined;
987
+ }, {
988
+ low: number;
989
+ high: number;
990
+ optimistic_side: "buy" | "sell";
991
+ confidence?: number | undefined;
992
+ }>>;
993
+ }, "strip", z.ZodTypeAny, {
994
+ indicators: string;
995
+ elliott_wave: string;
996
+ chan_theory: string;
997
+ price_targets?: {
998
+ level: number;
999
+ label: string;
1000
+ time_est: string;
1001
+ probability?: number | undefined;
1002
+ }[] | undefined;
1003
+ time_horizon?: string | undefined;
1004
+ range_15_30m?: {
1005
+ low: number;
1006
+ high: number;
1007
+ optimistic_side: "buy" | "sell";
1008
+ confidence?: number | undefined;
1009
+ } | undefined;
1010
+ }, {
1011
+ indicators: string;
1012
+ elliott_wave: string;
1013
+ chan_theory: string;
1014
+ price_targets?: {
1015
+ level: number;
1016
+ label: string;
1017
+ time_est: string;
1018
+ probability?: number | undefined;
1019
+ }[] | undefined;
1020
+ time_horizon?: string | undefined;
1021
+ range_15_30m?: {
1022
+ low: number;
1023
+ high: number;
1024
+ optimistic_side: "buy" | "sell";
1025
+ confidence?: number | undefined;
1026
+ } | undefined;
1027
+ }>;
1028
+ scalp: z.ZodOptional<z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
1029
+ action: z.ZodLiteral<"wait">;
1030
+ reason: z.ZodString;
1031
+ confidence: z.ZodNumber;
1032
+ }, "strip", z.ZodTypeAny, {
1033
+ confidence: number;
1034
+ action: "wait";
1035
+ reason: string;
1036
+ }, {
1037
+ confidence: number;
1038
+ action: "wait";
1039
+ reason: string;
1040
+ }>, z.ZodObject<{
1041
+ action: z.ZodLiteral<"open_with_bracket">;
1042
+ side: z.ZodEnum<["buy", "sell"]>;
1043
+ limit_px: z.ZodNumber;
1044
+ sz: z.ZodNumber;
1045
+ tp_px: z.ZodNumber;
1046
+ sl_px: z.ZodNumber;
1047
+ is_market: z.ZodDefault<z.ZodBoolean>;
1048
+ protection_limit_px: z.ZodOptional<z.ZodNumber>;
1049
+ reason: z.ZodString;
1050
+ confidence: z.ZodNumber;
1051
+ risk_flags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1052
+ }, "strip", z.ZodTypeAny, {
1053
+ confidence: number;
1054
+ action: "open_with_bracket";
1055
+ reason: string;
1056
+ side: "buy" | "sell";
1057
+ limit_px: number;
1058
+ sz: number;
1059
+ tp_px: number;
1060
+ sl_px: number;
1061
+ is_market: boolean;
1062
+ risk_flags: string[];
1063
+ protection_limit_px?: number | undefined;
1064
+ }, {
1065
+ confidence: number;
1066
+ action: "open_with_bracket";
1067
+ reason: string;
1068
+ side: "buy" | "sell";
1069
+ limit_px: number;
1070
+ sz: number;
1071
+ tp_px: number;
1072
+ sl_px: number;
1073
+ is_market?: boolean | undefined;
1074
+ protection_limit_px?: number | undefined;
1075
+ risk_flags?: string[] | undefined;
1076
+ }>, z.ZodObject<{
1077
+ action: z.ZodLiteral<"close_position">;
1078
+ method: z.ZodEnum<["market", "limit"]>;
1079
+ limit_px: z.ZodOptional<z.ZodNumber>;
1080
+ tp_unreachable: z.ZodOptional<z.ZodBoolean>;
1081
+ reason: z.ZodString;
1082
+ confidence: z.ZodNumber;
1083
+ }, "strip", z.ZodTypeAny, {
1084
+ confidence: number;
1085
+ action: "close_position";
1086
+ reason: string;
1087
+ method: "market" | "limit";
1088
+ limit_px?: number | undefined;
1089
+ tp_unreachable?: boolean | undefined;
1090
+ }, {
1091
+ confidence: number;
1092
+ action: "close_position";
1093
+ reason: string;
1094
+ method: "market" | "limit";
1095
+ limit_px?: number | undefined;
1096
+ tp_unreachable?: boolean | undefined;
1097
+ }>, z.ZodObject<{
1098
+ action: z.ZodLiteral<"cancel_all">;
1099
+ reason: z.ZodString;
1100
+ }, "strip", z.ZodTypeAny, {
1101
+ action: "cancel_all";
1102
+ reason: string;
1103
+ }, {
1104
+ action: "cancel_all";
1105
+ reason: string;
1106
+ }>, z.ZodObject<{
1107
+ action: z.ZodLiteral<"place_limit_ambush">;
1108
+ side: z.ZodEnum<["buy", "sell"]>;
1109
+ limit_px: z.ZodNumber;
1110
+ sz: z.ZodNumber;
1111
+ tp_px: z.ZodNumber;
1112
+ sl_px: z.ZodNumber;
1113
+ expires_in_min: z.ZodNumber;
1114
+ is_market: z.ZodDefault<z.ZodBoolean>;
1115
+ protection_limit_px: z.ZodOptional<z.ZodNumber>;
1116
+ range_15_30m: z.ZodOptional<z.ZodObject<{
1117
+ low: z.ZodNumber;
1118
+ high: z.ZodNumber;
1119
+ optimistic_side: z.ZodEnum<["buy", "sell"]>;
1120
+ confidence: z.ZodOptional<z.ZodNumber>;
1121
+ }, "strip", z.ZodTypeAny, {
1122
+ low: number;
1123
+ high: number;
1124
+ optimistic_side: "buy" | "sell";
1125
+ confidence?: number | undefined;
1126
+ }, {
1127
+ low: number;
1128
+ high: number;
1129
+ optimistic_side: "buy" | "sell";
1130
+ confidence?: number | undefined;
1131
+ }>>;
1132
+ reason: z.ZodString;
1133
+ confidence: z.ZodNumber;
1134
+ risk_flags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1135
+ }, "strip", z.ZodTypeAny, {
1136
+ confidence: number;
1137
+ action: "place_limit_ambush";
1138
+ reason: string;
1139
+ side: "buy" | "sell";
1140
+ limit_px: number;
1141
+ sz: number;
1142
+ tp_px: number;
1143
+ sl_px: number;
1144
+ is_market: boolean;
1145
+ risk_flags: string[];
1146
+ expires_in_min: number;
1147
+ range_15_30m?: {
1148
+ low: number;
1149
+ high: number;
1150
+ optimistic_side: "buy" | "sell";
1151
+ confidence?: number | undefined;
1152
+ } | undefined;
1153
+ protection_limit_px?: number | undefined;
1154
+ }, {
1155
+ confidence: number;
1156
+ action: "place_limit_ambush";
1157
+ reason: string;
1158
+ side: "buy" | "sell";
1159
+ limit_px: number;
1160
+ sz: number;
1161
+ tp_px: number;
1162
+ sl_px: number;
1163
+ expires_in_min: number;
1164
+ range_15_30m?: {
1165
+ low: number;
1166
+ high: number;
1167
+ optimistic_side: "buy" | "sell";
1168
+ confidence?: number | undefined;
1169
+ } | undefined;
1170
+ is_market?: boolean | undefined;
1171
+ protection_limit_px?: number | undefined;
1172
+ risk_flags?: string[] | undefined;
1173
+ }>]>>;
1174
+ ambush: z.ZodOptional<z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
1175
+ action: z.ZodLiteral<"wait">;
1176
+ reason: z.ZodString;
1177
+ confidence: z.ZodNumber;
1178
+ }, "strip", z.ZodTypeAny, {
1179
+ confidence: number;
1180
+ action: "wait";
1181
+ reason: string;
1182
+ }, {
1183
+ confidence: number;
1184
+ action: "wait";
1185
+ reason: string;
1186
+ }>, z.ZodObject<{
1187
+ action: z.ZodLiteral<"open_with_bracket">;
1188
+ side: z.ZodEnum<["buy", "sell"]>;
1189
+ limit_px: z.ZodNumber;
1190
+ sz: z.ZodNumber;
1191
+ tp_px: z.ZodNumber;
1192
+ sl_px: z.ZodNumber;
1193
+ is_market: z.ZodDefault<z.ZodBoolean>;
1194
+ protection_limit_px: z.ZodOptional<z.ZodNumber>;
1195
+ reason: z.ZodString;
1196
+ confidence: z.ZodNumber;
1197
+ risk_flags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1198
+ }, "strip", z.ZodTypeAny, {
1199
+ confidence: number;
1200
+ action: "open_with_bracket";
1201
+ reason: string;
1202
+ side: "buy" | "sell";
1203
+ limit_px: number;
1204
+ sz: number;
1205
+ tp_px: number;
1206
+ sl_px: number;
1207
+ is_market: boolean;
1208
+ risk_flags: string[];
1209
+ protection_limit_px?: number | undefined;
1210
+ }, {
1211
+ confidence: number;
1212
+ action: "open_with_bracket";
1213
+ reason: string;
1214
+ side: "buy" | "sell";
1215
+ limit_px: number;
1216
+ sz: number;
1217
+ tp_px: number;
1218
+ sl_px: number;
1219
+ is_market?: boolean | undefined;
1220
+ protection_limit_px?: number | undefined;
1221
+ risk_flags?: string[] | undefined;
1222
+ }>, z.ZodObject<{
1223
+ action: z.ZodLiteral<"close_position">;
1224
+ method: z.ZodEnum<["market", "limit"]>;
1225
+ limit_px: z.ZodOptional<z.ZodNumber>;
1226
+ tp_unreachable: z.ZodOptional<z.ZodBoolean>;
1227
+ reason: z.ZodString;
1228
+ confidence: z.ZodNumber;
1229
+ }, "strip", z.ZodTypeAny, {
1230
+ confidence: number;
1231
+ action: "close_position";
1232
+ reason: string;
1233
+ method: "market" | "limit";
1234
+ limit_px?: number | undefined;
1235
+ tp_unreachable?: boolean | undefined;
1236
+ }, {
1237
+ confidence: number;
1238
+ action: "close_position";
1239
+ reason: string;
1240
+ method: "market" | "limit";
1241
+ limit_px?: number | undefined;
1242
+ tp_unreachable?: boolean | undefined;
1243
+ }>, z.ZodObject<{
1244
+ action: z.ZodLiteral<"cancel_all">;
1245
+ reason: z.ZodString;
1246
+ }, "strip", z.ZodTypeAny, {
1247
+ action: "cancel_all";
1248
+ reason: string;
1249
+ }, {
1250
+ action: "cancel_all";
1251
+ reason: string;
1252
+ }>, z.ZodObject<{
1253
+ action: z.ZodLiteral<"place_limit_ambush">;
1254
+ side: z.ZodEnum<["buy", "sell"]>;
1255
+ limit_px: z.ZodNumber;
1256
+ sz: z.ZodNumber;
1257
+ tp_px: z.ZodNumber;
1258
+ sl_px: z.ZodNumber;
1259
+ expires_in_min: z.ZodNumber;
1260
+ is_market: z.ZodDefault<z.ZodBoolean>;
1261
+ protection_limit_px: z.ZodOptional<z.ZodNumber>;
1262
+ range_15_30m: z.ZodOptional<z.ZodObject<{
1263
+ low: z.ZodNumber;
1264
+ high: z.ZodNumber;
1265
+ optimistic_side: z.ZodEnum<["buy", "sell"]>;
1266
+ confidence: z.ZodOptional<z.ZodNumber>;
1267
+ }, "strip", z.ZodTypeAny, {
1268
+ low: number;
1269
+ high: number;
1270
+ optimistic_side: "buy" | "sell";
1271
+ confidence?: number | undefined;
1272
+ }, {
1273
+ low: number;
1274
+ high: number;
1275
+ optimistic_side: "buy" | "sell";
1276
+ confidence?: number | undefined;
1277
+ }>>;
1278
+ reason: z.ZodString;
1279
+ confidence: z.ZodNumber;
1280
+ risk_flags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1281
+ }, "strip", z.ZodTypeAny, {
1282
+ confidence: number;
1283
+ action: "place_limit_ambush";
1284
+ reason: string;
1285
+ side: "buy" | "sell";
1286
+ limit_px: number;
1287
+ sz: number;
1288
+ tp_px: number;
1289
+ sl_px: number;
1290
+ is_market: boolean;
1291
+ risk_flags: string[];
1292
+ expires_in_min: number;
1293
+ range_15_30m?: {
1294
+ low: number;
1295
+ high: number;
1296
+ optimistic_side: "buy" | "sell";
1297
+ confidence?: number | undefined;
1298
+ } | undefined;
1299
+ protection_limit_px?: number | undefined;
1300
+ }, {
1301
+ confidence: number;
1302
+ action: "place_limit_ambush";
1303
+ reason: string;
1304
+ side: "buy" | "sell";
1305
+ limit_px: number;
1306
+ sz: number;
1307
+ tp_px: number;
1308
+ sl_px: number;
1309
+ expires_in_min: number;
1310
+ range_15_30m?: {
1311
+ low: number;
1312
+ high: number;
1313
+ optimistic_side: "buy" | "sell";
1314
+ confidence?: number | undefined;
1315
+ } | undefined;
1316
+ is_market?: boolean | undefined;
1317
+ protection_limit_px?: number | undefined;
1318
+ risk_flags?: string[] | undefined;
1319
+ }>]>>;
1320
+ }, "strip", z.ZodTypeAny, {
1321
+ analysis: {
1322
+ indicators: string;
1323
+ elliott_wave: string;
1324
+ chan_theory: string;
1325
+ price_targets?: {
1326
+ level: number;
1327
+ label: string;
1328
+ time_est: string;
1329
+ probability?: number | undefined;
1330
+ }[] | undefined;
1331
+ time_horizon?: string | undefined;
1332
+ range_15_30m?: {
1333
+ low: number;
1334
+ high: number;
1335
+ optimistic_side: "buy" | "sell";
1336
+ confidence?: number | undefined;
1337
+ } | undefined;
1338
+ };
1339
+ scalp?: {
1340
+ confidence: number;
1341
+ action: "wait";
1342
+ reason: string;
1343
+ } | {
1344
+ confidence: number;
1345
+ action: "open_with_bracket";
1346
+ reason: string;
1347
+ side: "buy" | "sell";
1348
+ limit_px: number;
1349
+ sz: number;
1350
+ tp_px: number;
1351
+ sl_px: number;
1352
+ is_market: boolean;
1353
+ risk_flags: string[];
1354
+ protection_limit_px?: number | undefined;
1355
+ } | {
1356
+ confidence: number;
1357
+ action: "close_position";
1358
+ reason: string;
1359
+ method: "market" | "limit";
1360
+ limit_px?: number | undefined;
1361
+ tp_unreachable?: boolean | undefined;
1362
+ } | {
1363
+ action: "cancel_all";
1364
+ reason: string;
1365
+ } | {
1366
+ confidence: number;
1367
+ action: "place_limit_ambush";
1368
+ reason: string;
1369
+ side: "buy" | "sell";
1370
+ limit_px: number;
1371
+ sz: number;
1372
+ tp_px: number;
1373
+ sl_px: number;
1374
+ is_market: boolean;
1375
+ risk_flags: string[];
1376
+ expires_in_min: number;
1377
+ range_15_30m?: {
1378
+ low: number;
1379
+ high: number;
1380
+ optimistic_side: "buy" | "sell";
1381
+ confidence?: number | undefined;
1382
+ } | undefined;
1383
+ protection_limit_px?: number | undefined;
1384
+ } | undefined;
1385
+ ambush?: {
1386
+ confidence: number;
1387
+ action: "wait";
1388
+ reason: string;
1389
+ } | {
1390
+ confidence: number;
1391
+ action: "open_with_bracket";
1392
+ reason: string;
1393
+ side: "buy" | "sell";
1394
+ limit_px: number;
1395
+ sz: number;
1396
+ tp_px: number;
1397
+ sl_px: number;
1398
+ is_market: boolean;
1399
+ risk_flags: string[];
1400
+ protection_limit_px?: number | undefined;
1401
+ } | {
1402
+ confidence: number;
1403
+ action: "close_position";
1404
+ reason: string;
1405
+ method: "market" | "limit";
1406
+ limit_px?: number | undefined;
1407
+ tp_unreachable?: boolean | undefined;
1408
+ } | {
1409
+ action: "cancel_all";
1410
+ reason: string;
1411
+ } | {
1412
+ confidence: number;
1413
+ action: "place_limit_ambush";
1414
+ reason: string;
1415
+ side: "buy" | "sell";
1416
+ limit_px: number;
1417
+ sz: number;
1418
+ tp_px: number;
1419
+ sl_px: number;
1420
+ is_market: boolean;
1421
+ risk_flags: string[];
1422
+ expires_in_min: number;
1423
+ range_15_30m?: {
1424
+ low: number;
1425
+ high: number;
1426
+ optimistic_side: "buy" | "sell";
1427
+ confidence?: number | undefined;
1428
+ } | undefined;
1429
+ protection_limit_px?: number | undefined;
1430
+ } | undefined;
1431
+ }, {
1432
+ analysis: {
1433
+ indicators: string;
1434
+ elliott_wave: string;
1435
+ chan_theory: string;
1436
+ price_targets?: {
1437
+ level: number;
1438
+ label: string;
1439
+ time_est: string;
1440
+ probability?: number | undefined;
1441
+ }[] | undefined;
1442
+ time_horizon?: string | undefined;
1443
+ range_15_30m?: {
1444
+ low: number;
1445
+ high: number;
1446
+ optimistic_side: "buy" | "sell";
1447
+ confidence?: number | undefined;
1448
+ } | undefined;
1449
+ };
1450
+ scalp?: {
1451
+ confidence: number;
1452
+ action: "wait";
1453
+ reason: string;
1454
+ } | {
1455
+ confidence: number;
1456
+ action: "open_with_bracket";
1457
+ reason: string;
1458
+ side: "buy" | "sell";
1459
+ limit_px: number;
1460
+ sz: number;
1461
+ tp_px: number;
1462
+ sl_px: number;
1463
+ is_market?: boolean | undefined;
1464
+ protection_limit_px?: number | undefined;
1465
+ risk_flags?: string[] | undefined;
1466
+ } | {
1467
+ confidence: number;
1468
+ action: "close_position";
1469
+ reason: string;
1470
+ method: "market" | "limit";
1471
+ limit_px?: number | undefined;
1472
+ tp_unreachable?: boolean | undefined;
1473
+ } | {
1474
+ action: "cancel_all";
1475
+ reason: string;
1476
+ } | {
1477
+ confidence: number;
1478
+ action: "place_limit_ambush";
1479
+ reason: string;
1480
+ side: "buy" | "sell";
1481
+ limit_px: number;
1482
+ sz: number;
1483
+ tp_px: number;
1484
+ sl_px: number;
1485
+ expires_in_min: number;
1486
+ range_15_30m?: {
1487
+ low: number;
1488
+ high: number;
1489
+ optimistic_side: "buy" | "sell";
1490
+ confidence?: number | undefined;
1491
+ } | undefined;
1492
+ is_market?: boolean | undefined;
1493
+ protection_limit_px?: number | undefined;
1494
+ risk_flags?: string[] | undefined;
1495
+ } | undefined;
1496
+ ambush?: {
1497
+ confidence: number;
1498
+ action: "wait";
1499
+ reason: string;
1500
+ } | {
1501
+ confidence: number;
1502
+ action: "open_with_bracket";
1503
+ reason: string;
1504
+ side: "buy" | "sell";
1505
+ limit_px: number;
1506
+ sz: number;
1507
+ tp_px: number;
1508
+ sl_px: number;
1509
+ is_market?: boolean | undefined;
1510
+ protection_limit_px?: number | undefined;
1511
+ risk_flags?: string[] | undefined;
1512
+ } | {
1513
+ confidence: number;
1514
+ action: "close_position";
1515
+ reason: string;
1516
+ method: "market" | "limit";
1517
+ limit_px?: number | undefined;
1518
+ tp_unreachable?: boolean | undefined;
1519
+ } | {
1520
+ action: "cancel_all";
1521
+ reason: string;
1522
+ } | {
1523
+ confidence: number;
1524
+ action: "place_limit_ambush";
1525
+ reason: string;
1526
+ side: "buy" | "sell";
1527
+ limit_px: number;
1528
+ sz: number;
1529
+ tp_px: number;
1530
+ sl_px: number;
1531
+ expires_in_min: number;
1532
+ range_15_30m?: {
1533
+ low: number;
1534
+ high: number;
1535
+ optimistic_side: "buy" | "sell";
1536
+ confidence?: number | undefined;
1537
+ } | undefined;
1538
+ is_market?: boolean | undefined;
1539
+ protection_limit_px?: number | undefined;
1540
+ risk_flags?: string[] | undefined;
1541
+ } | undefined;
1542
+ }>;
1543
+ export type DualAdvisorResponse = z.infer<typeof DualAdvisorResponseSchema>;
1544
+ export declare function parseDualAdvisorResponse(raw: string): DualAdvisorResponse;
1545
+ /** Flatten dual response into executable actions (wait skipped). */
1546
+ export declare function dualActionsFromResponse(resp: DualAdvisorResponse): Array<{
1547
+ strategy: "scalp" | "ambush";
1548
+ action: AdvisorAction;
1549
+ }>;
1550
+ export {};
417
1551
  //# sourceMappingURL=actionSchema.d.ts.map