@autohq/cli 0.1.314 → 0.1.316
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/agent-bridge.js +34 -44
- package/dist/index.js +34 -44
- package/package.json +1 -1
package/dist/agent-bridge.js
CHANGED
|
@@ -23431,7 +23431,7 @@ Object.assign(lookup, {
|
|
|
23431
23431
|
// package.json
|
|
23432
23432
|
var package_default = {
|
|
23433
23433
|
name: "@autohq/cli",
|
|
23434
|
-
version: "0.1.
|
|
23434
|
+
version: "0.1.316",
|
|
23435
23435
|
license: "SEE LICENSE IN README.md",
|
|
23436
23436
|
publishConfig: {
|
|
23437
23437
|
access: "public"
|
|
@@ -40833,7 +40833,7 @@ var UiMessagePartTracker = class {
|
|
|
40833
40833
|
}
|
|
40834
40834
|
}
|
|
40835
40835
|
appendDataChunk(chunk) {
|
|
40836
|
-
if (!chunk.type.startsWith("data-")
|
|
40836
|
+
if (!chunk.type.startsWith("data-")) {
|
|
40837
40837
|
return [];
|
|
40838
40838
|
}
|
|
40839
40839
|
const dataChunk = chunk;
|
|
@@ -40974,22 +40974,6 @@ var AgentBridgeOutputBuffer = class {
|
|
|
40974
40974
|
await this.drainPendingOutputs({ force: true });
|
|
40975
40975
|
}
|
|
40976
40976
|
async emitUiMessageChunk(context, projection) {
|
|
40977
|
-
if (projection.chunk.type === "data-auto-question") {
|
|
40978
|
-
await this.flushPendingDelta();
|
|
40979
|
-
await this.emitLiveUiMessageChunk(context, projection.chunk);
|
|
40980
|
-
await this.enqueueProjectionAndDrain(context, {
|
|
40981
|
-
type: "entry",
|
|
40982
|
-
entry: {
|
|
40983
|
-
role: "assistant",
|
|
40984
|
-
kind: "question",
|
|
40985
|
-
...projection.turnStatus ? { turnStatus: projection.turnStatus } : {},
|
|
40986
|
-
content: {
|
|
40987
|
-
parts: [questionPart(projection.chunk.data)]
|
|
40988
|
-
}
|
|
40989
|
-
}
|
|
40990
|
-
});
|
|
40991
|
-
return;
|
|
40992
|
-
}
|
|
40993
40977
|
await this.flushPendingDelta();
|
|
40994
40978
|
await this.emitLiveUiMessageChunk(context, projection.chunk);
|
|
40995
40979
|
await this.emitUiMessagePartSnapshots(context, projection.chunk, {
|
|
@@ -41334,14 +41318,6 @@ var UiMessageAssembler = class {
|
|
|
41334
41318
|
function isTerminalUiMessageChunk(chunk) {
|
|
41335
41319
|
return chunk.type === "finish" || chunk.type === "error" || chunk.type === "abort";
|
|
41336
41320
|
}
|
|
41337
|
-
function questionPart(data) {
|
|
41338
|
-
const parsed = data;
|
|
41339
|
-
return {
|
|
41340
|
-
type: "question",
|
|
41341
|
-
toolCallId: parsed.toolCallId ?? null,
|
|
41342
|
-
questions: parsed.questions
|
|
41343
|
-
};
|
|
41344
|
-
}
|
|
41345
41321
|
function legacyToolEntry(chunk) {
|
|
41346
41322
|
switch (chunk.type) {
|
|
41347
41323
|
case "tool-input-available":
|
|
@@ -41952,15 +41928,21 @@ function conversationProjectionToUiChunks(projection) {
|
|
|
41952
41928
|
turnStatus: "waiting_for_input"
|
|
41953
41929
|
},
|
|
41954
41930
|
{
|
|
41955
|
-
type: "
|
|
41956
|
-
|
|
41957
|
-
|
|
41958
|
-
|
|
41959
|
-
|
|
41960
|
-
|
|
41931
|
+
type: "entry",
|
|
41932
|
+
entry: {
|
|
41933
|
+
role: "assistant",
|
|
41934
|
+
kind: "question",
|
|
41935
|
+
turnStatus: "waiting_for_input",
|
|
41936
|
+
content: {
|
|
41937
|
+
parts: [
|
|
41938
|
+
{
|
|
41939
|
+
type: "question",
|
|
41940
|
+
toolCallId: part.toolCallId,
|
|
41941
|
+
questions: part.questions
|
|
41942
|
+
}
|
|
41943
|
+
]
|
|
41961
41944
|
}
|
|
41962
|
-
}
|
|
41963
|
-
turnStatus: "waiting_for_input"
|
|
41945
|
+
}
|
|
41964
41946
|
}
|
|
41965
41947
|
] : []
|
|
41966
41948
|
);
|
|
@@ -63223,8 +63205,10 @@ var CodexProjector = class {
|
|
|
63223
63205
|
return [];
|
|
63224
63206
|
}
|
|
63225
63207
|
}
|
|
63226
|
-
// An approval parks the turn on operator input
|
|
63227
|
-
//
|
|
63208
|
+
// An approval parks the turn on operator input: the native approval chunk
|
|
63209
|
+
// transitions the tool part to `approval-requested` for AI SDK clients, and
|
|
63210
|
+
// the durable question entry keeps owning answer routing for the CLI
|
|
63211
|
+
// transcript. Both mark the delivered turn as waiting for input.
|
|
63228
63212
|
projectApproval(request) {
|
|
63229
63213
|
return [
|
|
63230
63214
|
{
|
|
@@ -63237,15 +63221,21 @@ var CodexProjector = class {
|
|
|
63237
63221
|
turnStatus: "waiting_for_input"
|
|
63238
63222
|
},
|
|
63239
63223
|
{
|
|
63240
|
-
type: "
|
|
63241
|
-
|
|
63242
|
-
|
|
63243
|
-
|
|
63244
|
-
|
|
63245
|
-
|
|
63224
|
+
type: "entry",
|
|
63225
|
+
entry: {
|
|
63226
|
+
role: "assistant",
|
|
63227
|
+
kind: "question",
|
|
63228
|
+
turnStatus: "waiting_for_input",
|
|
63229
|
+
content: {
|
|
63230
|
+
parts: [
|
|
63231
|
+
{
|
|
63232
|
+
type: "question",
|
|
63233
|
+
toolCallId: request.itemId,
|
|
63234
|
+
questions: [approvalQuestion(request)]
|
|
63235
|
+
}
|
|
63236
|
+
]
|
|
63246
63237
|
}
|
|
63247
|
-
}
|
|
63248
|
-
turnStatus: "waiting_for_input"
|
|
63238
|
+
}
|
|
63249
63239
|
}
|
|
63250
63240
|
];
|
|
63251
63241
|
}
|
package/dist/index.js
CHANGED
|
@@ -27058,7 +27058,7 @@ var init_package = __esm({
|
|
|
27058
27058
|
"package.json"() {
|
|
27059
27059
|
package_default = {
|
|
27060
27060
|
name: "@autohq/cli",
|
|
27061
|
-
version: "0.1.
|
|
27061
|
+
version: "0.1.316",
|
|
27062
27062
|
license: "SEE LICENSE IN README.md",
|
|
27063
27063
|
publishConfig: {
|
|
27064
27064
|
access: "public"
|
|
@@ -37945,7 +37945,7 @@ var UiMessagePartTracker = class {
|
|
|
37945
37945
|
}
|
|
37946
37946
|
}
|
|
37947
37947
|
appendDataChunk(chunk) {
|
|
37948
|
-
if (!chunk.type.startsWith("data-")
|
|
37948
|
+
if (!chunk.type.startsWith("data-")) {
|
|
37949
37949
|
return [];
|
|
37950
37950
|
}
|
|
37951
37951
|
const dataChunk = chunk;
|
|
@@ -38086,22 +38086,6 @@ var AgentBridgeOutputBuffer = class {
|
|
|
38086
38086
|
await this.drainPendingOutputs({ force: true });
|
|
38087
38087
|
}
|
|
38088
38088
|
async emitUiMessageChunk(context, projection) {
|
|
38089
|
-
if (projection.chunk.type === "data-auto-question") {
|
|
38090
|
-
await this.flushPendingDelta();
|
|
38091
|
-
await this.emitLiveUiMessageChunk(context, projection.chunk);
|
|
38092
|
-
await this.enqueueProjectionAndDrain(context, {
|
|
38093
|
-
type: "entry",
|
|
38094
|
-
entry: {
|
|
38095
|
-
role: "assistant",
|
|
38096
|
-
kind: "question",
|
|
38097
|
-
...projection.turnStatus ? { turnStatus: projection.turnStatus } : {},
|
|
38098
|
-
content: {
|
|
38099
|
-
parts: [questionPart(projection.chunk.data)]
|
|
38100
|
-
}
|
|
38101
|
-
}
|
|
38102
|
-
});
|
|
38103
|
-
return;
|
|
38104
|
-
}
|
|
38105
38089
|
await this.flushPendingDelta();
|
|
38106
38090
|
await this.emitLiveUiMessageChunk(context, projection.chunk);
|
|
38107
38091
|
await this.emitUiMessagePartSnapshots(context, projection.chunk, {
|
|
@@ -38446,14 +38430,6 @@ var UiMessageAssembler = class {
|
|
|
38446
38430
|
function isTerminalUiMessageChunk(chunk) {
|
|
38447
38431
|
return chunk.type === "finish" || chunk.type === "error" || chunk.type === "abort";
|
|
38448
38432
|
}
|
|
38449
|
-
function questionPart(data) {
|
|
38450
|
-
const parsed = data;
|
|
38451
|
-
return {
|
|
38452
|
-
type: "question",
|
|
38453
|
-
toolCallId: parsed.toolCallId ?? null,
|
|
38454
|
-
questions: parsed.questions
|
|
38455
|
-
};
|
|
38456
|
-
}
|
|
38457
38433
|
function legacyToolEntry(chunk) {
|
|
38458
38434
|
switch (chunk.type) {
|
|
38459
38435
|
case "tool-input-available":
|
|
@@ -39065,15 +39041,21 @@ function conversationProjectionToUiChunks(projection) {
|
|
|
39065
39041
|
turnStatus: "waiting_for_input"
|
|
39066
39042
|
},
|
|
39067
39043
|
{
|
|
39068
|
-
type: "
|
|
39069
|
-
|
|
39070
|
-
|
|
39071
|
-
|
|
39072
|
-
|
|
39073
|
-
|
|
39044
|
+
type: "entry",
|
|
39045
|
+
entry: {
|
|
39046
|
+
role: "assistant",
|
|
39047
|
+
kind: "question",
|
|
39048
|
+
turnStatus: "waiting_for_input",
|
|
39049
|
+
content: {
|
|
39050
|
+
parts: [
|
|
39051
|
+
{
|
|
39052
|
+
type: "question",
|
|
39053
|
+
toolCallId: part.toolCallId,
|
|
39054
|
+
questions: part.questions
|
|
39055
|
+
}
|
|
39056
|
+
]
|
|
39074
39057
|
}
|
|
39075
|
-
}
|
|
39076
|
-
turnStatus: "waiting_for_input"
|
|
39058
|
+
}
|
|
39077
39059
|
}
|
|
39078
39060
|
] : []
|
|
39079
39061
|
);
|
|
@@ -40768,8 +40750,10 @@ var CodexProjector = class {
|
|
|
40768
40750
|
return [];
|
|
40769
40751
|
}
|
|
40770
40752
|
}
|
|
40771
|
-
// An approval parks the turn on operator input
|
|
40772
|
-
//
|
|
40753
|
+
// An approval parks the turn on operator input: the native approval chunk
|
|
40754
|
+
// transitions the tool part to `approval-requested` for AI SDK clients, and
|
|
40755
|
+
// the durable question entry keeps owning answer routing for the CLI
|
|
40756
|
+
// transcript. Both mark the delivered turn as waiting for input.
|
|
40773
40757
|
projectApproval(request) {
|
|
40774
40758
|
return [
|
|
40775
40759
|
{
|
|
@@ -40782,15 +40766,21 @@ var CodexProjector = class {
|
|
|
40782
40766
|
turnStatus: "waiting_for_input"
|
|
40783
40767
|
},
|
|
40784
40768
|
{
|
|
40785
|
-
type: "
|
|
40786
|
-
|
|
40787
|
-
|
|
40788
|
-
|
|
40789
|
-
|
|
40790
|
-
|
|
40769
|
+
type: "entry",
|
|
40770
|
+
entry: {
|
|
40771
|
+
role: "assistant",
|
|
40772
|
+
kind: "question",
|
|
40773
|
+
turnStatus: "waiting_for_input",
|
|
40774
|
+
content: {
|
|
40775
|
+
parts: [
|
|
40776
|
+
{
|
|
40777
|
+
type: "question",
|
|
40778
|
+
toolCallId: request.itemId,
|
|
40779
|
+
questions: [approvalQuestion(request)]
|
|
40780
|
+
}
|
|
40781
|
+
]
|
|
40791
40782
|
}
|
|
40792
|
-
}
|
|
40793
|
-
turnStatus: "waiting_for_input"
|
|
40783
|
+
}
|
|
40794
40784
|
}
|
|
40795
40785
|
];
|
|
40796
40786
|
}
|