@pentoshi/clai 1.1.4 → 1.2.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.
@@ -82,6 +82,21 @@ export declare function looksLikeTruncatedToolCall(text: string): boolean;
82
82
  * the others did NOT run and must be re-sent one at a time.
83
83
  */
84
84
  export declare function countToolFences(text: string): number;
85
+ /**
86
+ * Parse EVERY explicitly-delimited tool call in a message, in document
87
+ * order. Unlike parseToolCall (which returns only the first), this lets the
88
+ * runner execute a batch the model emitted in one turn — e.g. the natural
89
+ * "task.update in_progress → do the work → task.update done" sequence, or
90
+ * several fs.write calls. Only the unambiguous, delimited formats are
91
+ * collected (```tool fences, <tool_call> XML, and Kimi sentinel blocks) so a
92
+ * worked example in prose is far less likely to be mistaken for a call.
93
+ * The runner executes them sequentially and STOPS the batch on the first
94
+ * failure so the model can react, mirroring how Claude Code batches reads
95
+ * and edits but pauses when something breaks.
96
+ */
97
+ export declare function parseAllToolCalls(text: string): ToolCall[];
98
+ /** Structural equality for two tool calls (name + canonical args JSON). */
99
+ export declare function sameToolCall(a: ToolCall, b: ToolCall): boolean;
85
100
  /**
86
101
  * Decide whether this turn should get a generous step budget because it is
87
102
  * a multi-file build, a continuation of one, or a "it's not done yet" nudge.