@hydra-acp/cli 0.1.21 → 0.1.22

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/cli.js +15 -3
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -8269,11 +8269,12 @@ function toolIconStyle(status) {
8269
8269
  }
8270
8270
  }
8271
8271
  function formatPlan(event) {
8272
+ const stopped = event.stopped === true;
8272
8273
  if (event.entries.length === 0) {
8273
8274
  return [
8274
8275
  {
8275
8276
  prefix: "\u25A3 ",
8276
- prefixStyle: "plan",
8277
+ prefixStyle: stopped ? "tool-status-fail" : "plan",
8277
8278
  body: "(empty plan)",
8278
8279
  bodyStyle: "dim"
8279
8280
  }
@@ -8282,7 +8283,7 @@ function formatPlan(event) {
8282
8283
  const allComplete = event.entries.every(
8283
8284
  (e) => (e.status ?? "pending") === "completed"
8284
8285
  );
8285
- const headerStyle = allComplete ? "plan-done" : "plan";
8286
+ const headerStyle = allComplete ? "plan-done" : stopped ? "tool-status-fail" : "plan";
8286
8287
  const lines = [
8287
8288
  {
8288
8289
  prefix: "\u25A3 ",
@@ -8294,7 +8295,7 @@ function formatPlan(event) {
8294
8295
  for (const entry of event.entries) {
8295
8296
  const status = entry.status ?? "pending";
8296
8297
  const marker = status === "completed" ? "[x]" : status === "in_progress" ? "[~]" : "[ ]";
8297
- const style = status === "completed" ? "plan-done" : status === "in_progress" ? "plan" : "plan-pending";
8298
+ const style = status === "completed" ? "plan-done" : status === "in_progress" ? stopped ? "plan-pending" : "plan" : "plan-pending";
8298
8299
  lines.push({
8299
8300
  prefix: " ",
8300
8301
  body: `${marker} ${entry.content}`,
@@ -9483,6 +9484,7 @@ async function runSession(term, config, opts, exitHint) {
9483
9484
  let toolsBlockStartedAt = null;
9484
9485
  let toolsBlockEndedAt = null;
9485
9486
  let toolsBlockStopReason = null;
9487
+ let lastPlanEvent = null;
9486
9488
  const TOOLS_COLLAPSED_LIMIT = 5;
9487
9489
  let agentBuffer = "";
9488
9490
  let agentKey = null;
@@ -9645,6 +9647,7 @@ async function runSession(term, config, opts, exitHint) {
9645
9647
  }
9646
9648
  screen.clearKey("tools");
9647
9649
  screen.clearKey("plan");
9650
+ lastPlanEvent = null;
9648
9651
  toolStates.clear();
9649
9652
  toolCallOrder.length = 0;
9650
9653
  toolsExpanded = false;
@@ -9670,6 +9673,7 @@ async function runSession(term, config, opts, exitHint) {
9670
9673
  }
9671
9674
  if (event.kind === "plan") {
9672
9675
  closeAgentText();
9676
+ lastPlanEvent = event;
9673
9677
  const lines = formatEvent(event);
9674
9678
  if (lines.length > 0) {
9675
9679
  screen.upsertLines("plan", lines);
@@ -9691,6 +9695,13 @@ async function runSession(term, config, opts, exitHint) {
9691
9695
  }
9692
9696
  if (event.kind === "turn-complete") {
9693
9697
  closeAgentText();
9698
+ if (lastPlanEvent !== null && event.stopReason !== void 0 && event.stopReason !== "end_turn") {
9699
+ const lines = formatEvent({ ...lastPlanEvent, stopped: true });
9700
+ if (lines.length > 0) {
9701
+ screen.upsertLines("plan", lines);
9702
+ }
9703
+ }
9704
+ lastPlanEvent = null;
9694
9705
  screen.clearKey("plan");
9695
9706
  if (toolsBlockStartedAt !== null) {
9696
9707
  toolsBlockEndedAt = Date.now();
@@ -9757,6 +9768,7 @@ async function runSession(term, config, opts, exitHint) {
9757
9768
  toolsExpanded = false;
9758
9769
  }
9759
9770
  screen.clearKey("plan");
9771
+ lastPlanEvent = null;
9760
9772
  if (pendingTurns > 0) {
9761
9773
  adjustPendingTurns(-pendingTurns);
9762
9774
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hydra-acp/cli",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "description": "Multi-client ACP session daemon: spawn agents, attach over WSS, multiplex sessions across editors.",
5
5
  "license": "MIT",
6
6
  "type": "module",