@themoltnet/pi-extension 0.15.1 → 0.16.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.
Files changed (3) hide show
  1. package/dist/index.d.ts +22 -0
  2. package/dist/index.js +2142 -2055
  3. package/package.json +3 -3
package/dist/index.d.ts CHANGED
@@ -249,6 +249,28 @@ export declare interface ExecutePiTaskOptions {
249
249
  * process. See #1078.
250
250
  */
251
251
  makeOnTurnEvent?: TurnEventHandlerFactory;
252
+ /**
253
+ * Cap the number of tool-use turns per attempt. When the limit is
254
+ * reached, the pi session is aborted and the attempt finalizes with
255
+ * `error.code: max_turns_exceeded`. A tool-use turn = any `turn_end`
256
+ * whose `stopReason !== 'end_turn'` (matches the Anthropic SDK
257
+ * `max_turns` semantics: the model's final text-only response doesn't
258
+ * count). Default `0` = disabled. Recommended `30` for `fulfill_brief`.
259
+ * Closes part of #1094.
260
+ */
261
+ maxTurns?: number;
262
+ /**
263
+ * Cap the number of `bash` tool timeouts per attempt. A timeout is a
264
+ * `tool_execution_end` for `bash` whose result text contains
265
+ * "Command timed out after" (pi's stable error wrapper from
266
+ * `@earendil-works/pi-coding-agent`'s bash tool). When the limit is
267
+ * reached, the pi session is aborted and the attempt finalizes with
268
+ * `error.code: max_bash_timeouts_exceeded`. Catches the death-spiral
269
+ * pattern from task `a3762f44` where the model kept retrying
270
+ * long-blocking shell commands until the host job timeout fired.
271
+ * Default `3`. Set to `0` to disable. Closes part of #1094.
272
+ */
273
+ maxBashTimeouts?: number;
252
274
  }
253
275
 
254
276
  /**