@autohq/cli 0.1.401 → 0.1.403
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 +78 -16
- package/dist/index.js +84 -18
- package/package.json +1 -1
package/dist/agent-bridge.js
CHANGED
|
@@ -30819,7 +30819,7 @@ Object.assign(lookup, {
|
|
|
30819
30819
|
// package.json
|
|
30820
30820
|
var package_default = {
|
|
30821
30821
|
name: "@autohq/cli",
|
|
30822
|
-
version: "0.1.
|
|
30822
|
+
version: "0.1.403",
|
|
30823
30823
|
license: "SEE LICENSE IN README.md",
|
|
30824
30824
|
publishConfig: {
|
|
30825
30825
|
access: "public"
|
|
@@ -32471,6 +32471,28 @@ function isClaudeCodeEdeDiagnosticOnlyError(errorMessage4) {
|
|
|
32471
32471
|
const lines = errorMessage4.split("\n").map((line) => line.trim()).filter((line) => line.length > 0);
|
|
32472
32472
|
return lines.length > 0 && lines.every((line) => line.startsWith(CLAUDE_CODE_EDE_DIAGNOSTIC_PREFIX));
|
|
32473
32473
|
}
|
|
32474
|
+
var CLAUDE_CODE_PERMISSION_DENIAL_MESSAGES = [
|
|
32475
|
+
"The user doesn't want to take this action right now. STOP what you are doing and wait for the user to tell you how to proceed.",
|
|
32476
|
+
"The user doesn't want to proceed with this tool use. The tool use was rejected (eg. if it was a file edit, the new_string was NOT written to the file). STOP what you are doing and wait for the user to tell you how to proceed.",
|
|
32477
|
+
"The user doesn't want to proceed with this tool use. The tool use was rejected (eg. if it was a file edit, the new_string was NOT written to the file). To tell you how to proceed, the user said:"
|
|
32478
|
+
];
|
|
32479
|
+
var CLAUDE_CODE_INTERRUPT_CANCELLED_TOOL_RESULT = "Tool call interrupted by a new incoming message; the work was cancelled, not denied \u2014 re-run if still needed.";
|
|
32480
|
+
var CLAUDE_CODE_PERMISSION_DENIAL_EXACT = new Set(
|
|
32481
|
+
CLAUDE_CODE_PERMISSION_DENIAL_MESSAGES
|
|
32482
|
+
);
|
|
32483
|
+
function isClaudeCodePermissionDenialText(text2) {
|
|
32484
|
+
const trimmed = text2.trim();
|
|
32485
|
+
if (CLAUDE_CODE_PERMISSION_DENIAL_EXACT.has(trimmed)) {
|
|
32486
|
+
return true;
|
|
32487
|
+
}
|
|
32488
|
+
return trimmed.startsWith(CLAUDE_CODE_PERMISSION_DENIAL_MESSAGES[2]);
|
|
32489
|
+
}
|
|
32490
|
+
function remapClaudeCodeInterruptToolResultErrorText(errorText, options) {
|
|
32491
|
+
if (options.interrupted && isClaudeCodePermissionDenialText(errorText)) {
|
|
32492
|
+
return CLAUDE_CODE_INTERRUPT_CANCELLED_TOOL_RESULT;
|
|
32493
|
+
}
|
|
32494
|
+
return null;
|
|
32495
|
+
}
|
|
32474
32496
|
function textContent(text2) {
|
|
32475
32497
|
return {
|
|
32476
32498
|
parts: [
|
|
@@ -33002,7 +33024,7 @@ var HARNESS_MODEL_RULES = {
|
|
|
33002
33024
|
providers: ["openai", "openrouter"],
|
|
33003
33025
|
defaultModel: "gpt-5.5",
|
|
33004
33026
|
curatedModels: {
|
|
33005
|
-
openai: ["gpt-5.5", "gpt-5.3-codex"]
|
|
33027
|
+
openai: ["gpt-5.6-sol", "gpt-5.5", "gpt-5.3-codex"]
|
|
33006
33028
|
},
|
|
33007
33029
|
openProviderPatterns: {
|
|
33008
33030
|
openrouter: OPENROUTER_MODEL_SLUG_PATTERN
|
|
@@ -33011,6 +33033,10 @@ var HARNESS_MODEL_RULES = {
|
|
|
33011
33033
|
reasoningEfforts: CODEX_REASONING_EFFORTS,
|
|
33012
33034
|
reasoningEffortsByModel: {
|
|
33013
33035
|
openai: {
|
|
33036
|
+
"gpt-5.6-sol": {
|
|
33037
|
+
defaultEffort: "medium",
|
|
33038
|
+
efforts: CODEX_REASONING_EFFORTS
|
|
33039
|
+
},
|
|
33014
33040
|
"gpt-5.5": {
|
|
33015
33041
|
defaultEffort: "medium",
|
|
33016
33042
|
efforts: CODEX_REASONING_EFFORTS
|
|
@@ -35987,12 +36013,28 @@ var RATE_CARD_2026_07_07 = {
|
|
|
35987
36013
|
"claude-sonnet-5": tier(3, 15)
|
|
35988
36014
|
}
|
|
35989
36015
|
};
|
|
36016
|
+
var RATE_CARD_2026_07_09 = {
|
|
36017
|
+
version: "2026-07-09",
|
|
36018
|
+
effectiveAt: "2026-07-09T00:00:00.000Z",
|
|
36019
|
+
models: {
|
|
36020
|
+
...RATE_CARD_2026_07_07.models,
|
|
36021
|
+
// OpenAI GPT-5.6 Sol preview price: input $5.00/Mtok, cache writes
|
|
36022
|
+
// $6.25/Mtok, cached reads $0.50/Mtok, and output $30.00/Mtok. Source
|
|
36023
|
+
// (verified 2026-07-09):
|
|
36024
|
+
// https://help.openai.com/en/articles/20001325-a-preview-of-gpt-5-6-sol-terra-and-luna
|
|
36025
|
+
"gpt-5.6-sol": openAi56Tier({
|
|
36026
|
+
input: 5,
|
|
36027
|
+
output: 30
|
|
36028
|
+
})
|
|
36029
|
+
}
|
|
36030
|
+
};
|
|
35990
36031
|
var PRICING_RATE_CARDS = {
|
|
35991
36032
|
[RATE_CARD_2026_06_23.version]: RATE_CARD_2026_06_23,
|
|
35992
36033
|
[RATE_CARD_2026_07_04.version]: RATE_CARD_2026_07_04,
|
|
35993
|
-
[RATE_CARD_2026_07_07.version]: RATE_CARD_2026_07_07
|
|
36034
|
+
[RATE_CARD_2026_07_07.version]: RATE_CARD_2026_07_07,
|
|
36035
|
+
[RATE_CARD_2026_07_09.version]: RATE_CARD_2026_07_09
|
|
35994
36036
|
};
|
|
35995
|
-
var CURRENT_PRICING_VERSION =
|
|
36037
|
+
var CURRENT_PRICING_VERSION = RATE_CARD_2026_07_09.version;
|
|
35996
36038
|
function tier(inputUsdPerMtok, outputUsdPerMtok) {
|
|
35997
36039
|
return {
|
|
35998
36040
|
inputUsdPerMtok,
|
|
@@ -36012,6 +36054,14 @@ function openAiTier(rates) {
|
|
|
36012
36054
|
cacheReadUsdPerMtok: rates.cachedInput
|
|
36013
36055
|
};
|
|
36014
36056
|
}
|
|
36057
|
+
function openAi56Tier(rates) {
|
|
36058
|
+
return {
|
|
36059
|
+
inputUsdPerMtok: rates.input,
|
|
36060
|
+
outputUsdPerMtok: rates.output,
|
|
36061
|
+
cacheWrite5mUsdPerMtok: rates.input * 1.25,
|
|
36062
|
+
cacheReadUsdPerMtok: rates.input * 0.1
|
|
36063
|
+
};
|
|
36064
|
+
}
|
|
36015
36065
|
|
|
36016
36066
|
// ../../packages/schemas/src/project-config.ts
|
|
36017
36067
|
var RESOURCE_KIND_CONFIG = "config";
|
|
@@ -57391,7 +57441,9 @@ var ClaudeCodeProjector = class {
|
|
|
57391
57441
|
if (suppressStreamed && (entry.kind === "message" || entry.kind === "tool_call")) {
|
|
57392
57442
|
return [];
|
|
57393
57443
|
}
|
|
57394
|
-
return conversationProjectionToUiChunks(entry
|
|
57444
|
+
return conversationProjectionToUiChunks(entry, {
|
|
57445
|
+
interrupted: this.interruptMarkerSeen
|
|
57446
|
+
});
|
|
57395
57447
|
});
|
|
57396
57448
|
if (parsed.result) {
|
|
57397
57449
|
outputs.push(...this.endActiveParts(), ...this.finishActiveToolInputs());
|
|
@@ -57532,7 +57584,11 @@ var ClaudeCodeProjector = class {
|
|
|
57532
57584
|
// persistence for the rest of the turn (session_5d00e0a8, 2026-07-05).
|
|
57533
57585
|
projectAssistantSnapshot(projections) {
|
|
57534
57586
|
const messageChunks = this.assistantSnapshotMessageChunks(projections);
|
|
57535
|
-
const rest = projections.filter((projection) => !isAssistantMessageOrToolCall(projection)).flatMap(
|
|
57587
|
+
const rest = projections.filter((projection) => !isAssistantMessageOrToolCall(projection)).flatMap(
|
|
57588
|
+
(projection) => conversationProjectionToUiChunks(projection, {
|
|
57589
|
+
interrupted: this.interruptMarkerSeen
|
|
57590
|
+
})
|
|
57591
|
+
);
|
|
57536
57592
|
const last = messageChunks.at(-1);
|
|
57537
57593
|
if (last?.type === "ui_message_chunk" && last.chunk.type === "finish" && rest.length > 0) {
|
|
57538
57594
|
return [...messageChunks.slice(0, -1), ...rest, last];
|
|
@@ -57754,7 +57810,7 @@ function textContentFromDelta(delta) {
|
|
|
57754
57810
|
return null;
|
|
57755
57811
|
}
|
|
57756
57812
|
}
|
|
57757
|
-
function conversationProjectionToUiChunks(projection) {
|
|
57813
|
+
function conversationProjectionToUiChunks(projection, options = { interrupted: false }) {
|
|
57758
57814
|
if (projection.role === "assistant" && projection.kind === "message") {
|
|
57759
57815
|
return messageContentChunks(projection);
|
|
57760
57816
|
}
|
|
@@ -57766,18 +57822,24 @@ function conversationProjectionToUiChunks(projection) {
|
|
|
57766
57822
|
if (part.type !== "tool_result") {
|
|
57767
57823
|
return [];
|
|
57768
57824
|
}
|
|
57769
|
-
|
|
57770
|
-
|
|
57771
|
-
|
|
57772
|
-
type: "tool-output-error",
|
|
57773
|
-
toolCallId: part.toolUseId ?? UNKNOWN_MESSAGE_ID,
|
|
57774
|
-
errorText: JSON.stringify(part.output)
|
|
57775
|
-
} : {
|
|
57825
|
+
if (!part.isError) {
|
|
57826
|
+
return [
|
|
57827
|
+
uiChunk({
|
|
57776
57828
|
type: "tool-output-available",
|
|
57777
57829
|
toolCallId: part.toolUseId ?? UNKNOWN_MESSAGE_ID,
|
|
57778
57830
|
output: part.output
|
|
57779
|
-
}
|
|
57780
|
-
|
|
57831
|
+
})
|
|
57832
|
+
];
|
|
57833
|
+
}
|
|
57834
|
+
const remapped = typeof part.output === "string" ? remapClaudeCodeInterruptToolResultErrorText(part.output, {
|
|
57835
|
+
interrupted: options.interrupted
|
|
57836
|
+
}) : null;
|
|
57837
|
+
return [
|
|
57838
|
+
uiChunk({
|
|
57839
|
+
type: "tool-output-error",
|
|
57840
|
+
toolCallId: part.toolUseId ?? UNKNOWN_MESSAGE_ID,
|
|
57841
|
+
errorText: remapped ?? JSON.stringify(part.output)
|
|
57842
|
+
})
|
|
57781
57843
|
];
|
|
57782
57844
|
});
|
|
57783
57845
|
}
|
package/dist/index.js
CHANGED
|
@@ -16156,6 +16156,19 @@ function isClaudeCodeEdeDiagnosticOnlyError(errorMessage6) {
|
|
|
16156
16156
|
const lines = errorMessage6.split("\n").map((line) => line.trim()).filter((line) => line.length > 0);
|
|
16157
16157
|
return lines.length > 0 && lines.every((line) => line.startsWith(CLAUDE_CODE_EDE_DIAGNOSTIC_PREFIX));
|
|
16158
16158
|
}
|
|
16159
|
+
function isClaudeCodePermissionDenialText(text) {
|
|
16160
|
+
const trimmed = text.trim();
|
|
16161
|
+
if (CLAUDE_CODE_PERMISSION_DENIAL_EXACT.has(trimmed)) {
|
|
16162
|
+
return true;
|
|
16163
|
+
}
|
|
16164
|
+
return trimmed.startsWith(CLAUDE_CODE_PERMISSION_DENIAL_MESSAGES[2]);
|
|
16165
|
+
}
|
|
16166
|
+
function remapClaudeCodeInterruptToolResultErrorText(errorText, options) {
|
|
16167
|
+
if (options.interrupted && isClaudeCodePermissionDenialText(errorText)) {
|
|
16168
|
+
return CLAUDE_CODE_INTERRUPT_CANCELLED_TOOL_RESULT;
|
|
16169
|
+
}
|
|
16170
|
+
return null;
|
|
16171
|
+
}
|
|
16159
16172
|
function textContent(text) {
|
|
16160
16173
|
return {
|
|
16161
16174
|
parts: [
|
|
@@ -16337,7 +16350,7 @@ function usdAmount(value) {
|
|
|
16337
16350
|
}
|
|
16338
16351
|
return value;
|
|
16339
16352
|
}
|
|
16340
|
-
var ASK_USER_QUESTION_TOOL_NAME, CLAUDE_CODE_INTERRUPT_MARKER_PREFIX, CLAUDE_CODE_EDE_DIAGNOSTIC_PREFIX, ClaudeCodeTextBlockSchema, ClaudeCodeToolUseBlockSchema, ClaudeCodeThinkingBlockSchema, ClaudeCodeToolResultBlockSchema, ClaudeCodeAssistantContentBlockSchema, OptionalClaudeCodeAssistantContentBlockSchema, ClaudeCodeAssistantContentSchema, OptionalClaudeCodeToolResultBlockSchema, ClaudeCodeToolResultContentSchema, ClaudeCodeUserContentSchema, ClaudeCodeAssistantMessageSchema, ClaudeCodeUserMessageSchema, ClaudeCodeSystemRecordSchema, ClaudeCodeAssistantRecordSchema, ClaudeCodeUserRecordSchema, ClaudeCodeInterruptMarkerRecordSchema, ClaudeCodeAggregateUsageSchema, ClaudeCodeModelUsageSchema, ClaudeCodeResultRecordSchema, ClaudeCodeSessionRecordSchema, ClaudeCodeStreamRecordSchema, AskUserQuestionInputSchema;
|
|
16353
|
+
var ASK_USER_QUESTION_TOOL_NAME, CLAUDE_CODE_INTERRUPT_MARKER_PREFIX, CLAUDE_CODE_EDE_DIAGNOSTIC_PREFIX, ClaudeCodeTextBlockSchema, ClaudeCodeToolUseBlockSchema, ClaudeCodeThinkingBlockSchema, ClaudeCodeToolResultBlockSchema, ClaudeCodeAssistantContentBlockSchema, OptionalClaudeCodeAssistantContentBlockSchema, ClaudeCodeAssistantContentSchema, OptionalClaudeCodeToolResultBlockSchema, ClaudeCodeToolResultContentSchema, ClaudeCodeUserContentSchema, ClaudeCodeAssistantMessageSchema, ClaudeCodeUserMessageSchema, ClaudeCodeSystemRecordSchema, ClaudeCodeAssistantRecordSchema, ClaudeCodeUserRecordSchema, ClaudeCodeInterruptMarkerRecordSchema, ClaudeCodeAggregateUsageSchema, ClaudeCodeModelUsageSchema, ClaudeCodeResultRecordSchema, ClaudeCodeSessionRecordSchema, ClaudeCodeStreamRecordSchema, CLAUDE_CODE_PERMISSION_DENIAL_MESSAGES, CLAUDE_CODE_INTERRUPT_CANCELLED_TOOL_RESULT, CLAUDE_CODE_PERMISSION_DENIAL_EXACT, AskUserQuestionInputSchema;
|
|
16341
16354
|
var init_claude_code = __esm({
|
|
16342
16355
|
"../../packages/schemas/src/claude-code.ts"() {
|
|
16343
16356
|
"use strict";
|
|
@@ -16457,6 +16470,15 @@ var init_claude_code = __esm({
|
|
|
16457
16470
|
ClaudeCodeUserRecordSchema,
|
|
16458
16471
|
ClaudeCodeResultRecordSchema
|
|
16459
16472
|
]);
|
|
16473
|
+
CLAUDE_CODE_PERMISSION_DENIAL_MESSAGES = [
|
|
16474
|
+
"The user doesn't want to take this action right now. STOP what you are doing and wait for the user to tell you how to proceed.",
|
|
16475
|
+
"The user doesn't want to proceed with this tool use. The tool use was rejected (eg. if it was a file edit, the new_string was NOT written to the file). STOP what you are doing and wait for the user to tell you how to proceed.",
|
|
16476
|
+
"The user doesn't want to proceed with this tool use. The tool use was rejected (eg. if it was a file edit, the new_string was NOT written to the file). To tell you how to proceed, the user said:"
|
|
16477
|
+
];
|
|
16478
|
+
CLAUDE_CODE_INTERRUPT_CANCELLED_TOOL_RESULT = "Tool call interrupted by a new incoming message; the work was cancelled, not denied \u2014 re-run if still needed.";
|
|
16479
|
+
CLAUDE_CODE_PERMISSION_DENIAL_EXACT = new Set(
|
|
16480
|
+
CLAUDE_CODE_PERMISSION_DENIAL_MESSAGES
|
|
16481
|
+
);
|
|
16460
16482
|
AskUserQuestionInputSchema = external_exports.object({
|
|
16461
16483
|
questions: external_exports.array(ConversationQuestionSchema.passthrough())
|
|
16462
16484
|
}).passthrough();
|
|
@@ -17126,7 +17148,7 @@ var init_model_selection = __esm({
|
|
|
17126
17148
|
providers: ["openai", "openrouter"],
|
|
17127
17149
|
defaultModel: "gpt-5.5",
|
|
17128
17150
|
curatedModels: {
|
|
17129
|
-
openai: ["gpt-5.5", "gpt-5.3-codex"]
|
|
17151
|
+
openai: ["gpt-5.6-sol", "gpt-5.5", "gpt-5.3-codex"]
|
|
17130
17152
|
},
|
|
17131
17153
|
openProviderPatterns: {
|
|
17132
17154
|
openrouter: OPENROUTER_MODEL_SLUG_PATTERN
|
|
@@ -17135,6 +17157,10 @@ var init_model_selection = __esm({
|
|
|
17135
17157
|
reasoningEfforts: CODEX_REASONING_EFFORTS,
|
|
17136
17158
|
reasoningEffortsByModel: {
|
|
17137
17159
|
openai: {
|
|
17160
|
+
"gpt-5.6-sol": {
|
|
17161
|
+
defaultEffort: "medium",
|
|
17162
|
+
efforts: CODEX_REASONING_EFFORTS
|
|
17163
|
+
},
|
|
17138
17164
|
"gpt-5.5": {
|
|
17139
17165
|
defaultEffort: "medium",
|
|
17140
17166
|
efforts: CODEX_REASONING_EFFORTS
|
|
@@ -20134,7 +20160,15 @@ function openAiTier(rates) {
|
|
|
20134
20160
|
cacheReadUsdPerMtok: rates.cachedInput
|
|
20135
20161
|
};
|
|
20136
20162
|
}
|
|
20137
|
-
|
|
20163
|
+
function openAi56Tier(rates) {
|
|
20164
|
+
return {
|
|
20165
|
+
inputUsdPerMtok: rates.input,
|
|
20166
|
+
outputUsdPerMtok: rates.output,
|
|
20167
|
+
cacheWrite5mUsdPerMtok: rates.input * 1.25,
|
|
20168
|
+
cacheReadUsdPerMtok: rates.input * 0.1
|
|
20169
|
+
};
|
|
20170
|
+
}
|
|
20171
|
+
var RATE_CARD_2026_06_23, RATE_CARD_2026_07_04, RATE_CARD_2026_07_07, RATE_CARD_2026_07_09, PRICING_RATE_CARDS, CURRENT_PRICING_VERSION;
|
|
20138
20172
|
var init_pricing = __esm({
|
|
20139
20173
|
"../../packages/schemas/src/pricing.ts"() {
|
|
20140
20174
|
"use strict";
|
|
@@ -20197,12 +20231,28 @@ var init_pricing = __esm({
|
|
|
20197
20231
|
"claude-sonnet-5": tier(3, 15)
|
|
20198
20232
|
}
|
|
20199
20233
|
};
|
|
20234
|
+
RATE_CARD_2026_07_09 = {
|
|
20235
|
+
version: "2026-07-09",
|
|
20236
|
+
effectiveAt: "2026-07-09T00:00:00.000Z",
|
|
20237
|
+
models: {
|
|
20238
|
+
...RATE_CARD_2026_07_07.models,
|
|
20239
|
+
// OpenAI GPT-5.6 Sol preview price: input $5.00/Mtok, cache writes
|
|
20240
|
+
// $6.25/Mtok, cached reads $0.50/Mtok, and output $30.00/Mtok. Source
|
|
20241
|
+
// (verified 2026-07-09):
|
|
20242
|
+
// https://help.openai.com/en/articles/20001325-a-preview-of-gpt-5-6-sol-terra-and-luna
|
|
20243
|
+
"gpt-5.6-sol": openAi56Tier({
|
|
20244
|
+
input: 5,
|
|
20245
|
+
output: 30
|
|
20246
|
+
})
|
|
20247
|
+
}
|
|
20248
|
+
};
|
|
20200
20249
|
PRICING_RATE_CARDS = {
|
|
20201
20250
|
[RATE_CARD_2026_06_23.version]: RATE_CARD_2026_06_23,
|
|
20202
20251
|
[RATE_CARD_2026_07_04.version]: RATE_CARD_2026_07_04,
|
|
20203
|
-
[RATE_CARD_2026_07_07.version]: RATE_CARD_2026_07_07
|
|
20252
|
+
[RATE_CARD_2026_07_07.version]: RATE_CARD_2026_07_07,
|
|
20253
|
+
[RATE_CARD_2026_07_09.version]: RATE_CARD_2026_07_09
|
|
20204
20254
|
};
|
|
20205
|
-
CURRENT_PRICING_VERSION =
|
|
20255
|
+
CURRENT_PRICING_VERSION = RATE_CARD_2026_07_09.version;
|
|
20206
20256
|
}
|
|
20207
20257
|
});
|
|
20208
20258
|
|
|
@@ -35072,7 +35122,7 @@ var init_package = __esm({
|
|
|
35072
35122
|
"package.json"() {
|
|
35073
35123
|
package_default = {
|
|
35074
35124
|
name: "@autohq/cli",
|
|
35075
|
-
version: "0.1.
|
|
35125
|
+
version: "0.1.403",
|
|
35076
35126
|
license: "SEE LICENSE IN README.md",
|
|
35077
35127
|
publishConfig: {
|
|
35078
35128
|
access: "public"
|
|
@@ -36814,6 +36864,10 @@ var init_agent_fields = __esm({
|
|
|
36814
36864
|
replace: specField(),
|
|
36815
36865
|
onReplace: fileBackedStringField(),
|
|
36816
36866
|
manages: specField(),
|
|
36867
|
+
// Per-target binding constraints (lifecycle / continuity / bind axes).
|
|
36868
|
+
// Spec scalar so the map deep-merges across imports (variants inherit
|
|
36869
|
+
// staff-engineer declarations unless they override a target entry).
|
|
36870
|
+
bindings: specField(),
|
|
36817
36871
|
workingDirectory: specField(),
|
|
36818
36872
|
tools: namedMapField()
|
|
36819
36873
|
};
|
|
@@ -47409,7 +47463,9 @@ var ClaudeCodeProjector = class {
|
|
|
47409
47463
|
if (suppressStreamed && (entry.kind === "message" || entry.kind === "tool_call")) {
|
|
47410
47464
|
return [];
|
|
47411
47465
|
}
|
|
47412
|
-
return conversationProjectionToUiChunks(entry
|
|
47466
|
+
return conversationProjectionToUiChunks(entry, {
|
|
47467
|
+
interrupted: this.interruptMarkerSeen
|
|
47468
|
+
});
|
|
47413
47469
|
});
|
|
47414
47470
|
if (parsed.result) {
|
|
47415
47471
|
outputs.push(...this.endActiveParts(), ...this.finishActiveToolInputs());
|
|
@@ -47550,7 +47606,11 @@ var ClaudeCodeProjector = class {
|
|
|
47550
47606
|
// persistence for the rest of the turn (session_5d00e0a8, 2026-07-05).
|
|
47551
47607
|
projectAssistantSnapshot(projections) {
|
|
47552
47608
|
const messageChunks = this.assistantSnapshotMessageChunks(projections);
|
|
47553
|
-
const rest = projections.filter((projection) => !isAssistantMessageOrToolCall(projection)).flatMap(
|
|
47609
|
+
const rest = projections.filter((projection) => !isAssistantMessageOrToolCall(projection)).flatMap(
|
|
47610
|
+
(projection) => conversationProjectionToUiChunks(projection, {
|
|
47611
|
+
interrupted: this.interruptMarkerSeen
|
|
47612
|
+
})
|
|
47613
|
+
);
|
|
47554
47614
|
const last = messageChunks.at(-1);
|
|
47555
47615
|
if (last?.type === "ui_message_chunk" && last.chunk.type === "finish" && rest.length > 0) {
|
|
47556
47616
|
return [...messageChunks.slice(0, -1), ...rest, last];
|
|
@@ -47772,7 +47832,7 @@ function textContentFromDelta(delta) {
|
|
|
47772
47832
|
return null;
|
|
47773
47833
|
}
|
|
47774
47834
|
}
|
|
47775
|
-
function conversationProjectionToUiChunks(projection) {
|
|
47835
|
+
function conversationProjectionToUiChunks(projection, options = { interrupted: false }) {
|
|
47776
47836
|
if (projection.role === "assistant" && projection.kind === "message") {
|
|
47777
47837
|
return messageContentChunks(projection);
|
|
47778
47838
|
}
|
|
@@ -47784,18 +47844,24 @@ function conversationProjectionToUiChunks(projection) {
|
|
|
47784
47844
|
if (part.type !== "tool_result") {
|
|
47785
47845
|
return [];
|
|
47786
47846
|
}
|
|
47787
|
-
|
|
47788
|
-
|
|
47789
|
-
|
|
47790
|
-
type: "tool-output-error",
|
|
47791
|
-
toolCallId: part.toolUseId ?? UNKNOWN_MESSAGE_ID,
|
|
47792
|
-
errorText: JSON.stringify(part.output)
|
|
47793
|
-
} : {
|
|
47847
|
+
if (!part.isError) {
|
|
47848
|
+
return [
|
|
47849
|
+
uiChunk({
|
|
47794
47850
|
type: "tool-output-available",
|
|
47795
47851
|
toolCallId: part.toolUseId ?? UNKNOWN_MESSAGE_ID,
|
|
47796
47852
|
output: part.output
|
|
47797
|
-
}
|
|
47798
|
-
|
|
47853
|
+
})
|
|
47854
|
+
];
|
|
47855
|
+
}
|
|
47856
|
+
const remapped = typeof part.output === "string" ? remapClaudeCodeInterruptToolResultErrorText(part.output, {
|
|
47857
|
+
interrupted: options.interrupted
|
|
47858
|
+
}) : null;
|
|
47859
|
+
return [
|
|
47860
|
+
uiChunk({
|
|
47861
|
+
type: "tool-output-error",
|
|
47862
|
+
toolCallId: part.toolUseId ?? UNKNOWN_MESSAGE_ID,
|
|
47863
|
+
errorText: remapped ?? JSON.stringify(part.output)
|
|
47864
|
+
})
|
|
47799
47865
|
];
|
|
47800
47866
|
});
|
|
47801
47867
|
}
|