dexbot 1.6.13 → 1.6.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.
Files changed (93) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +2 -2
  3. package/claw/docs/AI_BOT_LIBRARY_API.md +1 -1
  4. package/claw/docs/DEXBOT2_TUNING_CHEAT_SHEET.md +4 -4
  5. package/claw/modules/claw_catalog.ts +8 -4
  6. package/claw/modules/dexbot_profiles.ts +59 -15
  7. package/claw/modules/types.ts +2 -1
  8. package/claw/package.json +1 -1
  9. package/claw/runtimes/openclaw-plugin/openclaw.plugin.json +1 -1
  10. package/claw/runtimes/openclaw-plugin/package.json +1 -1
  11. package/claw/skills/margin-trading/SKILL.md +1 -1
  12. package/claw/skills/margin-trading/references/position-management.md +1 -1
  13. package/dist/analysis/tradingview/tradingview_uplot_chart_generator.js +25 -25
  14. package/dist/modules/account_bots.d.ts +7 -6
  15. package/dist/modules/account_bots.js +10 -10
  16. package/dist/modules/account_orders.d.ts +36 -4
  17. package/dist/modules/account_orders.js +76 -5
  18. package/dist/modules/bitshares-native/crypto/ecc_core.d.ts +1 -2
  19. package/dist/modules/bitshares-native/crypto/ecc_core.js +1 -1
  20. package/dist/modules/bitshares-native/serial/chain_constants.d.ts +1 -2
  21. package/dist/modules/bitshares-native/serial/chain_constants.js +1 -2
  22. package/dist/modules/bot_defaults.d.ts +16 -2
  23. package/dist/modules/bot_defaults.js +34 -8
  24. package/dist/modules/bot_settings.d.ts +4 -0
  25. package/dist/modules/bot_settings.js +55 -21
  26. package/dist/modules/config.js +6 -1
  27. package/dist/modules/constants.d.ts +7 -5
  28. package/dist/modules/constants.js +12 -5
  29. package/dist/modules/dexbot_class.d.ts +5 -0
  30. package/dist/modules/dexbot_class.js +8 -3
  31. package/dist/modules/dexbot_cow_runtime.d.ts +62 -174
  32. package/dist/modules/dexbot_cow_runtime.js +331 -46
  33. package/dist/modules/dexbot_credential_client.d.ts +1 -16
  34. package/dist/modules/dexbot_credential_client.js +1 -1
  35. package/dist/modules/dexbot_fill_runtime.d.ts +1 -1
  36. package/dist/modules/dexbot_fill_runtime.js +12 -1
  37. package/dist/modules/dexbot_maintenance_runtime.d.ts +18 -80
  38. package/dist/modules/dexbot_maintenance_runtime.js +57 -68
  39. package/dist/modules/dexbot_startup_runtime.js +12 -0
  40. package/dist/modules/dexbot_state_recovery.js +16 -0
  41. package/dist/modules/key_store.d.ts +0 -5
  42. package/dist/modules/key_store.js +1 -1
  43. package/dist/modules/order/accounting.js +11 -11
  44. package/dist/modules/order/export.js +2 -2
  45. package/dist/modules/order/format.d.ts +15 -1
  46. package/dist/modules/order/format.js +19 -1
  47. package/dist/modules/order/genesis_policy.d.ts +1 -1
  48. package/dist/modules/order/genesis_policy.js +1 -1
  49. package/dist/modules/order/grid.d.ts +23 -11
  50. package/dist/modules/order/grid.js +383 -51
  51. package/dist/modules/order/grid_reconcile.d.ts +1 -1
  52. package/dist/modules/order/grid_reconcile.js +5 -5
  53. package/dist/modules/order/grid_reconcile_internal.js +48 -40
  54. package/dist/modules/order/index.d.ts +34 -8
  55. package/dist/modules/order/logger.js +2 -2
  56. package/dist/modules/order/manager.d.ts +9 -2
  57. package/dist/modules/order/manager.js +58 -24
  58. package/dist/modules/order/strategy.d.ts +2 -2
  59. package/dist/modules/order/strategy.js +51 -21
  60. package/dist/modules/order/sync_engine.js +4 -0
  61. package/dist/modules/order/utils/math.d.ts +3 -3
  62. package/dist/modules/order/utils/math.js +38 -27
  63. package/dist/modules/order/utils/order.d.ts +58 -58
  64. package/dist/modules/order/utils/order.js +119 -102
  65. package/dist/modules/order/utils/system.d.ts +193 -6
  66. package/dist/modules/order/utils/system.js +392 -29
  67. package/dist/modules/order/utils/validate.js +26 -4
  68. package/dist/modules/runtime_settings.d.ts +1 -1
  69. package/dist/modules/runtime_settings.js +3 -3
  70. package/dist/modules/types.d.ts +48 -4
  71. package/dist/scripts/analyze-orders.d.ts +1 -1
  72. package/dist/scripts/analyze-orders.js +4 -4
  73. package/dist/scripts/divergence-calc.js +6 -6
  74. package/dist/scripts/validate_bots.d.ts +1 -1
  75. package/dist/scripts/validate_bots.js +3 -3
  76. package/dist/unlock.js +7 -2
  77. package/docs/COPY_ON_WRITE_MASTER_PLAN.md +1 -2
  78. package/docs/COW_INVARIANTS.md +6 -6
  79. package/docs/DEXBOT_COMPARISON.md +5 -5
  80. package/docs/EVOLUTION.md +8 -7
  81. package/docs/FUND_MOVEMENT_AND_ACCOUNTING.md +8 -6
  82. package/docs/GRID_PRICE_INVARIANT.md +3 -3
  83. package/docs/GRID_RECALCULATION.md +4 -1
  84. package/docs/GRID_RECONCILE.md +4 -4
  85. package/docs/LIFECYCLE.md +11 -11
  86. package/docs/LOGGING.md +14 -0
  87. package/docs/MPA_CREDIT_USAGE.md +1 -1
  88. package/docs/ORDER_ENGINE_POST_1.0_RETROSPECTIVE.md +12 -4
  89. package/docs/README.md +3 -3
  90. package/docs/architecture.md +6 -6
  91. package/docs/developer_guide.md +7 -2
  92. package/package.json +1 -1
  93. package/tests/README.md +1 -1
@@ -21,7 +21,7 @@ import * as chainOrdersModule from './chain_orders.js';
21
21
  export declare function isEvacuationStampStillValid(liveBoundary: unknown, liveGapSlots: unknown, sourceId: unknown, destId: unknown, orderType: unknown): boolean;
22
22
  import * as workingGridModule from './order/working_grid.js';
23
23
  declare const WorkingGrid: typeof workingGridModule.WorkingGrid;
24
- import type { BotLike, OrderManagerLike, ManagedOrder, ChainOrder, UnknownRecord, AssetInfo, CowAction } from './types.js';
24
+ import type { BotLike, OrderManagerLike, ManagedOrder, ChainOrder, UnknownRecord, CowAction } from './types.js';
25
25
  /** Loose JSON-object view. */
26
26
  type JsonObj = UnknownRecord;
27
27
  /** Final integer tuple for a planned order op. */
@@ -58,11 +58,6 @@ export interface CowResult extends JsonObj {
58
58
  refillSlotIds?: string[];
59
59
  fills?: unknown[];
60
60
  }
61
- /** A CREATE op context with its resolved order + integer tuple. */
62
- type CreateContext = OpPhase & {
63
- finalInts: FinalInts;
64
- order: ManagedOrder;
65
- };
66
61
  /** A chain order enriched with the loose fields COW recovery reads. */
67
62
  export interface ChainOrderLike extends ChainOrder {
68
63
  type?: unknown;
@@ -76,14 +71,6 @@ export interface ChainOrderLike extends ChainOrder {
76
71
  price?: unknown;
77
72
  order?: JsonObj;
78
73
  }
79
- /** Normalized integer tuple used by pending-broadcast recovery. */
80
- interface NormalizedChainOrder {
81
- side: string;
82
- assetA: string;
83
- assetB: string;
84
- sellInt: number;
85
- receiveInt: number;
86
- }
87
74
  /** A COW operation context (create/update/cancel/rotation). */
88
75
  export interface OpPhase extends JsonObj {
89
76
  kind?: unknown;
@@ -105,24 +92,6 @@ declare function buildOutsideInPairGroupsForOrders(orders: ManagedOrder[]): unkn
105
92
  * @returns {Array<Array>}
106
93
  */
107
94
  declare function buildOutsideInPairGroupsForCreateEntries(createEntries: PendingEntry[]): unknown[][];
108
- /**
109
- * Extract operation results from a batch transaction result.
110
- * @param {Object|Array|null} result
111
- * @param {string} [warnContext='']
112
- * @param {Function} [logFn] - Optional logger function, called with (msg, level) on unrecognized shape
113
- * @returns {Array}
114
- */
115
- declare function extractOperationResults(result: unknown, warnContext?: string, logFn?: ((message: string, level?: string) => void) | null): unknown[];
116
- /**
117
- * Find CREATE operation contexts whose broadcast result did not include a chain order id.
118
- * @param {Array} operationResults
119
- * @param {Array} opContexts
120
- * @returns {Array<{index:number, ctx:Object}>}
121
- */
122
- declare function findMissingCreateResultContexts(operationResults: unknown, opContexts: unknown): {
123
- index: number;
124
- ctx: OpPhase;
125
- }[];
126
95
  /**
127
96
  * Merge missing CREATE result contexts into manager._lastUnmatchedChainOrders.
128
97
  * @param {import('./dexbot_class.js').DEXBot} bot
@@ -158,21 +127,6 @@ declare function recordPendingBroadcast(bot: BotLike, entry: PendingEntry & {
158
127
  * @param {Map} pendingBroadcasts
159
128
  */
160
129
  declare function clearPendingBroadcasts(pendingBroadcasts: unknown): void;
161
- /**
162
- * Drop only the pending-broadcast entries for the given CREATE slots.
163
- *
164
- * Used by the re-plan path: the original plan's ops are abandoned with its
165
- * working grid, so their pending entries must not trip the recursion's own
166
- * pending-broadcast guard. Entries recorded by an EARLIER unresolved batch
167
- * (different slots) are KEPT — clearing them here would let the fresh plan
168
- * re-create slots whose earlier uncertain broadcast may have landed
169
- * (duplicate orders). The batch-entry guard only fires for batches WITH
170
- * CREATE actions, so a create-less batch can reach the re-plan path while
171
- * earlier entries are still live.
172
- * @param {import('./dexbot_class.js').DEXBot} bot
173
- * @param {Array} actions - The abandoned batch's actions (COW_ACTIONS)
174
- */
175
- declare function clearPendingBroadcastsForSlots(bot: BotLike, actions: JsonObj[]): void;
176
130
  /**
177
131
  * Pop a pushed working-grid stack entry exactly once, guarded on the push
178
132
  * marker (manager-owned discipline — see OrderManager._pushWorkingGridRef /
@@ -184,23 +138,6 @@ declare function clearPendingBroadcastsForSlots(bot: BotLike, actions: JsonObj[]
184
138
  * @param {Object} cowResult - Rebalance/COW result carrying _workingGridPushed
185
139
  */
186
140
  declare function popPushedWorkingGrid(bot: BotLike, cowResult: JsonObj): void;
187
- /**
188
- * Build a fingerprint for an on-chain order so it can be matched against
189
- * the pending-broadcast cache.
190
- * @param {import('./dexbot_class.js').DEXBot} bot
191
- * @param {Object} chainOrder
192
- * @param {string} slotId
193
- * @returns {string|null}
194
- */
195
- declare function buildChainOrderFingerprint(bot: BotLike, chainOrder: ChainOrderLike, slotId: string): string | null;
196
- /**
197
- * Normalize raw BitShares limit_order_object data into the integer tuple
198
- * used by pending-broadcast recovery.
199
- * @param {import('./dexbot_class.js').DEXBot} bot
200
- * @param {Object} chainOrder
201
- * @returns {{side: string, assetA: string, assetB: string, sellInt: number, receiveInt: number}|null}
202
- */
203
- declare function normalizeChainOrderForPendingMatch(bot: BotLike, chainOrder: ChainOrderLike): NormalizedChainOrder | null;
204
141
  /**
205
142
  * Find a chain order that matches a planned slot using price+size proximity.
206
143
  * @param {import('./dexbot_class.js').DEXBot} bot
@@ -241,27 +178,6 @@ declare function reconcileAfterUncertainBroadcast(bot: BotLike, err: unknown, op
241
178
  * @returns {Promise<number>} discardedCount
242
179
  */
243
180
  declare function restoreDiscardedCreates(bot: BotLike, discarded: PendingEntry[], opContexts: OpPhase[]): Promise<number>;
244
- /**
245
- * Reconcile a broadcast whose chain state is unknown (implementation).
246
- * @param {import('./dexbot_class.js').DEXBot} bot
247
- * @param {BroadcastUncertainError} err
248
- * @param {Array<Object>} opContexts
249
- * @param {Object} options
250
- * @returns {Promise<Object>}
251
- */
252
- declare function reconcileAfterUncertainBroadcastImpl(bot: BotLike, err: unknown, opContexts: OpPhase[], _options: JsonObj): Promise<UnknownRecord | {
253
- executed: boolean;
254
- hadRotation: boolean;
255
- uncertain: boolean;
256
- ambiguousRead: boolean;
257
- }>;
258
- /**
259
- * Check whether to execute creates in outside-in pair mode.
260
- * @param {import('./dexbot_class.js').DEXBot} bot
261
- * @param {Array} opContexts
262
- * @returns {boolean}
263
- */
264
- declare function shouldExecuteCreatePairMode(_bot: unknown, opContexts: OpPhase[]): boolean;
265
181
  /**
266
182
  * Execute operations with retry on BroadcastUncertainError.
267
183
  *
@@ -330,42 +246,6 @@ declare function executeChunkedWithRetryOnUncertain(bot: BotLike, operations: un
330
246
  result: unknown;
331
247
  opContexts: OpPhase[];
332
248
  }>;
333
- /**
334
- * Validate that operations can be executed with available funds before broadcasting.
335
- * @param {import('./dexbot_class.js').DEXBot} bot
336
- * @param {Array} operations
337
- * @param {Object} assetA
338
- * @param {Object} assetB
339
- * @returns {Object} { isValid: boolean, summary: string }
340
- */
341
- declare function validateOperationFunds(bot: BotLike, operations: JsonObj[], assetA: AssetInfo, assetB: AssetInfo): {
342
- isValid: boolean;
343
- summary: string;
344
- violations?: JsonObj[];
345
- };
346
- /**
347
- * Resolve the ideal size from an order-like object with fallback.
348
- * @param {import('./dexbot_class.js').DEXBot} bot
349
- * @param {Object|null} orderLike
350
- * @param {number|null} [fallbackSize=null]
351
- * @returns {number|null}
352
- */
353
- declare function resolveIdealSizeForValidation(_bot: unknown, orderLike: JsonObj | null | undefined, fallbackSize?: number | null): number | null;
354
- /**
355
- * Validate that an order size is safe to execute.
356
- * @param {import('./dexbot_class.js').DEXBot} bot
357
- * @param {number} size
358
- * @param {string} type
359
- * @param {Object|null} [orderLike=null]
360
- * @param {number|null} [fallbackSize=null]
361
- * @returns {unknown}
362
- */
363
- declare function validateOrderSizeForExecution(bot: BotLike, size: number, type: string, orderLike?: JsonObj | null, fallbackSize?: number | null): {
364
- isValid: boolean;
365
- reason: string | null;
366
- minAbsoluteSize: number;
367
- minDustSize: number | null;
368
- };
369
249
  declare function checkGridPriceInvariant(slotId: unknown, price: unknown, genesis: unknown): {
370
250
  ok: boolean;
371
251
  reason: string;
@@ -388,10 +268,47 @@ declare function checkGridPriceInvariant(slotId: unknown, price: unknown, genesi
388
268
  * planned price — an undefined grid, which the load and sync gates refuse).
389
269
  */
390
270
  declare function deriveRotationPrice(bot: BotLike, newGridId: unknown): number;
271
+ /**
272
+ * P2 observability (advisory, never blocks): count a BUY emitted at or above
273
+ * the last filled BUY pivot.
274
+ *
275
+ * This is the "re-stamp a just-filled BUY above the anchor" shape the
276
+ * LAST-FILL-GUARD exists to block (`BUY > pivot*(1-half)`), so a counted
277
+ * emission means the guard was bypassed (spread correction / stamped gap
278
+ * evacuation) or the pivot was unjudgeable and the probe failed open. The
279
+ * counter makes a bypass leak visible without changing placement policy —
280
+ * the guard already owns enforcement, and turning this into a second gate
281
+ * would re-introduce the reverted placement-guard class.
282
+ *
283
+ * Warns at most once per batch (keyed on `_currentCycleId`). Never throws.
284
+ *
285
+ * @returns {boolean} true when the emission was counted
286
+ */
287
+ declare function recordRestampBuyAboveAnchor(bot: BotLike, price: unknown, type: unknown): boolean;
288
+ /**
289
+ * Collect non-spread-correction CREATE/UPDATE destinations that sit inside
290
+ * the plan's gap band.
291
+ *
292
+ * Mode C(a) SHADOW: the gap band is not unconditionally illegal — spread
293
+ * correction legitimately places INTO it (the LAST-FILL-GUARD bypass exists
294
+ * for exactly that) and gap evacuation moves an order OUT of it. Excluding
295
+ * those origins leaves the genuinely suspicious set: a rail placement whose
296
+ * destination geometry IS the spread. The result is counted/warned, never
297
+ * blocked (see the guard call site for the revert-history rationale).
298
+ *
299
+ * Pure and never throws. A non-finite boundary/gap selects the empty set.
300
+ *
301
+ * @param {Array<Object>|null} actions - COW actions
302
+ * @param {unknown} boundary - The PLAN's boundary (workingBoundary), not the committed one
303
+ * @param {unknown} gapSlots - Gap slot count
304
+ * @returns {string[]} destinations inside the gap band
305
+ */
306
+ declare function collectGapBandPlacementShadowSlots(actions: CowAction[] | null | undefined, boundary: unknown, gapSlots: unknown): string[];
391
307
  /**
392
308
  * LAST-FILL-GUARD helper — pivot ± halfIncrement (replaces price-tolerance).
393
- * last fill @x with increment i: BUY < x*(1 - i/2/100), SELL > x*(1 + i/2/100)
394
- * e.g. x=1000, i=0.5% => BUY < 997.5, SELL > 1002.5
309
+ * last fill @x with increment i (blocked shapes): BUY > x*(1 - i/2/100),
310
+ * SELL < x*(1 + i/2/100)
311
+ * e.g. x=1000, i=0.5% => BUY > 997.5 and SELL < 1002.5 are blocked
395
312
  * Cold (pivot null or lastType null) => disabled. Spread-correction CREATES
396
313
  * bypass per-action (see broadcast sites); gap-evacuation rotation UPDATEs
397
314
  * bypass only via the violation-reducing allowance (origin='gap-evacuation',
@@ -414,6 +331,26 @@ declare function isLastFillGuardBlocked(price: number, _size: number, type: unkn
414
331
  halfInc?: number;
415
332
  threshold?: number | null;
416
333
  };
334
+ /**
335
+ * Whether a spread-correction CREATE may bypass the LAST-FILL-GUARD.
336
+ *
337
+ * The bypass exists so gap repair can close even after a recent fill (the
338
+ * correction is tightening the spread, not chasing it). It must not become a
339
+ * licence to place THROUGH the market the bot last traded at:
340
+ *
341
+ * 1. A real fill pivot (`lastFillPivotSource === 'fill'`) is always honored —
342
+ * no bypass. A sell below the last fill (or a buy above it) is the
343
+ * issue-#31 adverse fill.
344
+ * 2. A cold/book pivot is a heuristic (book seed) or absent, so the historical
345
+ * fail-open bypass is kept — but only while the LOCAL snapshot is fresh.
346
+ * A stale snapshot (known-unmatched chain orders, or an old sync) can hide
347
+ * the real window edge, so the bypass is withheld and the guard applies.
348
+ *
349
+ * Exported for tests.
350
+ * @param {Object} bot
351
+ * @returns {boolean} True when the bypass may be used
352
+ */
353
+ declare function isSpreadCorrectionBypassAllowed(bot: BotLike): boolean;
417
354
  /**
418
355
  * Refresh the LAST-FILL guard pivot from fills that arrived while the current
419
356
  * batch was being planned or broadcast but have not been ingested yet.
@@ -455,28 +392,6 @@ declare function buildCowResultFromPlan(bot: BotLike, plan: JsonObj): CowResult;
455
392
  * in-place rotations already have their size/price changes in the working grid.
456
393
  */
457
394
  declare function applyRotationTransitionsToWorkingGrid(bot: BotLike, workingGrid: InstanceType<typeof WorkingGrid>, executedContexts: OpPhase[]): void;
458
- /**
459
- * Poll the chain after an uncertain broadcast to check if CREATE operations
460
- * were actually accepted. Uses fingerprint matching against readOpenOrders.
461
- * Falls back to reconciliation if polling cannot confirm within retries.
462
- *
463
- * We specifically confirm CREATE operations because they leave a detectable
464
- * footprint on the chain (new order with matching fingerprint). UPDATEs and
465
- * CANCELs modify existing orders and cannot be reliably distinguished from
466
- * "not yet visible" state by simple polling.
467
- *
468
- * @param {Object} [options]
469
- * @param {number} [options.maxPollRetries] - Poll attempts before reconciliation fallback
470
- * @param {number} [options.pollIntervalMs] - Delay between polls; tests pass 0
471
- * to skip the production 1.5s pacing without changing the poll semantics
472
- * @returns {{ allConfirmed: boolean, confirmed: Array, unconfirmed: Array }}
473
- */
474
- declare function pollChainForConfirmation(bot: BotLike, opContexts: OpPhase[], options?: JsonObj): Promise<{
475
- allConfirmed: boolean;
476
- confirmed: CreateContext[];
477
- unconfirmed: OpPhase[];
478
- confirmedChainIds: string[];
479
- }>;
480
395
  /**
481
396
  * Normalize a producer-supplied refillSlotIds wire into a Set.
482
397
  * Absent/empty/non-array => empty (guarded default, never fail-open).
@@ -521,14 +436,6 @@ declare function resolveRefillBoundaryHold(workingBoundary: unknown, committedBo
521
436
  * @returns {number} Consecutive-hold count after this batch (0 when clear)
522
437
  */
523
438
  declare function trackBoundaryHold(manager: OrderManagerLike, held: boolean, keptBoundary: unknown, plannedBoundary: unknown, heldSlotIds: string[]): number;
524
- /**
525
- * Restore skipped update slots in the working grid to master state.
526
- * @param {import('./dexbot_class.js').DEXBot} bot
527
- * @param {unknown} workingGrid
528
- * @param {Set<string>} skippedSlotIds
529
- * @param {number} [skippedCount=0]
530
- */
531
- declare function restoreSkippedUpdateSlotsInWorkingGrid(bot: BotLike, workingGrid: InstanceType<typeof WorkingGrid>, skippedSlotIds: Set<string> | null | undefined, skippedCount?: number): void;
532
439
  declare function updateOrdersOnChainBatchCOW(bot: BotLike, cowResult: CowResult, options?: JsonObj): Promise<JsonObj>;
533
440
  declare function adoptPlacedBatchFromChain(bot: BotLike, chainOrders: typeof chainOrdersModule, logPrefix: string, opts?: JsonObj): Promise<boolean>;
534
441
  /**
@@ -641,42 +548,23 @@ declare function processBatchResults(bot: BotLike, result: JsonObj, opContexts:
641
548
  hadRotation: boolean;
642
549
  updateOperationCount: number;
643
550
  }>;
644
- export { isLastFillGuardBlocked, resolveOnGridPivot, checkGridPriceInvariant, deriveRotationPrice, refreshLastFillPivotFromQueue, runFinalPivotGate, buildOutsideInPairGroupsForOrders, buildOutsideInPairGroupsForCreateEntries, markMissingCreateResultsAsStructuralBlocker, formatUnmatchedChainOrderForLog, recordPendingBroadcast, clearPendingBroadcasts, popPushedWorkingGrid, findChainOrderForSlot, reconcileAfterUncertainBroadcast, reconcileAfterUncertainBroadcastImpl, executeWithRetryOnUncertain, executeChunkedWithRetryOnUncertain, formatPartialBroadcastSummary, buildActionsFromPlan, buildCowResultFromPlan, applyRotationTransitionsToWorkingGrid, pollChainForConfirmation, updateOrdersOnChainBatchCOW, processBatchResults, adoptPlacedBatchFromChain, resolveRefillBoundaryHold, toRefillSlotIdSet, trackBoundaryHold };
551
+ export { isSpreadCorrectionBypassAllowed, isLastFillGuardBlocked, resolveOnGridPivot, checkGridPriceInvariant, recordRestampBuyAboveAnchor, collectGapBandPlacementShadowSlots, deriveRotationPrice, refreshLastFillPivotFromQueue, runFinalPivotGate, buildOutsideInPairGroupsForOrders, buildOutsideInPairGroupsForCreateEntries, markMissingCreateResultsAsStructuralBlocker, formatUnmatchedChainOrderForLog, recordPendingBroadcast, clearPendingBroadcasts, popPushedWorkingGrid, findChainOrderForSlot, reconcileAfterUncertainBroadcast, executeWithRetryOnUncertain, executeChunkedWithRetryOnUncertain, formatPartialBroadcastSummary, buildActionsFromPlan, buildCowResultFromPlan, applyRotationTransitionsToWorkingGrid, updateOrdersOnChainBatchCOW, processBatchResults, adoptPlacedBatchFromChain, resolveRefillBoundaryHold, toRefillSlotIdSet, trackBoundaryHold };
645
552
  export { restoreDiscardedCreates };
646
553
  declare const _default: {
647
554
  buildOutsideInPairGroupsForOrders: typeof buildOutsideInPairGroupsForOrders;
648
555
  buildOutsideInPairGroupsForCreateEntries: typeof buildOutsideInPairGroupsForCreateEntries;
649
- extractOperationResults: typeof extractOperationResults;
650
- findMissingCreateResultContexts: typeof findMissingCreateResultContexts;
651
556
  markMissingCreateResultsAsStructuralBlocker: typeof markMissingCreateResultsAsStructuralBlocker;
652
557
  formatUnmatchedChainOrderForLog: typeof formatUnmatchedChainOrderForLog;
653
558
  recordPendingBroadcast: typeof recordPendingBroadcast;
654
559
  clearPendingBroadcasts: typeof clearPendingBroadcasts;
655
- clearPendingBroadcastsForSlots: typeof clearPendingBroadcastsForSlots;
656
- popPushedWorkingGrid: typeof popPushedWorkingGrid;
657
- buildChainOrderFingerprint: typeof buildChainOrderFingerprint;
658
- normalizeChainOrderForPendingMatch: typeof normalizeChainOrderForPendingMatch;
659
560
  findChainOrderForSlot: typeof findChainOrderForSlot;
660
561
  reconcileAfterUncertainBroadcast: typeof reconcileAfterUncertainBroadcast;
661
- reconcileAfterUncertainBroadcastImpl: typeof reconcileAfterUncertainBroadcastImpl;
662
- shouldExecuteCreatePairMode: typeof shouldExecuteCreatePairMode;
663
562
  executeWithRetryOnUncertain: typeof executeWithRetryOnUncertain;
664
563
  executeChunkedWithRetryOnUncertain: typeof executeChunkedWithRetryOnUncertain;
665
- formatPartialBroadcastSummary: typeof formatPartialBroadcastSummary;
666
- validateOperationFunds: typeof validateOperationFunds;
667
- resolveIdealSizeForValidation: typeof resolveIdealSizeForValidation;
668
- validateOrderSizeForExecution: typeof validateOrderSizeForExecution;
669
- buildActionsFromPlan: typeof buildActionsFromPlan;
564
+ popPushedWorkingGrid: typeof popPushedWorkingGrid;
670
565
  buildCowResultFromPlan: typeof buildCowResultFromPlan;
671
- restoreSkippedUpdateSlotsInWorkingGrid: typeof restoreSkippedUpdateSlotsInWorkingGrid;
672
- resolveRefillBoundaryHold: typeof resolveRefillBoundaryHold;
673
- toRefillSlotIdSet: typeof toRefillSlotIdSet;
674
- trackBoundaryHold: typeof trackBoundaryHold;
675
- applyRotationTransitionsToWorkingGrid: typeof applyRotationTransitionsToWorkingGrid;
676
- pollChainForConfirmation: typeof pollChainForConfirmation;
677
566
  updateOrdersOnChainBatchCOW: typeof updateOrdersOnChainBatchCOW;
678
567
  processBatchResults: typeof processBatchResults;
679
- runFinalPivotGate: typeof runFinalPivotGate;
680
568
  };
681
569
  export default _default;
682
570
  //# sourceMappingURL=dexbot_cow_runtime.d.ts.map