@bunny-agent/runner-cli 0.9.59-beta.8 → 0.9.59

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 (2) hide show
  1. package/dist/bundle.mjs +22 -6
  2. package/package.json +6 -6
package/dist/bundle.mjs CHANGED
@@ -14726,7 +14726,8 @@ function errorResult(text) {
14726
14726
  }
14727
14727
 
14728
14728
  // ../../packages/runner-claude/dist/claude-runner.js
14729
- var DEFAULT_ASK_USER_QUESTION_TIMEOUT_MS = 6e4;
14729
+ var DEFAULT_ASK_USER_QUESTION_TIMEOUT_MS = 18e4;
14730
+ var MAX_ASK_USER_QUESTIONS = 8;
14730
14731
  var ASK_USER_QUESTION_TIMEOUT_ANSWER_KEY = "__bunny_agent_timeout__";
14731
14732
  var ASK_USER_QUESTION_TIMEOUT_MESSAGE = "The user did not answer before the interactive question timed out. Continue the original task without waiting, using reasonable assumptions when safe, and provide a user-visible response. Do not call AskUserQuestion again during this turn.";
14732
14733
  function buildUserMessage(userInput) {
@@ -14765,11 +14766,18 @@ function createCanUseToolCallback(claudeOptions) {
14765
14766
  let questionTimedOut = false;
14766
14767
  return async (toolName, input, options) => {
14767
14768
  const { toolUseID } = options;
14769
+ const questions = input?.questions;
14770
+ if (toolName === "AskUserQuestion" && Array.isArray(questions) && questions.length > MAX_ASK_USER_QUESTIONS) {
14771
+ return {
14772
+ behavior: "deny",
14773
+ message: `AskUserQuestion supports at most ${MAX_ASK_USER_QUESTIONS} questions per survey.`
14774
+ };
14775
+ }
14768
14776
  if (toolName === "AskUserQuestion" && questionTimedOut) {
14769
14777
  return {
14770
14778
  behavior: "allow",
14771
14779
  updatedInput: {
14772
- questions: input?.questions,
14780
+ questions,
14773
14781
  answers: {
14774
14782
  [ASK_USER_QUESTION_TIMEOUT_ANSWER_KEY]: ASK_USER_QUESTION_TIMEOUT_MESSAGE
14775
14783
  }
@@ -14794,7 +14802,7 @@ function createCanUseToolCallback(claudeOptions) {
14794
14802
  status: "pending",
14795
14803
  toolName,
14796
14804
  input,
14797
- questions: toolName === "AskUserQuestion" ? input?.questions : void 0,
14805
+ questions: toolName === "AskUserQuestion" ? questions : void 0,
14798
14806
  answers: {}
14799
14807
  }));
14800
14808
  }
@@ -23822,7 +23830,8 @@ var Type = type_exports2;
23822
23830
  // ../../packages/runner-pi/dist/tool-approval.js
23823
23831
  var ASK_USER_QUESTION_TOOL_NAME = "ask_user_question";
23824
23832
  var LEGACY_ASK_USER_QUESTION_TOOL_NAME = "AskUserQuestion";
23825
- var DEFAULT_ASK_USER_QUESTION_TIMEOUT_MS2 = 6e4;
23833
+ var DEFAULT_ASK_USER_QUESTION_TIMEOUT_MS2 = 18e4;
23834
+ var MAX_ASK_USER_QUESTIONS2 = 8;
23826
23835
  var ASK_USER_QUESTION_TIMEOUT_ANSWER_KEY3 = "__bunny_agent_timeout__";
23827
23836
  var ASK_USER_QUESTION_TIMEOUT_MESSAGE2 = "The user did not answer before the interactive question timed out. Do not call ask_user_question again during this turn.";
23828
23837
  function isAskUserQuestionToolName(toolName) {
@@ -23927,7 +23936,10 @@ var askUserQuestionParameters = Type.Object({
23927
23936
  multiSelect: Type.Optional(Type.Boolean({
23928
23937
  description: "Allow selecting multiple options."
23929
23938
  }))
23930
- }), { description: "Questions to present to the user." })
23939
+ }), {
23940
+ description: `Questions to present to the user (maximum ${MAX_ASK_USER_QUESTIONS2}).`,
23941
+ maxItems: MAX_ASK_USER_QUESTIONS2
23942
+ })
23931
23943
  });
23932
23944
  function formatAskUserQuestionResult(updatedInput) {
23933
23945
  if (ASK_USER_QUESTION_TIMEOUT_ANSWER_KEY3 in updatedInput.answers) {
@@ -23952,9 +23964,13 @@ function buildAskUserQuestionTool(options) {
23952
23964
  description: "Ask the user one or more questions and wait for their answers. Use this when you need clarification, a decision between options, or missing information required to continue the task.",
23953
23965
  parameters: askUserQuestionParameters,
23954
23966
  async execute(toolCallId, params, signal) {
23967
+ const questions = params?.questions;
23968
+ if (Array.isArray(questions) && questions.length > MAX_ASK_USER_QUESTIONS2) {
23969
+ throw new Error(`ask_user_question supports at most ${MAX_ASK_USER_QUESTIONS2} questions per survey.`);
23970
+ }
23955
23971
  if (questionTimedOut) {
23956
23972
  const updatedInput = {
23957
- questions: params?.questions,
23973
+ questions,
23958
23974
  answers: {
23959
23975
  [ASK_USER_QUESTION_TIMEOUT_ANSWER_KEY3]: ASK_USER_QUESTION_TIMEOUT_MESSAGE2
23960
23976
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bunny-agent/runner-cli",
3
- "version": "0.9.59-beta.8",
3
+ "version": "0.9.59",
4
4
  "description": "BunnyAgent Runner CLI - Like gemini-cli or claude-code, runs in your local terminal with AI SDK UI streaming",
5
5
  "type": "module",
6
6
  "bin": {
@@ -59,15 +59,15 @@
59
59
  "esbuild": "^0.27.2",
60
60
  "typescript": "^5.3.0",
61
61
  "vitest": "^1.6.1",
62
+ "@bunny-agent/manager": "0.9.59",
62
63
  "@bunny-agent/apply-patch": "0.1.0",
63
- "@bunny-agent/manager": "0.9.59-beta.8",
64
+ "@bunny-agent/runner-codex": "0.6.2",
64
65
  "@bunny-agent/runner-claude": "0.6.2",
65
66
  "@bunny-agent/runner-copilot": "0.1.0",
66
- "@bunny-agent/runner-codex": "0.6.2",
67
- "@bunny-agent/runner-pi": "0.6.4-beta.0",
68
- "@bunny-agent/runner-opencode": "0.6.2",
69
67
  "@bunny-agent/runner-harness": "0.1.1-beta.0",
70
- "@bunny-agent/runner-gemini": "0.6.2"
68
+ "@bunny-agent/runner-gemini": "0.6.2",
69
+ "@bunny-agent/runner-opencode": "0.6.2",
70
+ "@bunny-agent/runner-pi": "0.6.4-beta.0"
71
71
  },
72
72
  "scripts": {
73
73
  "build": "tsc && pnpm bundle",