@t2000/engine 1.2.1 → 1.4.0

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/README.md CHANGED
@@ -261,8 +261,11 @@ The `submitMessage()` async generator yields `EngineEvent`:
261
261
  | Event | Fields | When |
262
262
  |-------|--------|------|
263
263
  | `text_delta` | `text` | LLM streams a text chunk |
264
- | `thinking_delta` | `text` | Extended thinking chunk (reasoning accordion) |
265
- | `thinking_done` | | Extended thinking complete |
264
+ | `thinking_delta` | `text`, `blockIndex` | Extended thinking chunk (reasoning accordion). **`blockIndex`** identifies which thinking block this delta belongs to so hosts can render multi-block thinking chronologically (Anthropic streams ≥1 thinking blocks per turn at high effort). |
265
+ | `thinking_done` | `blockIndex`, `signature?`, `summaryMode?`, `evaluationItems?` | Extended thinking block complete. `blockIndex` matches the `thinking_delta` events for that block. **`summaryMode`** flips true and **`evaluationItems`** is populated when the block contained a parseable `<eval_summary>` marker — hosts render `HowIEvaluatedBlock` ("✦ HOW I EVALUATED THIS") from these fields. |
266
+ | `todo_update` | `items`, `toolUseId` | **[SPEC 8 v0.5.1]** Side-channel event paired to every `update_todo` tool call. `items` is the full `TodoItem[]` array; hosts unconditionally replace their rendered list (the tool is idempotent). `toolUseId` keys the render to the originating call. |
267
+ | `tool_progress` | `toolUseId`, `toolName`, `message`, `pct?` | **[SPEC 8 v0.5.1]** Mid-execution progress signal from long-running tools (Cetus swap, protocol_deep_dive, portfolio_analysis). Tools opt in via `context.progress?.(msg, pct?)`. Engine wiring lands with the Cetus SDK integration in a follow-on slice. |
268
+ | `pending_input` | `schema`, `inputId`, `prompt?` | **[SPEC 8 v0.5.1, D2]** Reserved for SPEC 9 v0.1.2 inline forms. Engine doesn't emit under SPEC 8 — host adds a no-op handler now to avoid crashing when SPEC 9 ships emission. |
266
269
  | `tool_start` | `toolName`, `toolUseId`, `input` | Tool execution begins |
267
270
  | `tool_result` | `toolName`, `toolUseId`, `result`, `isError` | Tool execution completes |
268
271
  | `pending_action` | `action` (PendingAction with `attemptId`, `toolUseId`, `turnIndex`, `name`, `input`) | Write tool awaiting client-side execution. `attemptId` is a per-yield UUID — hosts persist it on TurnMetrics and key the resume `updateMany` on it (avoids ambiguous `(sessionId, turnIndex)` updates) |
package/dist/index.d.ts CHANGED
@@ -584,6 +584,34 @@ declare function toolNameToOperation(toolName: string): PermissionOperation | un
584
584
  */
585
585
  declare function resolveUsdValue(toolName: string, input: Record<string, unknown>, priceCache: Map<string, number>): number;
586
586
 
587
+ type EvaluationStatus = 'good' | 'warning' | 'critical' | 'info';
588
+ interface EvaluationItem {
589
+ label: string;
590
+ status: EvaluationStatus;
591
+ note?: string;
592
+ }
593
+ interface EvalSummaryParseResult {
594
+ /** Always true when this object is returned (vs null when absent). */
595
+ summaryMode: true;
596
+ /** The structured rows the host renders inside the trust card. */
597
+ evaluationItems: EvaluationItem[];
598
+ /** Count of markers detected — >1 indicates an LLM compliance violation. */
599
+ markerCount: number;
600
+ }
601
+ /**
602
+ * Scan a thinking-block text for one or more `<eval_summary>` markers.
603
+ *
604
+ * - Returns null when no marker is present, or when the first marker's
605
+ * JSON is malformed (host falls back to standard rendering).
606
+ * - Returns a parsed result when at least one marker contains valid JSON.
607
+ * `markerCount` reflects the total number of markers seen so the
608
+ * engine can emit a `evalSummaryViolationsCount` telemetry counter
609
+ * when N > 1 (LLM is supposed to emit at most one per turn).
610
+ *
611
+ * The function is pure — safe to call per-thinking-block.
612
+ */
613
+ declare function parseEvalSummary(thinkingText: string): EvalSummaryParseResult | null;
614
+
587
615
  type ContentBlock = {
588
616
  type: 'text';
589
617
  text: string;
@@ -609,12 +637,34 @@ interface Message {
609
637
  role: 'user' | 'assistant';
610
638
  content: ContentBlock[];
611
639
  }
612
- type EngineEvent = {
640
+ type EngineEvent =
641
+ /**
642
+ * [SPEC 8 v0.5.1] `blockIndex` identifies which thinking block this delta
643
+ * belongs to. Anthropic streams multi-block thinking with rising indices
644
+ * across each turn (block 0, 1, 2, ...). Hosts use this to render
645
+ * chronologically interleaved thinking accordions instead of flattening
646
+ * every delta into one string. Backwards-compatible: older hosts that
647
+ * ignore the field still see deltas in emission order.
648
+ */
649
+ {
613
650
  type: 'thinking_delta';
614
651
  text: string;
615
- } | {
652
+ blockIndex: number;
653
+ }
654
+ /**
655
+ * [SPEC 8 v0.5.1] When the thinking block contained a parseable
656
+ * `<eval_summary>...</eval_summary>` marker, `summaryMode` flips true
657
+ * and `evaluationItems` carries the structured rows. Hosts render the
658
+ * `HowIEvaluatedBlock` ("✦ HOW I EVALUATED THIS") trust card from
659
+ * these fields. Both undefined when the block had no marker (every
660
+ * read-only and most write turns).
661
+ */
662
+ | {
616
663
  type: 'thinking_done';
664
+ blockIndex: number;
617
665
  signature?: string;
666
+ summaryMode?: boolean;
667
+ evaluationItems?: EvaluationItem[];
618
668
  } | {
619
669
  type: 'text_delta';
620
670
  text: string;
@@ -682,7 +732,70 @@ type EngineEvent = {
682
732
  */
683
733
  | {
684
734
  type: 'compaction';
735
+ }
736
+ /**
737
+ * [SPEC 8 v0.5.1] Side-channel event paired to every `update_todo` tool
738
+ * call. Hosts render the persistent todo card from this event (NOT from
739
+ * the tool_result — see `tools/update-todo.ts` § "side-channel" for
740
+ * rationale). Carries the full items array so the host can
741
+ * unconditionally replace its rendered list (the tool is idempotent —
742
+ * each call replaces the previous state). `toolUseId` lets the host
743
+ * key the render cell to the originating tool call.
744
+ */
745
+ | {
746
+ type: 'todo_update';
747
+ items: TodoItem$1[];
748
+ toolUseId: string;
749
+ }
750
+ /**
751
+ * [SPEC 8 v0.5.1] Mid-execution progress signal from a long-running tool
752
+ * (Cetus swap_execute 2-5s, protocol_deep_dive 3-8s, portfolio_analysis
753
+ * 1-2s). Tools opt in by calling `context.progress?.(msg, pct?)` from
754
+ * inside their `call` implementation. Hosts render the message + bar
755
+ * inside the corresponding tool block's spinner — kills the dead-air
756
+ * static-spinner UX that's the explicit SPEC 8 v0.3 fix target.
757
+ *
758
+ * Engine wiring (queue-and-yield in the dispatcher) lands with the
759
+ * Cetus integration in a follow-on slice. SPEC 8 v0.5.1 reserves the
760
+ * event type now so hosts can pre-wire the renderer.
761
+ *
762
+ * `pct` is 0–100 when the tool can express progress quantitatively,
763
+ * undefined otherwise (free-text status only).
764
+ */
765
+ | {
766
+ type: 'tool_progress';
767
+ toolUseId: string;
768
+ toolName: string;
769
+ message: string;
770
+ pct?: number;
771
+ }
772
+ /**
773
+ * [SPEC 8 v0.5.1, D2] Inline-form structured input event reserved for
774
+ * SPEC 9 v0.1.2 (`pending_input` form primitive). The engine does NOT
775
+ * emit this event under SPEC 8 — the type is reserved so legacy hosts
776
+ * can add a no-op handler now and avoid crashing when SPEC 9 ships
777
+ * `pending_input` emission. See SPEC 8 § "v0.5 cross-spec coupling
778
+ * fixes" — gap D2 — for the forward-compat rationale.
779
+ */
780
+ | {
781
+ type: 'pending_input';
782
+ /** Form schema (shape locked in SPEC 9 v0.1.2; engine treats it opaquely). */
783
+ schema: unknown;
784
+ /** Engine round-trip identifier — host posts the answer back keyed on this. */
785
+ inputId: string;
786
+ /** Optional human-readable prompt the LLM wants the host to display above the form. */
787
+ prompt?: string;
685
788
  };
789
+ /**
790
+ * [SPEC 8 v0.5.1] One row in an `update_todo` payload. Mirrored from
791
+ * `packages/engine/src/tools/update-todo.ts`. Kept here so hosts that
792
+ * consume `EngineEvent` don't need to depend on the tool module.
793
+ */
794
+ interface TodoItem$1 {
795
+ id: string;
796
+ label: string;
797
+ status: 'pending' | 'in_progress' | 'completed';
798
+ }
686
799
  type StopReason = 'end_turn' | 'tool_use' | 'max_tokens' | 'max_turns' | 'error';
687
800
  /**
688
801
  * [v1.4 Item 6] Describes a single input field on a `PendingAction` that
@@ -1057,10 +1170,14 @@ interface ToolDefinition {
1057
1170
  type ProviderEvent = {
1058
1171
  type: 'thinking_delta';
1059
1172
  text: string;
1173
+ blockIndex: number;
1060
1174
  } | {
1061
1175
  type: 'thinking_done';
1176
+ blockIndex: number;
1062
1177
  thinking: string;
1063
1178
  signature: string;
1179
+ summaryMode?: boolean;
1180
+ evaluationItems?: EvaluationItem[];
1064
1181
  } | {
1065
1182
  type: 'redacted_thinking';
1066
1183
  data: string;
@@ -1276,9 +1393,13 @@ declare function findTool(tools: Tool[], name: string): Tool | undefined;
1276
1393
  type SSEEvent = {
1277
1394
  type: 'thinking_delta';
1278
1395
  text: string;
1396
+ blockIndex: number;
1279
1397
  } | {
1280
1398
  type: 'thinking_done';
1399
+ blockIndex: number;
1281
1400
  signature?: string;
1401
+ summaryMode?: boolean;
1402
+ evaluationItems?: EvaluationItem[];
1282
1403
  } | {
1283
1404
  type: 'text_delta';
1284
1405
  text: string;
@@ -1317,6 +1438,21 @@ type SSEEvent = {
1317
1438
  data: unknown;
1318
1439
  title: string;
1319
1440
  toolUseId: string;
1441
+ } | {
1442
+ type: 'todo_update';
1443
+ items: TodoItem$1[];
1444
+ toolUseId: string;
1445
+ } | {
1446
+ type: 'tool_progress';
1447
+ toolUseId: string;
1448
+ toolName: string;
1449
+ message: string;
1450
+ pct?: number;
1451
+ } | {
1452
+ type: 'pending_input';
1453
+ schema: unknown;
1454
+ inputId: string;
1455
+ prompt?: string;
1320
1456
  };
1321
1457
  declare function serializeSSE(event: SSEEvent): string;
1322
1458
  declare function parseSSE(raw: string): SSEEvent | null;
@@ -1392,6 +1528,24 @@ declare function getToolFlags(name: string): ToolFlags;
1392
1528
  */
1393
1529
  declare function classifyEffort(model: string, userMessage: string, matchedRecipe: Recipe | null, sessionWriteCount: number): ThinkingEffort;
1394
1530
 
1531
+ declare const EFFORT_THINKING_BUDGET_CAPS: Record<ThinkingEffort, number | null>;
1532
+ /**
1533
+ * Clamp a `ThinkingConfig` to the HARD cap for the given effort tier.
1534
+ *
1535
+ * - When `effort === 'low'`, returns `{ type: 'disabled' }` regardless of
1536
+ * input — LEAN tier is non-negotiable.
1537
+ * - When `config.type === 'enabled'` and `config.budgetTokens` exceeds
1538
+ * the cap, returns a copy with `budgetTokens` clamped down.
1539
+ * - When `config.type === 'adaptive'`, returns it unchanged — adaptive
1540
+ * mode is shape-agnostic by design (Anthropic decides per-turn).
1541
+ * - When `effort` is undefined, returns `config` unchanged — caller
1542
+ * hasn't classified the turn yet (back-compat for hosts that don't
1543
+ * route on effort).
1544
+ *
1545
+ * This function is pure and side-effect-free; safe to call per-turn.
1546
+ */
1547
+ declare function clampThinkingForEffort(config: ThinkingConfig | undefined, effort: ThinkingEffort | undefined): ThinkingConfig | undefined;
1548
+
1395
1549
  /**
1396
1550
  * Build a cacheable system prompt array from static and dynamic parts.
1397
1551
  *
@@ -2418,17 +2572,80 @@ declare const activitySummaryTool: Tool<{
2418
2572
  }, ActivitySummary>;
2419
2573
 
2420
2574
  interface ResolveSuinsResult {
2421
- /** The lookup name, lowercased and trimmed. */
2422
- name: string;
2423
- /** The resolved 0x address, or null when the name isn't registered. */
2424
- address: string | null;
2425
- /** True when the name resolves to an address. */
2426
- registered: boolean;
2575
+ /** Direction the lookup ran in. */
2576
+ direction: 'forward' | 'reverse';
2577
+ /** The original query, lowercased. */
2578
+ query: string;
2579
+ /** Forward only: the resolved 0x address (null when unregistered). */
2580
+ address?: string | null;
2581
+ /** Forward only: convenience flag for the LLM. */
2582
+ registered?: boolean;
2583
+ /** Reverse only: every SuiNS name pointing at this address (sorted by registry). */
2584
+ names?: string[];
2585
+ /** Reverse only: the first name in `names` (the conventional "primary"), or null. */
2586
+ primary?: string | null;
2427
2587
  }
2428
2588
  declare const resolveSuinsTool: Tool<{
2429
- name: string;
2589
+ query: string;
2430
2590
  }, ResolveSuinsResult>;
2431
2591
 
2592
+ declare const todoItemSchema: z.ZodObject<{
2593
+ id: z.ZodString;
2594
+ label: z.ZodString;
2595
+ status: z.ZodEnum<["pending", "in_progress", "completed"]>;
2596
+ }, "strip", z.ZodTypeAny, {
2597
+ label: string;
2598
+ status: "pending" | "in_progress" | "completed";
2599
+ id: string;
2600
+ }, {
2601
+ label: string;
2602
+ status: "pending" | "in_progress" | "completed";
2603
+ id: string;
2604
+ }>;
2605
+ declare const inputSchema: z.ZodObject<{
2606
+ items: z.ZodArray<z.ZodObject<{
2607
+ id: z.ZodString;
2608
+ label: z.ZodString;
2609
+ status: z.ZodEnum<["pending", "in_progress", "completed"]>;
2610
+ }, "strip", z.ZodTypeAny, {
2611
+ label: string;
2612
+ status: "pending" | "in_progress" | "completed";
2613
+ id: string;
2614
+ }, {
2615
+ label: string;
2616
+ status: "pending" | "in_progress" | "completed";
2617
+ id: string;
2618
+ }>, "many">;
2619
+ }, "strip", z.ZodTypeAny, {
2620
+ items: {
2621
+ label: string;
2622
+ status: "pending" | "in_progress" | "completed";
2623
+ id: string;
2624
+ }[];
2625
+ }, {
2626
+ items: {
2627
+ label: string;
2628
+ status: "pending" | "in_progress" | "completed";
2629
+ id: string;
2630
+ }[];
2631
+ }>;
2632
+ type TodoItem = z.infer<typeof todoItemSchema>;
2633
+ type UpdateTodoInput = z.infer<typeof inputSchema>;
2634
+ declare const updateTodoTool: Tool<{
2635
+ items: {
2636
+ label: string;
2637
+ status: "pending" | "in_progress" | "completed";
2638
+ id: string;
2639
+ }[];
2640
+ }, {
2641
+ __todoUpdate: boolean;
2642
+ items: {
2643
+ label: string;
2644
+ status: "pending" | "in_progress" | "completed";
2645
+ id: string;
2646
+ }[];
2647
+ }>;
2648
+
2432
2649
  declare const tokenPricesTool: Tool<{
2433
2650
  coinTypes: string[];
2434
2651
  include24hChange?: boolean | undefined;
@@ -2561,6 +2778,23 @@ declare function resolveSuinsViaRpc(rawName: string, ctx?: {
2561
2778
  suiRpcUrl?: string;
2562
2779
  signal?: AbortSignal;
2563
2780
  }): Promise<string | null>;
2781
+ /**
2782
+ * Reverse-resolve a 0x address to its registered SuiNS names via
2783
+ * `suix_resolveNameServiceNames`. Returns the names sorted by the
2784
+ * registry (the first entry is conventionally the user's "primary"
2785
+ * name on dApps that show one), or `[]` when the address has no
2786
+ * SuiNS records. Throws `SuinsRpcError` on RPC/network failure.
2787
+ *
2788
+ * Why this is its own helper (not folded into `normalizeAddressInput`):
2789
+ * a reverse lookup adds a second RPC round-trip per tool call. We don't
2790
+ * want every read tool that takes an `address` to silently double its
2791
+ * latency. The lookup primitive is opt-in via the `resolve_suins` tool;
2792
+ * normalizers stay forward-only.
2793
+ */
2794
+ declare function resolveAddressToSuinsViaRpc(rawAddress: string, ctx?: {
2795
+ suiRpcUrl?: string;
2796
+ signal?: AbortSignal;
2797
+ }): Promise<string[]>;
2564
2798
  interface NormalizedAddress {
2565
2799
  /**
2566
2800
  * Canonical 0x-prefixed lowercase hex address. Always set on success.
@@ -2997,4 +3231,4 @@ declare function getTelemetrySink(): TelemetrySink;
2997
3231
  /** Restore the default noop sink. Used by test teardowns. */
2998
3232
  declare function resetTelemetrySink(): void;
2999
3233
 
3000
- export { type AddressPortfolio, AnthropicProvider, type AnthropicProviderConfig, type AudricHistoryRecord, type AudricPortfolioResult, type AwaitOrFetchOpts, type BalancePrices, type BalanceResult, BalanceTracker, type BuildToolOptions, CANVAS_TEMPLATES, type CanvasTemplate, type ChatParams, type CompactOptions, type ContentBlock, ContextBudget, type ContextBudgetConfig, type ConversationState, type ConversationStateStore, type CostSnapshot, CostTracker, type CostTrackerConfig, DEFAULT_GUARD_CONFIG, DEFAULT_LEASE_SEC, DEFAULT_PERMISSION_CONFIG, DEFAULT_POLL_BUDGET_MS, DEFAULT_POLL_INTERVAL_MS, DEFAULT_SYSTEM_PROMPT, type DefiCacheEntry, type DefiCacheStore, type DefiProtocol, type DefiSummary, EarlyToolDispatcher, type EngineConfig, type EngineEvent, type FetchLock, type GuardCheckResult, type GuardConfig, type GuardEvent, type GuardInjection, type GuardResult, type GuardRunnerState, type GuardTier, type GuardVerdict, type HealthFactorResult, InMemoryDefiCacheStore, InMemoryFetchLock, InMemoryNaviCacheStore, InMemoryWalletCacheStore, InvalidAddressError, type LLMProvider, type McpCallResult, McpClientManager, McpResponseCache, type McpServerConfig, type McpServerConnection, type McpToolAdapterConfig, type McpToolDescriptor, MemorySessionStore, type Message, NAVI_ADDR_TTL_SEC, NAVI_MCP_CONFIG, NAVI_MCP_URL, NAVI_RATES_TTL_SEC, NAVI_SERVER_NAME, type NaviCacheEntry, type NaviCacheStore, type NaviRawCoin, type NaviRawHealthFactor, type NaviRawPool, type NaviRawPosition, type NaviRawPositionsResponse, type NaviRawProtocolStats, type NaviRawRewardsResponse, type NaviReadOptions, NaviTools, type NormalizedAddress, type OutputConfig, PERMISSION_PRESETS, type PendingAction, type PendingActionModifiableField, type PendingReward, type PendingToolCall, type PermissionLevel, type PermissionOperation, type PermissionResponse, type PermissionRule, type PortfolioCoin, type PositionEntry, type PreflightResult, type ProtocolStats, type ProviderEvent, QueryEngine, READ_TOOLS, type RatesResult, type Recipe, type RecipePrerequisite, RecipeRegistry, type RecipeStep, type RecipeStepOnError, RetryTracker, type SSEEvent, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, type SavingsResult, type ServerPositionData, type SessionData, type SessionStore, type StateType, type StopReason, type SuiCoinBalance, SuinsNotRegisteredError, SuinsRpcError, type SystemBlock, type SystemPrompt, TOOL_FLAGS, TOOL_MODIFIABLE_FIELDS, type TelemetrySink, type TelemetryTags, type ThinkingConfig, type ThinkingEffort, type Tool, type ToolChoice, type ToolContext, type ToolDefinition, type ToolFlags, type ToolJsonSchema, type ToolResult, TxMutex, type UserFinancialProfile, type UserPermissionConfig, WRITE_TOOLS, type WalletCacheEntry, type WalletCacheStore, type WalletCoin, _resetNaviCircuitBreaker, activitySummaryTool, adaptAllMcpTools, adaptAllServerTools, adaptMcpTool, applyToolFlags, awaitOrFetch, balanceCheckTool, borrowTool, budgetToolResult, buildCachedSystemPrompt, buildMcpTools, buildProactivenessInstructions, buildProfileContext, buildSelfEvaluationInstruction, buildStateContext, buildTool, claimRewardsTool, classifyEffort, clearPortfolioCache, clearPortfolioCacheFor, clearPriceMapCache, compactMessages, createGuardRunnerState, engineToSSE, estimateTokens, explainTxTool, extractConversationText, extractMcpText, fetchAddressDefiPortfolio, fetchAddressPortfolio, fetchAudricHistory, fetchAudricPortfolio, fetchAvailableRewards, fetchBalance, fetchHealthFactor, fetchPositions, fetchProtocolStats, fetchRates, fetchSavings, fetchTokenPrices, fetchWalletCoins, findTool, getAudricApiBase, getDefaultTools, getDefiCacheStore, getFetchLock, getMcpManager, getModifiableFields, getNaviCacheStore, getTelemetrySink, getToolFlags, getWalletAddress, getWalletCacheStore, guardArtifactPreview, guardStaleData, hasNaviMcp, healthCheckTool, loadRecipes, looksLikeSuiNs, microcompact, mppServicesTool, naviKey, normalizeAddressInput, parseMcpJson, parseRecipe, parseSSE, payApiTool, portfolioAnalysisTool, protocolDeepDiveTool, ratesInfoTool, registerEngineTools, renderCanvasTool, repayDebtTool, requireAgent, resetDefiCacheStore, resetFetchLock, resetNaviCacheStore, resetTelemetrySink, resetWalletCacheStore, resolvePermissionTier, resolveSuinsTool, resolveSuinsViaRpc, resolveUsdValue, runGuards, runTools, saveContactTool, saveDepositTool, savingsInfoTool, sendTransferTool, serializeSSE, setDefiCacheStore, setFetchLock, setNaviCacheStore, setTelemetrySink, setWalletCacheStore, spendingAnalyticsTool, swapExecuteTool, swapQuoteTool, tokenPricesTool, toolNameToOperation, toolsToDefinitions, transactionHistoryTool, transformBalance, transformHealthFactor, transformPositions, transformRates, transformRewards, transformSavings, updateGuardStateAfterToolResult, validateHistory, voloStakeTool, voloStatsTool, voloUnstakeTool, webSearchTool, withdrawTool, yieldSummaryTool };
3234
+ export { type AddressPortfolio, AnthropicProvider, type AnthropicProviderConfig, type AudricHistoryRecord, type AudricPortfolioResult, type AwaitOrFetchOpts, type BalancePrices, type BalanceResult, BalanceTracker, type BuildToolOptions, CANVAS_TEMPLATES, type CanvasTemplate, type ChatParams, type CompactOptions, type ContentBlock, ContextBudget, type ContextBudgetConfig, type ConversationState, type ConversationStateStore, type CostSnapshot, CostTracker, type CostTrackerConfig, DEFAULT_GUARD_CONFIG, DEFAULT_LEASE_SEC, DEFAULT_PERMISSION_CONFIG, DEFAULT_POLL_BUDGET_MS, DEFAULT_POLL_INTERVAL_MS, DEFAULT_SYSTEM_PROMPT, type DefiCacheEntry, type DefiCacheStore, type DefiProtocol, type DefiSummary, EFFORT_THINKING_BUDGET_CAPS, EarlyToolDispatcher, type EngineConfig, type EngineEvent, type EvalSummaryParseResult, type EvaluationItem, type EvaluationStatus, type FetchLock, type GuardCheckResult, type GuardConfig, type GuardEvent, type GuardInjection, type GuardResult, type GuardRunnerState, type GuardTier, type GuardVerdict, type HealthFactorResult, InMemoryDefiCacheStore, InMemoryFetchLock, InMemoryNaviCacheStore, InMemoryWalletCacheStore, InvalidAddressError, type LLMProvider, type McpCallResult, McpClientManager, McpResponseCache, type McpServerConfig, type McpServerConnection, type McpToolAdapterConfig, type McpToolDescriptor, MemorySessionStore, type Message, NAVI_ADDR_TTL_SEC, NAVI_MCP_CONFIG, NAVI_MCP_URL, NAVI_RATES_TTL_SEC, NAVI_SERVER_NAME, type NaviCacheEntry, type NaviCacheStore, type NaviRawCoin, type NaviRawHealthFactor, type NaviRawPool, type NaviRawPosition, type NaviRawPositionsResponse, type NaviRawProtocolStats, type NaviRawRewardsResponse, type NaviReadOptions, NaviTools, type NormalizedAddress, type OutputConfig, PERMISSION_PRESETS, type PendingAction, type PendingActionModifiableField, type PendingReward, type PendingToolCall, type PermissionLevel, type PermissionOperation, type PermissionResponse, type PermissionRule, type PortfolioCoin, type PositionEntry, type PreflightResult, type ProtocolStats, type ProviderEvent, QueryEngine, READ_TOOLS, type RatesResult, type Recipe, type RecipePrerequisite, RecipeRegistry, type RecipeStep, type RecipeStepOnError, RetryTracker, type SSEEvent, SUINS_NAME_REGEX, SUI_ADDRESS_REGEX, SUI_ADDRESS_STRICT_REGEX, type SavingsResult, type ServerPositionData, type SessionData, type SessionStore, type StateType, type StopReason, type SuiCoinBalance, SuinsNotRegisteredError, SuinsRpcError, type SystemBlock, type SystemPrompt, TOOL_FLAGS, TOOL_MODIFIABLE_FIELDS, type TelemetrySink, type TelemetryTags, type ThinkingConfig, type ThinkingEffort, type TodoItem$1 as TodoItem, type Tool, type ToolChoice, type ToolContext, type ToolDefinition, type ToolFlags, type ToolJsonSchema, type ToolResult, TxMutex, type UpdateTodoInput, type TodoItem as UpdateTodoItem, type UserFinancialProfile, type UserPermissionConfig, WRITE_TOOLS, type WalletCacheEntry, type WalletCacheStore, type WalletCoin, _resetNaviCircuitBreaker, activitySummaryTool, adaptAllMcpTools, adaptAllServerTools, adaptMcpTool, applyToolFlags, awaitOrFetch, balanceCheckTool, borrowTool, budgetToolResult, buildCachedSystemPrompt, buildMcpTools, buildProactivenessInstructions, buildProfileContext, buildSelfEvaluationInstruction, buildStateContext, buildTool, claimRewardsTool, clampThinkingForEffort, classifyEffort, clearPortfolioCache, clearPortfolioCacheFor, clearPriceMapCache, compactMessages, createGuardRunnerState, engineToSSE, estimateTokens, explainTxTool, extractConversationText, extractMcpText, fetchAddressDefiPortfolio, fetchAddressPortfolio, fetchAudricHistory, fetchAudricPortfolio, fetchAvailableRewards, fetchBalance, fetchHealthFactor, fetchPositions, fetchProtocolStats, fetchRates, fetchSavings, fetchTokenPrices, fetchWalletCoins, findTool, getAudricApiBase, getDefaultTools, getDefiCacheStore, getFetchLock, getMcpManager, getModifiableFields, getNaviCacheStore, getTelemetrySink, getToolFlags, getWalletAddress, getWalletCacheStore, guardArtifactPreview, guardStaleData, hasNaviMcp, healthCheckTool, loadRecipes, looksLikeSuiNs, microcompact, mppServicesTool, naviKey, normalizeAddressInput, parseEvalSummary, parseMcpJson, parseRecipe, parseSSE, payApiTool, portfolioAnalysisTool, protocolDeepDiveTool, ratesInfoTool, registerEngineTools, renderCanvasTool, repayDebtTool, requireAgent, resetDefiCacheStore, resetFetchLock, resetNaviCacheStore, resetTelemetrySink, resetWalletCacheStore, resolveAddressToSuinsViaRpc, resolvePermissionTier, resolveSuinsTool, resolveSuinsViaRpc, resolveUsdValue, runGuards, runTools, saveContactTool, saveDepositTool, savingsInfoTool, sendTransferTool, serializeSSE, setDefiCacheStore, setFetchLock, setNaviCacheStore, setTelemetrySink, setWalletCacheStore, spendingAnalyticsTool, swapExecuteTool, swapQuoteTool, tokenPricesTool, toolNameToOperation, toolsToDefinitions, transactionHistoryTool, transformBalance, transformHealthFactor, transformPositions, transformRates, transformRewards, transformSavings, updateGuardStateAfterToolResult, updateTodoTool, validateHistory, voloStakeTool, voloStatsTool, voloUnstakeTool, webSearchTool, withdrawTool, yieldSummaryTool };