@autohq/cli 0.1.299 → 0.1.301

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.
@@ -23399,7 +23399,7 @@ Object.assign(lookup, {
23399
23399
  // package.json
23400
23400
  var package_default = {
23401
23401
  name: "@autohq/cli",
23402
- version: "0.1.299",
23402
+ version: "0.1.301",
23403
23403
  license: "SEE LICENSE IN README.md",
23404
23404
  publishConfig: {
23405
23405
  access: "public"
@@ -38547,6 +38547,13 @@ var AgentBridgeOutputBuffer = class {
38547
38547
  await this.emitUiMessagePartSnapshots(context, projection.chunk, {
38548
38548
  coveredSeq: this.outputSeq
38549
38549
  });
38550
+ const toolEntry = legacyToolEntry(projection.chunk);
38551
+ if (toolEntry) {
38552
+ await this.enqueueProjectionAndDrain(context, {
38553
+ type: "entry",
38554
+ entry: toolEntry
38555
+ });
38556
+ }
38550
38557
  const completedMessage = await this.appendUiChunkToAssembler(
38551
38558
  projection.chunk
38552
38559
  );
@@ -38850,6 +38857,60 @@ function questionPart(data) {
38850
38857
  questions: parsed.questions
38851
38858
  };
38852
38859
  }
38860
+ function legacyToolEntry(chunk) {
38861
+ switch (chunk.type) {
38862
+ case "tool-input-available":
38863
+ return {
38864
+ role: "assistant",
38865
+ kind: "tool_call",
38866
+ content: {
38867
+ parts: [
38868
+ {
38869
+ type: "tool_call",
38870
+ toolCallId: legacyToolCallId(chunk.toolCallId),
38871
+ name: chunk.toolName,
38872
+ input: toJsonValue(chunk.input)
38873
+ }
38874
+ ]
38875
+ }
38876
+ };
38877
+ case "tool-output-available":
38878
+ return {
38879
+ role: "tool",
38880
+ kind: "tool_result",
38881
+ content: {
38882
+ parts: [
38883
+ {
38884
+ type: "tool_result",
38885
+ toolUseId: legacyToolCallId(chunk.toolCallId),
38886
+ output: toJsonValue(chunk.output),
38887
+ isError: false
38888
+ }
38889
+ ]
38890
+ }
38891
+ };
38892
+ case "tool-output-error":
38893
+ return {
38894
+ role: "tool",
38895
+ kind: "tool_result",
38896
+ content: {
38897
+ parts: [
38898
+ {
38899
+ type: "tool_result",
38900
+ toolUseId: legacyToolCallId(chunk.toolCallId),
38901
+ output: chunk.errorText,
38902
+ isError: true
38903
+ }
38904
+ ]
38905
+ }
38906
+ };
38907
+ default:
38908
+ return null;
38909
+ }
38910
+ }
38911
+ function legacyToolCallId(toolCallId) {
38912
+ return toolCallId === UNKNOWN_MESSAGE_ID ? null : toolCallId;
38913
+ }
38853
38914
  function terminalStatusText(projection) {
38854
38915
  if (projection.statusText) {
38855
38916
  return projection.statusText;
@@ -59581,9 +59642,7 @@ var ClaudeAgentBridgeSessionImpl = class {
59581
59642
  this.input.writeOutput?.(
59582
59643
  `agent_bridge_claude_deferred_flush count=${pending.length}`
59583
59644
  );
59584
- for (const message of pending) {
59585
- this.enqueueUserMessage(message);
59586
- }
59645
+ this.enqueueUserMessage(pending.join("\n\n"));
59587
59646
  }
59588
59647
  async interruptActiveTurnBeforeMessage() {
59589
59648
  if (!this.hasInterruptibleTurn()) {
package/dist/index.js CHANGED
@@ -24689,7 +24689,7 @@ var init_package = __esm({
24689
24689
  "package.json"() {
24690
24690
  package_default = {
24691
24691
  name: "@autohq/cli",
24692
- version: "0.1.299",
24692
+ version: "0.1.301",
24693
24693
  license: "SEE LICENSE IN README.md",
24694
24694
  publishConfig: {
24695
24695
  access: "public"
@@ -35596,6 +35596,13 @@ var AgentBridgeOutputBuffer = class {
35596
35596
  await this.emitUiMessagePartSnapshots(context, projection.chunk, {
35597
35597
  coveredSeq: this.outputSeq
35598
35598
  });
35599
+ const toolEntry = legacyToolEntry(projection.chunk);
35600
+ if (toolEntry) {
35601
+ await this.enqueueProjectionAndDrain(context, {
35602
+ type: "entry",
35603
+ entry: toolEntry
35604
+ });
35605
+ }
35599
35606
  const completedMessage = await this.appendUiChunkToAssembler(
35600
35607
  projection.chunk
35601
35608
  );
@@ -35899,6 +35906,60 @@ function questionPart(data) {
35899
35906
  questions: parsed.questions
35900
35907
  };
35901
35908
  }
35909
+ function legacyToolEntry(chunk) {
35910
+ switch (chunk.type) {
35911
+ case "tool-input-available":
35912
+ return {
35913
+ role: "assistant",
35914
+ kind: "tool_call",
35915
+ content: {
35916
+ parts: [
35917
+ {
35918
+ type: "tool_call",
35919
+ toolCallId: legacyToolCallId(chunk.toolCallId),
35920
+ name: chunk.toolName,
35921
+ input: toJsonValue(chunk.input)
35922
+ }
35923
+ ]
35924
+ }
35925
+ };
35926
+ case "tool-output-available":
35927
+ return {
35928
+ role: "tool",
35929
+ kind: "tool_result",
35930
+ content: {
35931
+ parts: [
35932
+ {
35933
+ type: "tool_result",
35934
+ toolUseId: legacyToolCallId(chunk.toolCallId),
35935
+ output: toJsonValue(chunk.output),
35936
+ isError: false
35937
+ }
35938
+ ]
35939
+ }
35940
+ };
35941
+ case "tool-output-error":
35942
+ return {
35943
+ role: "tool",
35944
+ kind: "tool_result",
35945
+ content: {
35946
+ parts: [
35947
+ {
35948
+ type: "tool_result",
35949
+ toolUseId: legacyToolCallId(chunk.toolCallId),
35950
+ output: chunk.errorText,
35951
+ isError: true
35952
+ }
35953
+ ]
35954
+ }
35955
+ };
35956
+ default:
35957
+ return null;
35958
+ }
35959
+ }
35960
+ function legacyToolCallId(toolCallId) {
35961
+ return toolCallId === UNKNOWN_MESSAGE_ID ? null : toolCallId;
35962
+ }
35902
35963
  function terminalStatusText(projection) {
35903
35964
  if (projection.statusText) {
35904
35965
  return projection.statusText;
@@ -37059,9 +37120,7 @@ var ClaudeAgentBridgeSessionImpl = class {
37059
37120
  this.input.writeOutput?.(
37060
37121
  `agent_bridge_claude_deferred_flush count=${pending.length}`
37061
37122
  );
37062
- for (const message of pending) {
37063
- this.enqueueUserMessage(message);
37064
- }
37123
+ this.enqueueUserMessage(pending.join("\n\n"));
37065
37124
  }
37066
37125
  async interruptActiveTurnBeforeMessage() {
37067
37126
  if (!this.hasInterruptibleTurn()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autohq/cli",
3
- "version": "0.1.299",
3
+ "version": "0.1.301",
4
4
  "license": "SEE LICENSE IN README.md",
5
5
  "publishConfig": {
6
6
  "access": "public"