reasonix 0.4.12 → 0.4.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -489,6 +489,13 @@ declare class ToolRegistry {
489
489
  }
490
490
 
491
491
  type EventRole = "assistant_delta" | "assistant_final"
492
+ /**
493
+ * Emitted as `tool_calls[].function.arguments` streams in. A tool
494
+ * call with a large arguments payload produces no `content` or
495
+ * `reasoning_content` bytes — this is the only signal the UI has
496
+ * that the stream is alive during that window.
497
+ */
498
+ | "tool_call_delta"
492
499
  /**
493
500
  * Yielded immediately before a tool is dispatched. Lets the TUI put
494
501
  * up a "▸ tool<X> running…" spinner while the tool's Promise is
@@ -531,6 +538,8 @@ interface LoopEvent {
531
538
  * what it returned. Needed by `reasonix diff` to explain divergences.
532
539
  */
533
540
  toolArgs?: string;
541
+ /** Cumulative arguments-string length for `role === "tool_call_delta"`. */
542
+ toolCallArgsChars?: number;
534
543
  stats?: TurnStats;
535
544
  planState?: TypedPlanState;
536
545
  repair?: RepairReport;
@@ -1749,6 +1758,6 @@ declare function redactKey(key: string): string;
1749
1758
 
1750
1759
  /** Reasonix — DeepSeek-native agent framework. Library entry point. */
1751
1760
 
1752
- declare const VERSION = "0.4.3";
1761
+ declare const VERSION = "0.4.14";
1753
1762
 
1754
1763
  export { AppendOnlyLog, type ApplyResult, type ApplyStatus, 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, DEFAULT_MAX_RESULT_CHARS, DeepSeekClient, type DeepSeekClientOptions, type RenderOptions as DiffRenderOptions, type DiffReport, type DiffSide, type EditBlock, type EditSnapshot, type EventRole, type FilesystemToolsOptions, type FlattenDecision, type FlattenOptions, type GetPromptResult, type HarvestOptions, ImmutablePrefix, type ImmutablePrefixOptions, type InitializeResult, type InspectionReport, type JSONSchema, type JsonRpcMessage, type JsonRpcRequest, type JsonRpcResponse, type ListPromptsResult, type ListResourcesResult, type ListToolsResult, type LoopEvent, MCP_PROTOCOL_VERSION, 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 ProgressNotificationParams, type ReadResourceResult, type ReadTranscriptResult, type ReasonixConfig, type ReconfigurableOptions, type RepairReport, type ReplayStats, type RetryInfo, type RetryOptions, type Role, type ScavengeOptions, type ScavengeResult, type SectionResult, type SessionInfo, SessionStats, type SessionSummary, type SseMcpSpec, SseTransport, type SseTransportOptions, type StdioMcpSpec, StdioTransport, type StdioTransportOptions, StormBreaker, type StreamChunk, 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, Usage, VERSION, VolatileScratch, aggregateBranchUsage, analyzeSchema, appendSessionMessage, applyEditBlock, applyEditBlocks, bridgeMcpTools, claudeEquivalentCost, codeSystemPrompt, computeReplayStats, costUsd, defaultConfigPath, defaultSelector, deleteSession, diffTranscripts, emptyPlanState, fetchWithRetry, flattenMcpResult, flattenSchema, formatLoopError, harvest, healLoadedMessages, inputCostUsd, inspectMcpServer, isJsonRpcError, isPlanStateEmpty, isPlausibleKey, listSessions, loadApiKey, loadDotenv, loadSessionMessages, nestArguments, openTranscriptFile, outputCostUsd, parseEditBlocks, parseMcpSpec, parseTranscript, readConfig, readTranscript, recordFromLoopEvent, redactKey, registerFilesystemTools, renderMarkdown as renderDiffMarkdown, renderSummaryTable as renderDiffSummary, repairTruncatedJson, replayFromFile, restoreSnapshots, runBranches, sanitizeName as sanitizeSessionName, saveApiKey, scavengeToolCalls, sessionPath, sessionsDir, similarity, snapshotBeforeEdits, stripHallucinatedToolMarkup, truncateForModel, writeConfig, writeMeta, writeRecord };
package/dist/index.js CHANGED
@@ -1561,6 +1561,15 @@ var CacheFirstLoop = class {
1561
1561
  if (d.argumentsDelta)
1562
1562
  cur.function.arguments = (cur.function.arguments ?? "") + d.argumentsDelta;
1563
1563
  callBuf.set(d.index, cur);
1564
+ if (cur.function.name) {
1565
+ yield {
1566
+ turn: this._turn,
1567
+ role: "tool_call_delta",
1568
+ content: "",
1569
+ toolName: cur.function.name,
1570
+ toolCallArgsChars: (cur.function.arguments ?? "").length
1571
+ };
1572
+ }
1564
1573
  }
1565
1574
  if (chunk.usage) usage = chunk.usage;
1566
1575
  }
@@ -3547,7 +3556,7 @@ function redactKey(key) {
3547
3556
  }
3548
3557
 
3549
3558
  // src/index.ts
3550
- var VERSION = "0.4.3";
3559
+ var VERSION = "0.4.14";
3551
3560
  export {
3552
3561
  AppendOnlyLog,
3553
3562
  CODE_SYSTEM_PROMPT,