reasonix 0.30.5 → 0.32.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/dist/index.d.ts CHANGED
@@ -159,65 +159,6 @@ declare class DeepSeekClient {
159
159
  stream(opts: ChatRequestOptions): AsyncGenerator<StreamChunk>;
160
160
  }
161
161
 
162
- /** Harvest failures return an empty state — main turn must never abort on a hiccup here. */
163
-
164
- interface TypedPlanState {
165
- subgoals: string[];
166
- hypotheses: string[];
167
- uncertainties: string[];
168
- rejectedPaths: string[];
169
- }
170
- interface HarvestOptions {
171
- /** Model used for the extraction call. Defaults to the cheap chat model. */
172
- model?: string;
173
- /** Cap on how many items land in each array. Default 5. */
174
- maxItems?: number;
175
- /** Per-item character cap. Default 80. */
176
- maxItemLen?: number;
177
- /** Abort the extraction if R1 reasoning is shorter than this. Default 40. */
178
- minReasoningLen?: number;
179
- }
180
- declare function emptyPlanState(): TypedPlanState;
181
- declare function isPlanStateEmpty(s: TypedPlanState | null | undefined): boolean;
182
- declare function harvest(reasoningContent: string | null | undefined, client?: DeepSeekClient, options?: HarvestOptions, signal?: AbortSignal): Promise<TypedPlanState>;
183
-
184
- /** N parallel samples; selector picks fewest uncertainties with shorter-answer tie-break (Occam prior). */
185
-
186
- interface BranchSample {
187
- index: number;
188
- temperature: number;
189
- response: ChatResponse;
190
- planState: TypedPlanState;
191
- }
192
- type BranchSelector = (samples: BranchSample[]) => BranchSample;
193
- interface BranchOptions {
194
- /** Number of parallel samples. 1 disables branching. Default 1. */
195
- budget?: number;
196
- /** Temperatures for each branch. Default spreads across [0, 1]. */
197
- temperatures?: readonly number[];
198
- /** Harvest options; the selector needs harvest to score samples. */
199
- harvestOptions?: HarvestOptions;
200
- /** Custom selector. Default: min uncertainties, tie-break shortest answer. */
201
- selector?: BranchSelector;
202
- /** Not awaited; exceptions swallowed. Fires when sample's main + harvest both complete. */
203
- onSampleDone?: (sample: BranchSample) => void;
204
- }
205
- interface BranchResult {
206
- chosen: BranchSample;
207
- samples: BranchSample[];
208
- }
209
- /** Default: fewest uncertainties wins, ties broken by shorter answer content. */
210
- declare const defaultSelector: BranchSelector;
211
- declare function runBranches(client: DeepSeekClient, request: ChatRequestOptions, opts?: BranchOptions): Promise<BranchResult>;
212
- /** Sum usage across branch samples for telemetry purposes. */
213
- declare function aggregateBranchUsage(samples: readonly BranchSample[]): {
214
- promptTokens: number;
215
- completionTokens: number;
216
- totalTokens: number;
217
- promptCacheHitTokens: number;
218
- promptCacheMissTokens: number;
219
- };
220
-
221
162
  /** Generic pause gate — bridges tool functions and the App's modals via Promises. */
222
163
  type ConfirmationChoice = {
223
164
  type: "deny";
@@ -454,8 +395,10 @@ interface RunHooksOptions {
454
395
  /** Stops at first `block` so a gating hook can prevent later hooks running against a phantom success. */
455
396
  declare function runHooks(opts: RunHooksOptions): Promise<HookReport>;
456
397
 
457
- /** Single text-layer DeepSeek-error formatter — 429/5xx never reach here (retry.ts swallows). */
458
- declare function formatLoopError(err: Error): string;
398
+ interface DeepSeekProbeResult {
399
+ reachable: boolean;
400
+ }
401
+ declare function formatLoopError(err: Error, probe?: DeepSeekProbeResult): string;
459
402
 
460
403
  /** Drops both unpaired assistant.tool_calls and stray tool messages — DeepSeek 400s on either. */
461
404
  declare function fixToolCallPairing(messages: ChatMessage[]): {
@@ -622,20 +565,7 @@ type EventRole = "assistant_delta" | "assistant_final"
622
565
  /** Pre-dispatch ping so the TUI can show a spinner during long tool awaits. */
623
566
  | "tool_start" | "tool" | "done" | "error" | "warning"
624
567
  /** Transient indicator for silent phases; UI clears on next primary event. */
625
- | "status" | "branch_start" | "branch_progress" | "branch_done";
626
- interface BranchSummary {
627
- budget: number;
628
- chosenIndex: number;
629
- uncertainties: number[];
630
- temperatures: number[];
631
- }
632
- interface BranchProgress {
633
- completed: number;
634
- total: number;
635
- latestIndex: number;
636
- latestTemperature: number;
637
- latestUncertainties: number;
638
- }
568
+ | "status";
639
569
  interface LoopEvent {
640
570
  turn: number;
641
571
  role: EventRole;
@@ -651,10 +581,7 @@ interface LoopEvent {
651
581
  /** Count of tool calls whose args have parsed as valid JSON (UI progress, not dispatch gate). */
652
582
  toolCallReadyCount?: number;
653
583
  stats?: TurnStats;
654
- planState?: TypedPlanState;
655
584
  repair?: RepairReport;
656
- branch?: BranchSummary;
657
- branchProgress?: BranchProgress;
658
585
  error?: string;
659
586
  /** Display-only — code-mode applier MUST skip SEARCH/REPLACE in forced-summary text. */
660
587
  forcedSummary?: boolean;
@@ -772,9 +699,6 @@ interface CacheFirstLoopOptions {
772
699
  model?: string;
773
700
  maxToolIters?: number;
774
701
  stream?: boolean;
775
- harvest?: boolean | HarvestOptions;
776
- /** Branching disables streaming (need all samples) and force-enables harvest (selector input). */
777
- branch?: number | BranchOptions;
778
702
  reasoningEffort?: "high" | "max";
779
703
  autoEscalate?: boolean;
780
704
  /** Soft USD cap — warns at 80%, refuses next turn at 100%. Opt-in (default no cap). */
@@ -789,8 +713,6 @@ interface CacheFirstLoopOptions {
789
713
  }
790
714
  interface ReconfigurableOptions {
791
715
  model?: string;
792
- harvest?: boolean | HarvestOptions;
793
- branch?: number | BranchOptions;
794
716
  stream?: boolean;
795
717
  /** V4 thinking mode only; deepseek-chat ignores. */
796
718
  reasoningEffort?: "high" | "max";
@@ -808,10 +730,6 @@ declare class CacheFirstLoop {
808
730
  readonly repair: ToolCallRepair;
809
731
  model: string;
810
732
  stream: boolean;
811
- harvestEnabled: boolean;
812
- harvestOptions: HarvestOptions;
813
- branchEnabled: boolean;
814
- branchOptions: BranchOptions;
815
733
  reasoningEffort: "high" | "max";
816
734
  autoEscalate: boolean;
817
735
  budgetUsd: number | null;
@@ -863,6 +781,8 @@ declare class CacheFirstLoop {
863
781
  get proArmed(): boolean;
864
782
  /** UI surface — true while the current turn is running on pro (armed or auto-escalated). */
865
783
  get escalatedThisTurn(): boolean;
784
+ /** UI surface — model id of the call about to run (or running) right now, including escalation. */
785
+ get currentCallModel(): string;
866
786
  private modelForCurrentCall;
867
787
  /** Returns true ONLY on the tipping call — caller surfaces a one-shot warning. */
868
788
  private noteToolFailureSignal;
@@ -879,6 +799,8 @@ declare class CacheFirstLoop {
879
799
  /** Expand `@path` mentions inline. Paths must resolve inside rootDir; escapes / oversize get a skip note, not content. */
880
800
  /** Caps match tool-result dispatch truncation (0.5.2). */
881
801
  declare const DEFAULT_AT_MENTION_MAX_BYTES: number;
802
+ /** Cap on entries returned for a `@<dir>` listing. ~200 paths × ~50 chars ≈ 10 KB — fits inside DEFAULT_AT_MENTION_MAX_BYTES with room for the rest of the prompt. */
803
+ declare const DEFAULT_AT_DIR_MAX_ENTRIES = 200;
882
804
  /** Universally-uninteresting build / VCS dirs. Framework-specific dirs (Pods, target, …) live in .gitignore. */
883
805
  declare const DEFAULT_PICKER_IGNORE_DIRS: readonly string[];
884
806
  interface ListFilesOptions {
@@ -924,17 +846,32 @@ interface AtMentionExpansion {
924
846
  path: string;
925
847
  /** True if the content was inlined. False = skipped (reason in `skip`). */
926
848
  ok: boolean;
927
- /** Bytes read (only for ok=true). */
849
+ /** Bytes read (only for ok=true and isDirectory=false). */
928
850
  bytes?: number;
851
+ /** True when the mention resolved to a directory (ok=true). Block uses `<directory>` instead of `<file>`. */
852
+ isDirectory?: boolean;
853
+ /** Number of files listed when isDirectory=true. */
854
+ entries?: number;
855
+ /** True iff the directory listing was clipped at maxDirEntries. */
856
+ truncated?: boolean;
929
857
  /** Why the mention was skipped. Set when ok=false. */
930
858
  skip?: "missing" | "not-file" | "too-large" | "escape" | "read-error";
931
859
  }
932
860
  interface AtMentionOptions {
933
861
  /** Max file size in bytes before a mention is skipped. */
934
862
  maxBytes?: number;
863
+ /** Cap on entries returned for a `@<dir>` listing. Default {@link DEFAULT_AT_DIR_MAX_ENTRIES}. */
864
+ maxDirEntries?: number;
935
865
  fs?: {
936
866
  exists: (path: string) => boolean;
937
867
  isFile: (path: string) => boolean;
868
+ /** Optional — when omitted, directories are skipped as `not-file`. */
869
+ isDir?: (path: string) => boolean;
870
+ /** Optional — receives the directory's absolute path and the project root, returns relative paths and a truncated flag. */
871
+ listDir?: (dirAbs: string, root: string, max: number) => {
872
+ files: string[];
873
+ truncated: boolean;
874
+ };
938
875
  size: (path: string) => number;
939
876
  read: (path: string) => string;
940
877
  };
@@ -1413,8 +1350,6 @@ interface TranscriptRecord {
1413
1350
  model?: string;
1414
1351
  /** Lets diff attribute cache-hit delta to log stability vs prompt change. */
1415
1352
  prefixHash?: string;
1416
- /** Absent means "no data", not "empty plan". */
1417
- planState?: TypedPlanState;
1418
1353
  /** Optional error message (role === "error"). */
1419
1354
  error?: string;
1420
1355
  }
@@ -1464,12 +1399,6 @@ interface ReplayStats extends SessionSummary {
1464
1399
  userTurns: number;
1465
1400
  /** Count of tool-role records (tool calls executed). */
1466
1401
  toolCalls: number;
1467
- /** Count of assistant_final records that carry a non-empty planState (harvest signal). */
1468
- harvestedTurns: number;
1469
- /** Sum of uncertainties across all harvested turns — a proxy for "how much did R1 hedge?" */
1470
- totalUncertainties: number;
1471
- /** Sum of subgoals across all harvested turns. */
1472
- totalSubgoals: number;
1473
1402
  }
1474
1403
  declare function replayFromFile(path: string): {
1475
1404
  parsed: ReadTranscriptResult;
@@ -2034,6 +1963,22 @@ type PresetName = "auto" | "flash" | "pro" | "fast" | "smart" | "max";
2034
1963
  /** Single trust dial: review queues edits + gates shell; auto applies + gates shell; yolo skips both gates. */
2035
1964
  type EditMode = "review" | "auto" | "yolo";
2036
1965
  type ReasoningEffort = "high" | "max";
1966
+ type EmbeddingProvider = "ollama" | "openai-compat";
1967
+ interface OllamaEmbeddingUserConfig {
1968
+ baseUrl?: string;
1969
+ model?: string;
1970
+ }
1971
+ interface OpenAICompatEmbeddingUserConfig {
1972
+ baseUrl?: string;
1973
+ apiKey?: string;
1974
+ model?: string;
1975
+ extraBody?: Record<string, unknown>;
1976
+ }
1977
+ interface SemanticEmbeddingUserConfig {
1978
+ provider?: EmbeddingProvider;
1979
+ ollama?: OllamaEmbeddingUserConfig;
1980
+ openaiCompat?: OpenAICompatEmbeddingUserConfig;
1981
+ }
2037
1982
  interface ReasonixConfig {
2038
1983
  apiKey?: string;
2039
1984
  baseUrl?: string;
@@ -2059,6 +2004,7 @@ interface ReasonixConfig {
2059
2004
  };
2060
2005
  };
2061
2006
  index?: IndexUserConfig;
2007
+ semantic?: SemanticEmbeddingUserConfig;
2062
2008
  }
2063
2009
  declare function defaultConfigPath(): string;
2064
2010
  declare function readConfig(path?: string): ReasonixConfig;
@@ -2209,4 +2155,4 @@ declare function aggregateUsage(records: UsageRecord[], opts?: AggregateOptions)
2209
2155
  /** File-size helper for the stats header — "1.2 MB" etc. Returns "" if missing. */
2210
2156
  declare function formatLogSize(path?: string): string;
2211
2157
 
2212
- export { AT_MENTION_PATTERN, AT_PICKER_PREFIX, type AggregateOptions, AppendOnlyLog, type AppendUsageInput, type ApplyResult, type ApplyStatus, type AtMentionExpansion, type AtMentionOptions, type BranchOptions, type BranchProgress, type BranchResult, type BranchSample, type BranchSelector, type BranchSummary, type BridgeOptions, type BridgeResult, CODE_SYSTEM_PROMPT, CacheFirstLoop, type CacheFirstLoopOptions, type CallToolResult, type ChatMessage, type ChatResponse, type ChoiceOption, ChoiceRequestedError, type ChoiceToolOptions, type CodeSystemPromptOptions, DEFAULT_AT_MENTION_MAX_BYTES, DEFAULT_MAX_RESULT_CHARS, DEFAULT_MAX_RESULT_TOKENS, DEFAULT_PICKER_IGNORE_DIRS, DeepSeekClient, type DeepSeekClientOptions, type RenderOptions as DiffRenderOptions, type DiffReport, type DiffSide, type EditBlock, type EditSnapshot, type EventRole, type FileWithStats, type FilesystemToolsOptions, type FlattenDecision, type FlattenOptions, type GetLatestVersionOptions, type GetPromptResult, HOOK_EVENTS, HOOK_SETTINGS_DIRNAME, HOOK_SETTINGS_FILENAME, type HarvestOptions, type HookConfig, type HookEvent, type HookOutcome, type HookPayload, type HookReport, type HookScope, type HookSettings, type HookSpawnInput, type HookSpawnResult, type HookSpawner, ImmutablePrefix, type ImmutablePrefixOptions, type InitializeResult, type InspectionReport, type JSONSchema, type JsonRpcMessage, type JsonRpcRequest, type JsonRpcResponse, LATEST_CACHE_TTL_MS, LATEST_FETCH_TIMEOUT_MS, type ListFilesOptions, type ListPromptsResult, type ListResourcesResult, type ListToolsResult, type LoadHookSettingsOptions, type LoopEvent, MCP_PROTOCOL_VERSION, MEMORY_INDEX_FILE, MEMORY_INDEX_MAX_CHARS, McpClient, type McpClientOptions, type McpContentBlock, type McpProgressHandler, type McpProgressInfo, type McpPrompt, type McpPromptArgument, type McpPromptMessage, type McpPromptResourceBlock, type McpResource, type McpResourceContents, type McpResourceContentsBlob, type McpResourceContentsText, type McpSpec, type McpTool, type McpToolSchema, type McpTransport, type MemoryEntry, type MemoryScope, MemoryStore, type MemoryStoreOptions, type MemoryToolsOptions, type MemoryType, type WriteInput as MemoryWriteInput, NeedsConfirmationError, PROJECT_MEMORY_FILE, PROJECT_MEMORY_MAX_CHARS, type PageContent, type PickerCandidate, PlanProposedError, PlanRevisionProposedError, type PlanStep, type PlanStepRisk, type PlanToolOptions, type ProgressNotificationParams, type ProjectMemory, type RankPickerOptions, type ReadResourceResult, type ReadTranscriptResult, type ReasonixConfig, type ReconfigurableOptions, type RepairReport, type ReplayStats, type ResolvedHook, type RetryInfo, type RetryOptions, type Role, type RunCommandResult, type RunHooksOptions, type ScavengeOptions, type ScavengeResult, type SearchResult, type SectionResult, type SessionInfo, SessionStats, type SessionSummary, type ShellToolsOptions, type SseMcpSpec, SseTransport, type SseTransportOptions, type StdioMcpSpec, StdioTransport, type StdioTransportOptions, type StepCompletion, StormBreaker, type StreamChunk, type StreamableHttpMcpSpec, StreamableHttpTransport, type StreamableHttpTransportOptions, type SubagentEvent, type SubagentSink, type SubagentToolOptions, type ToolCall, type ToolCallContext, ToolCallRepair, type ToolCallRepairOptions, type ToolDefinition, type ToolFunctionSpec, ToolRegistry, type ToolSpec, type TranscriptMeta, type TranscriptRecord, type TruncationRepairResult, type TurnPair, type TurnStats, type TypedPlanState, USER_MEMORY_DIR, Usage, type UsageAggregate, type UsageBucket, type UsageRecord, VERSION, VolatileScratch, type WebFetchOptions, type WebSearchOptions, type WebToolsOptions, aggregateBranchUsage, aggregateUsage, analyzeSchema, appendSessionMessage, appendUsage, applyEditBlock, applyEditBlocks, applyMemoryStack, applyProjectMemory, applyUserMemory, bridgeMcpTools, bucketCacheHitRatio, bucketSavingsFraction, claudeEquivalentCost, codeSystemPrompt, compareVersions, computeReplayStats, costUsd, decideOutcome, defaultConfigPath, defaultSelector, defaultUsageLogPath, deleteSession, detectAtPicker, detectShellOperator, diffTranscripts, emptyPlanState, expandAtMentions, fetchWithRetry, fixToolCallPairing, flattenMcpResult, flattenSchema, forkRegistryExcluding, formatCommandResult, formatHookOutcomeMessage, formatLogSize, formatLoopError, formatSearchResults, getLatestVersion, globalSettingsPath, harvest, healLoadedMessages, healLoadedMessagesByTokens, htmlToText, injectPowerShellUtf8, inputCostUsd, inspectMcpServer, isAllowed, isJsonRpcError, isNpxInstall, isPlanStateEmpty, isPlausibleKey, listFilesSync, listFilesWithStatsAsync, listFilesWithStatsSync, listSessions, loadApiKey, loadDotenv, loadHooks, loadSessionMessages, matchesTool, memoryEnabled, nestArguments, openTranscriptFile, outputCostUsd, parseEditBlocks, parseMcpSpec, parseMojeekResults, parseSearxngHtmlResults, parseTranscript, prepareSpawn, projectHash, projectSettingsPath, quoteForCmdExe, rankPickerCandidates, readConfig, readProjectMemory, readTranscript, readUsageLog, recordFromLoopEvent, redactKey, registerChoiceTool, registerFilesystemTools, registerMemoryTools, registerPlanTool, registerShellTools, registerSubagentTool, registerWebTools, renderMarkdown as renderDiffMarkdown, renderSummaryTable as renderDiffSummary, repairTruncatedJson, replayFromFile, resolveExecutable, restoreSnapshots, runBranches, runCommand, runHooks, sanitizeMemoryName, sanitizeName as sanitizeSessionName, saveApiKey, scavengeToolCalls, sessionPath, sessionsDir, similarity, snapshotBeforeEdits, stripHallucinatedToolMarkup, tokenizeCommand, truncateForModel, truncateForModelByTokens, webFetch, webSearch, withUtf8Codepage, writeConfig, writeMeta, writeRecord };
2158
+ export { AT_MENTION_PATTERN, AT_PICKER_PREFIX, type AggregateOptions, AppendOnlyLog, type AppendUsageInput, type ApplyResult, type ApplyStatus, type AtMentionExpansion, type AtMentionOptions, type BridgeOptions, type BridgeResult, CODE_SYSTEM_PROMPT, CacheFirstLoop, type CacheFirstLoopOptions, type CallToolResult, type ChatMessage, type ChatResponse, type ChoiceOption, ChoiceRequestedError, type ChoiceToolOptions, type CodeSystemPromptOptions, DEFAULT_AT_DIR_MAX_ENTRIES, DEFAULT_AT_MENTION_MAX_BYTES, DEFAULT_MAX_RESULT_CHARS, DEFAULT_MAX_RESULT_TOKENS, DEFAULT_PICKER_IGNORE_DIRS, DeepSeekClient, type DeepSeekClientOptions, type RenderOptions as DiffRenderOptions, type DiffReport, type DiffSide, type EditBlock, type EditSnapshot, type EventRole, type FileWithStats, type FilesystemToolsOptions, type FlattenDecision, type FlattenOptions, type GetLatestVersionOptions, type GetPromptResult, HOOK_EVENTS, HOOK_SETTINGS_DIRNAME, HOOK_SETTINGS_FILENAME, type HookConfig, type HookEvent, type HookOutcome, type HookPayload, type HookReport, type HookScope, type HookSettings, type HookSpawnInput, type HookSpawnResult, type HookSpawner, ImmutablePrefix, type ImmutablePrefixOptions, type InitializeResult, type InspectionReport, type JSONSchema, type JsonRpcMessage, type JsonRpcRequest, type JsonRpcResponse, LATEST_CACHE_TTL_MS, LATEST_FETCH_TIMEOUT_MS, type ListFilesOptions, type ListPromptsResult, type ListResourcesResult, type ListToolsResult, type LoadHookSettingsOptions, type LoopEvent, MCP_PROTOCOL_VERSION, MEMORY_INDEX_FILE, MEMORY_INDEX_MAX_CHARS, McpClient, type McpClientOptions, type McpContentBlock, type McpProgressHandler, type McpProgressInfo, type McpPrompt, type McpPromptArgument, type McpPromptMessage, type McpPromptResourceBlock, type McpResource, type McpResourceContents, type McpResourceContentsBlob, type McpResourceContentsText, type McpSpec, type McpTool, type McpToolSchema, type McpTransport, type MemoryEntry, type MemoryScope, MemoryStore, type MemoryStoreOptions, type MemoryToolsOptions, type MemoryType, type WriteInput as MemoryWriteInput, NeedsConfirmationError, PROJECT_MEMORY_FILE, PROJECT_MEMORY_MAX_CHARS, type PageContent, type PickerCandidate, PlanProposedError, PlanRevisionProposedError, type PlanStep, type PlanStepRisk, type PlanToolOptions, type ProgressNotificationParams, type ProjectMemory, type RankPickerOptions, type ReadResourceResult, type ReadTranscriptResult, type ReasonixConfig, type ReconfigurableOptions, type RepairReport, type ReplayStats, type ResolvedHook, type RetryInfo, type RetryOptions, type Role, type RunCommandResult, type RunHooksOptions, type ScavengeOptions, type ScavengeResult, type SearchResult, type SectionResult, type SessionInfo, SessionStats, type SessionSummary, type ShellToolsOptions, type SseMcpSpec, SseTransport, type SseTransportOptions, type StdioMcpSpec, StdioTransport, type StdioTransportOptions, type StepCompletion, StormBreaker, type StreamChunk, type StreamableHttpMcpSpec, StreamableHttpTransport, type StreamableHttpTransportOptions, type SubagentEvent, type SubagentSink, type SubagentToolOptions, type ToolCall, type ToolCallContext, ToolCallRepair, type ToolCallRepairOptions, type ToolDefinition, type ToolFunctionSpec, ToolRegistry, type ToolSpec, type TranscriptMeta, type TranscriptRecord, type TruncationRepairResult, type TurnPair, type TurnStats, USER_MEMORY_DIR, Usage, type UsageAggregate, type UsageBucket, type UsageRecord, VERSION, VolatileScratch, type WebFetchOptions, type WebSearchOptions, type WebToolsOptions, aggregateUsage, analyzeSchema, appendSessionMessage, appendUsage, applyEditBlock, applyEditBlocks, applyMemoryStack, applyProjectMemory, applyUserMemory, bridgeMcpTools, bucketCacheHitRatio, bucketSavingsFraction, claudeEquivalentCost, codeSystemPrompt, compareVersions, computeReplayStats, costUsd, decideOutcome, defaultConfigPath, defaultUsageLogPath, deleteSession, detectAtPicker, detectShellOperator, diffTranscripts, expandAtMentions, fetchWithRetry, fixToolCallPairing, flattenMcpResult, flattenSchema, forkRegistryExcluding, formatCommandResult, formatHookOutcomeMessage, formatLogSize, formatLoopError, formatSearchResults, getLatestVersion, globalSettingsPath, healLoadedMessages, healLoadedMessagesByTokens, htmlToText, injectPowerShellUtf8, inputCostUsd, inspectMcpServer, isAllowed, isJsonRpcError, isNpxInstall, isPlausibleKey, listFilesSync, listFilesWithStatsAsync, listFilesWithStatsSync, listSessions, loadApiKey, loadDotenv, loadHooks, loadSessionMessages, matchesTool, memoryEnabled, nestArguments, openTranscriptFile, outputCostUsd, parseEditBlocks, parseMcpSpec, parseMojeekResults, parseSearxngHtmlResults, parseTranscript, prepareSpawn, projectHash, projectSettingsPath, quoteForCmdExe, rankPickerCandidates, readConfig, readProjectMemory, readTranscript, readUsageLog, recordFromLoopEvent, redactKey, registerChoiceTool, registerFilesystemTools, registerMemoryTools, registerPlanTool, registerShellTools, registerSubagentTool, registerWebTools, renderMarkdown as renderDiffMarkdown, renderSummaryTable as renderDiffSummary, repairTruncatedJson, replayFromFile, resolveExecutable, restoreSnapshots, runCommand, runHooks, sanitizeMemoryName, sanitizeName as sanitizeSessionName, saveApiKey, scavengeToolCalls, sessionPath, sessionsDir, similarity, snapshotBeforeEdits, stripHallucinatedToolMarkup, tokenizeCommand, truncateForModel, truncateForModelByTokens, webFetch, webSearch, withUtf8Codepage, writeConfig, writeMeta, writeRecord };