@kimbho/kimbho-cli 0.1.25 → 0.1.26

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.cjs CHANGED
@@ -12718,7 +12718,7 @@ function createCompletionRuntimeCommand(program2) {
12718
12718
  // package.json
12719
12719
  var package_default = {
12720
12720
  name: "@kimbho/kimbho-cli",
12721
- version: "0.1.25",
12721
+ version: "0.1.26",
12722
12722
  description: "Kimbho CLI is a terminal-native coding agent for planning, execution, and verification.",
12723
12723
  type: "module",
12724
12724
  engines: {
@@ -44084,6 +44084,11 @@ function shouldAutoStartApprovedRuns(runtime) {
44084
44084
  const approvalMode = resolveRuntimeOverrideApprovalMode(runtime);
44085
44085
  return approvalMode === "auto" || approvalMode === "dontAsk" || approvalMode === "acceptEdits" || approvalMode === "bypassPermissions";
44086
44086
  }
44087
+ function shouldAutoStartProposal(runtime, proposal) {
44088
+ return Boolean(
44089
+ proposal && shouldAutoStartApprovedRuns(runtime) && !planRequiresOperatorReview(proposal.plan)
44090
+ );
44091
+ }
44087
44092
  function resolveShellMaxAutoTasks(runtime) {
44088
44093
  return shouldAutoStartApprovedRuns(runtime) ? UNBOUNDED_MAX_AUTO_TASKS : DEFAULT_MAX_AUTO_TASKS;
44089
44094
  }
@@ -44681,6 +44686,21 @@ function pickStatusLabel(message) {
44681
44686
  function pickIdleStatusLabel(seed) {
44682
44687
  return IDLE_STATUS_LABELS[hashString(seed) % IDLE_STATUS_LABELS.length];
44683
44688
  }
44689
+ function statusLabelForToolStart(event) {
44690
+ if (event.toolId === "shell.exec" || event.toolId === "tests.run") {
44691
+ const command = typeof event.input?.command === "string" ? event.input.command.trim().toLowerCase() : "";
44692
+ if (command.includes("build") || command.includes("lint") || command.includes("test")) {
44693
+ return "verifying";
44694
+ }
44695
+ if (command.includes("dev") || command.includes("start")) {
44696
+ return "serving";
44697
+ }
44698
+ if (command.length > 0) {
44699
+ return pickStatusLabel(command);
44700
+ }
44701
+ }
44702
+ return pickStatusLabel(event.reason ?? event.toolId);
44703
+ }
44684
44704
  function statusLabelForEvent(event) {
44685
44705
  switch (event.type) {
44686
44706
  case "task-note":
@@ -44688,7 +44708,7 @@ function statusLabelForEvent(event) {
44688
44708
  case "task-started":
44689
44709
  return pickStatusLabel(event.task.title);
44690
44710
  case "tool-started":
44691
- return pickStatusLabel(event.reason ?? event.toolId);
44711
+ return statusLabelForToolStart(event);
44692
44712
  case "model-usage":
44693
44713
  return "thinking";
44694
44714
  case "approval-requested":
@@ -44798,14 +44818,67 @@ function renderShellPlanSummary(plan) {
44798
44818
  }
44799
44819
  return lines;
44800
44820
  }
44821
+ function inferRecommendedPlanAnswer(question, plan) {
44822
+ const lower = question.toLowerCase();
44823
+ const goal = plan.goal.toLowerCase();
44824
+ if (lower.includes("brand voice") || lower.includes("visual direction")) {
44825
+ if (goal.includes("blog") || goal.includes("post")) {
44826
+ return "Use a premium editorial direction: clean typography, strong whitespace, restrained motion, and a polished reading-first layout.";
44827
+ }
44828
+ return "Use a restrained premium product direction: crisp typography, strong whitespace, subtle motion, and a clear call to action.";
44829
+ }
44830
+ if (lower.includes("which sections")) {
44831
+ if (goal.includes("blog") || goal.includes("post")) {
44832
+ return "Start with navigation, hero, featured posts, topic/category grid, newsletter CTA, and a compact footer.";
44833
+ }
44834
+ return "Start with navigation, hero, key benefits, proof/examples, primary CTA, and footer.";
44835
+ }
44836
+ if (lower.includes("primary call to action")) {
44837
+ if (goal.includes("blog") || goal.includes("post")) {
44838
+ return "Drive readers to featured posts first, with newsletter signup as the secondary CTA.";
44839
+ }
44840
+ return "Drive the main product action with one clear primary CTA and keep secondary actions minimal.";
44841
+ }
44842
+ if (lower.includes("which stack") || lower.includes("deployment target")) {
44843
+ return "Stay with the current repo stack and existing deployment shape unless the user asks for a migration.";
44844
+ }
44845
+ if (lower.includes("authentication model")) {
44846
+ return "Assume no authentication in the first version unless the request explicitly needs gated user flows.";
44847
+ }
44848
+ if (lower.includes("external services") || lower.includes("apis")) {
44849
+ return "Assume no new external integrations beyond what already exists in the repository.";
44850
+ }
44851
+ return "Proceed with the most pragmatic default that preserves the current repo and keeps the first version focused.";
44852
+ }
44853
+ function extractPlanReviewPrompts(plan) {
44854
+ return plan.openQuestions.slice(0, 3).map((question) => ({
44855
+ question,
44856
+ recommendation: inferRecommendedPlanAnswer(question, plan)
44857
+ }));
44858
+ }
44859
+ function planRequiresOperatorReview(plan) {
44860
+ return extractPlanReviewPrompts(plan).length > 0;
44861
+ }
44801
44862
  function renderPendingRunProposal(proposal, options = {}) {
44863
+ const reviewPrompts = extractPlanReviewPrompts(proposal.plan);
44864
+ const requiresReview = reviewPrompts.length > 0;
44802
44865
  const lines = [
44803
44866
  `${color(BOLD, proposal.source === "queued" ? "Queued Plan Ready" : "Ready To Run")}`,
44804
- ...renderShellPlanSummary(proposal.plan),
44805
- "",
44806
- color(DIM, `saved plan: ${proposal.planPath}`),
44807
- options.autoStart ? color(DIM, "next: auto-starting in the current permission mode") : "next: /approve to start, /run revise <feedback> to adjust, /run cancel to drop it"
44867
+ ...renderShellPlanSummary(proposal.plan)
44808
44868
  ];
44869
+ if (requiresReview) {
44870
+ lines.push("");
44871
+ lines.push(color(BOLD, "Recommended Defaults"));
44872
+ for (const prompt of reviewPrompts) {
44873
+ lines.push(`\u2022 ${prompt.question}`);
44874
+ lines.push(color(DIM, ` recommended: ${prompt.recommendation}`));
44875
+ }
44876
+ }
44877
+ lines.push("");
44878
+ lines.push(color(DIM, `saved plan: ${proposal.planPath}`));
44879
+ lines.push(
44880
+ requiresReview ? "next: /run approve to accept the recommended defaults, /run revise <feedback> to adjust, /run cancel to drop it" : options.autoStart ? color(DIM, "next: auto-starting in the current permission mode") : "next: /approve to start, /run revise <feedback> to adjust, /run cancel to drop it"
44881
+ );
44809
44882
  if (proposal.source === "queued") {
44810
44883
  lines.splice(1, 0, color(DIM, "The next queued request has been planned and is waiting for your approval."));
44811
44884
  }
@@ -44903,6 +44976,24 @@ function renderConciseProgress(board, startedAt) {
44903
44976
  ] : []
44904
44977
  ];
44905
44978
  }
44979
+ function summarizeToolStart(event) {
44980
+ if (event.toolId === "shell.exec" || event.toolId === "tests.run") {
44981
+ const command = typeof event.input?.command === "string" ? event.input.command.trim() : "";
44982
+ if (command) {
44983
+ return `Running ${shortenMiddle(command, 90)}`;
44984
+ }
44985
+ }
44986
+ if (event.toolId === "http.fetch" && typeof event.input?.url === "string") {
44987
+ return `Checking ${shortenMiddle(event.input.url, 90)}`;
44988
+ }
44989
+ if (event.toolId === "process.start" && typeof event.input?.command === "string") {
44990
+ return `Starting ${shortenMiddle(event.input.command, 90)}`;
44991
+ }
44992
+ if (event.toolId === "browser.open" && typeof event.input?.url === "string") {
44993
+ return `Opening ${shortenMiddle(event.input.url, 90)}`;
44994
+ }
44995
+ return null;
44996
+ }
44906
44997
  function renderLiveExecutionEvent(event, board, startedAt) {
44907
44998
  switch (event.type) {
44908
44999
  case "task-started":
@@ -44918,6 +45009,13 @@ function renderLiveExecutionEvent(event, board, startedAt) {
44918
45009
  )} ${simplifyExecutionSummary(event.summary) || event.taskId}`,
44919
45010
  ...renderConciseProgress(board, startedAt)
44920
45011
  ];
45012
+ case "tool-started": {
45013
+ const summary = summarizeToolStart(event);
45014
+ return summary ? [
45015
+ `${color(DIM, "working")} ${summary}`,
45016
+ ...renderConciseProgress(board, startedAt)
45017
+ ] : [];
45018
+ }
44921
45019
  case "task-note":
44922
45020
  return isUserVisibleTaskNote(event.message) ? [
44923
45021
  `${color(DIM, "note")} ${simplifyTaskNote(event.message)}`
@@ -45096,7 +45194,7 @@ async function drainQueuedWork(runtime) {
45096
45194
  source: "queued"
45097
45195
  });
45098
45196
  runtime.currentCwd = nextCwd;
45099
- if (shouldAutoStartApprovedRuns(runtime)) {
45197
+ if (shouldAutoStartProposal(runtime, runtime.pendingRunProposal)) {
45100
45198
  console.log(color(DIM, "Auto-starting queued request in the current permission mode."));
45101
45199
  startPendingRunExecution(runtime);
45102
45200
  }
@@ -45269,7 +45367,7 @@ async function prepareRunProposal(cwd, goal, runtime, options = {}) {
45269
45367
  console.log(renderPendingRunProposal(
45270
45368
  runtime.pendingRunProposal,
45271
45369
  {
45272
- autoStart: shouldAutoStartApprovedRuns(runtime)
45370
+ autoStart: shouldAutoStartProposal(runtime, runtime.pendingRunProposal)
45273
45371
  }
45274
45372
  ).join("\n"));
45275
45373
  return request.cwd;
@@ -46679,7 +46777,7 @@ async function handleShellCommand(cwd, input, state, runtime, execute) {
46679
46777
  const nextCwd = await prepareRunProposal(cwd, trimmed, runtime, {
46680
46778
  source: "direct"
46681
46779
  });
46682
- if (shouldAutoStartApprovedRuns(runtime)) {
46780
+ if (shouldAutoStartProposal(runtime, runtime.pendingRunProposal)) {
46683
46781
  console.log(color(DIM, "Auto-starting in the current permission mode."));
46684
46782
  startPendingRunExecution(runtime);
46685
46783
  }
@@ -46809,7 +46907,7 @@ async function handleShellCommand(cwd, input, state, runtime, execute) {
46809
46907
  console.log(renderPendingRunProposal(
46810
46908
  runtime.pendingRunProposal,
46811
46909
  {
46812
- autoStart: shouldAutoStartApprovedRuns(runtime)
46910
+ autoStart: shouldAutoStartProposal(runtime, runtime.pendingRunProposal)
46813
46911
  }
46814
46912
  ).join("\n"));
46815
46913
  return cwd;
@@ -46846,7 +46944,7 @@ async function handleShellCommand(cwd, input, state, runtime, execute) {
46846
46944
  const nextCwd = await prepareRunProposal(cwd, goal, runtime, {
46847
46945
  source: "direct"
46848
46946
  });
46849
- if (shouldAutoStartApprovedRuns(runtime)) {
46947
+ if (shouldAutoStartProposal(runtime, runtime.pendingRunProposal)) {
46850
46948
  console.log(color(DIM, "Auto-starting in the current permission mode."));
46851
46949
  startPendingRunExecution(runtime);
46852
46950
  }