@codexhost/cli-linux-arm64 0.19.0 → 0.20.0
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/README.md +1 -1
- package/app/codexhost-distribution.json +1 -1
- package/app/console-server.mjs +24 -3
- package/app/console-web.js +1095 -682
- package/app/desktop-controller.mjs +40 -4
- package/app/host-runtime.mjs +1572 -1120
- package/app/plugins/antigravity/plugin.mjs +8753 -4274
- package/app/plugins/claude-code/plugin.mjs +26 -3
- package/app/plugins/codebuddy/plugin.mjs +41 -5
- package/app/plugins/codex-usage/plugin.mjs +26 -3
- package/app/plugins/copilot/plugin.mjs +26 -3
- package/app/plugins/cursor-cli/plugin.mjs +26 -3
- package/app/plugins/deepseek-harness/plugin.mjs +26 -3
- package/app/plugins/devin/plugin.mjs +25 -3
- package/app/plugins/grok/plugin.mjs +26 -3
- package/app/plugins/hermes/plugin.mjs +25 -3
- package/app/plugins/kimi-code/plugin.mjs +26 -3
- package/app/plugins/kiro-cli/plugin.mjs +26 -3
- package/app/plugins/omp/plugin.mjs +44 -6
- package/app/plugins/opencode/plugin.mjs +26 -3
- package/app/plugins/pi/plugin.mjs +45 -6
- package/app/plugins/qoder/plugin.mjs +48 -4
- package/app/plugins/qoder-cn/plugin.mjs +48 -4
- package/app/plugins/qwen-code/plugin.mjs +26 -3
- package/app/plugins/workbuddy/plugin.mjs +45 -8
- package/app/plugins/zcode/plugin.mjs +26 -3
- package/app/renderer-extension.js +1411 -737
- package/app/web/assets/index-D6-hvggd.css +1 -0
- package/app/web/assets/index-D85gPBbQ.js +201 -0
- package/app/web/assets/langs/{graphql-B8vkg11W.js → graphql-ChAeyPkT.js} +1 -1
- package/app/web/assets/langs/{http-DmoDEjMt.js → http-BvreBIbD.js} +1 -1
- package/app/web/assets/langs/{php-DJ5ovfAM.js → php-D8omCIuJ.js} +1 -1
- package/app/web/assets/langs/{rst-U5-R5x3p.js → rst-Do7RLLCS.js} +1 -1
- package/app/web/assets/langs/{ruby-VKVsnS0H.js → ruby-rH_O_vse.js} +1 -1
- package/app/web/assets/langs/{svelte-C20lOv9V.js → svelte-xZy73wAj.js} +1 -1
- package/app/web/assets/langs/{vue-z6Y-lzP-.js → vue-C4DW8agZ.js} +1 -1
- package/app/web/assets/{vendor-dSL872WO.js → vendor-C9g2bw8s.js} +3 -3
- package/app/web/codexhost-settings.js +1101 -684
- package/app/web/index.html +4 -3
- package/app/web/plugins/deepseek-ai__dsh-api-gateway/client.js +2 -2
- package/app/web/plugins/deepseek-ai__dsh-api-remotes/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-api-session-controller/client.js +8 -8
- package/app/web/plugins/deepseek-ai__dsh-client-connection/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-chat/client.js +74 -69
- package/app/web/plugins/deepseek-ai__dsh-client-ui-codexhost/client.js +3 -3
- package/app/web/plugins/deepseek-ai__dsh-client-ui-conversation/client.js +13 -13
- package/app/web/plugins/deepseek-ai__dsh-client-ui-session/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-tool/client.js +18 -18
- package/app/web/plugins/deepseek-ai__dsh-client-ui-workspace/client.js +7 -7
- package/app/web-modules/server.mjs +138 -70
- package/bin/codexhost +0 -0
- package/libexec/codexhost-shim +0 -0
- package/libexec/codexhost-updater +0 -0
- package/package.json +1 -1
- package/app/web/assets/index-BNQIOOHE.css +0 -1
- package/app/web/assets/index-Feo4BkqN.js +0 -199
|
@@ -15059,13 +15059,25 @@ var threadPermissionModeSelectParamsSchema = external_exports.object({
|
|
|
15059
15059
|
var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonnegative();
|
|
15060
15060
|
var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
|
|
15061
15061
|
var cacheHitRatePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
15062
|
+
var usageOutputTimingSchema = external_exports.object({
|
|
15063
|
+
version: external_exports.literal(3).optional(),
|
|
15064
|
+
requestId: external_exports.string().min(1),
|
|
15065
|
+
turnId: external_exports.string().min(1).max(1024),
|
|
15066
|
+
outputTokens: nonNegativeSafeIntegerSchema,
|
|
15067
|
+
startedAtMs: nonNegativeSafeIntegerSchema,
|
|
15068
|
+
completedAtMs: nonNegativeSafeIntegerSchema
|
|
15069
|
+
}).strict().refine((value) => value.completedAtMs > value.startedAtMs);
|
|
15062
15070
|
var usageMeasurementSchema = external_exports.object({
|
|
15071
|
+
version: external_exports.union([external_exports.literal(2), external_exports.literal(3)]).optional(),
|
|
15063
15072
|
value: finiteNonNegativeNumberSchema,
|
|
15064
15073
|
turnId: external_exports.string().min(1).max(1024),
|
|
15065
15074
|
at: nonNegativeSafeIntegerSchema
|
|
15066
15075
|
}).strict();
|
|
15067
15076
|
var usageMeasurementsSchema = external_exports.object({
|
|
15068
|
-
|
|
15077
|
+
// Unversioned intervals can omit hidden thinking time; do not restore them into averages.
|
|
15078
|
+
outputTimings: external_exports.array(usageOutputTimingSchema).transform((values) => values.filter((value) => value.version === 3)).optional(),
|
|
15079
|
+
// Retain independent TTFT facts when dropping incompatible speed measurements.
|
|
15080
|
+
outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 3).optional().catch(void 0),
|
|
15069
15081
|
timeToFirstOutputMs: usageMeasurementSchema.extend({ value: nonNegativeSafeIntegerSchema }).optional()
|
|
15070
15082
|
}).strict();
|
|
15071
15083
|
var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text4) => text4.length <= maximum));
|
|
@@ -15085,6 +15097,7 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
15085
15097
|
cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
15086
15098
|
outputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
15087
15099
|
outputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
15100
|
+
sessionOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
15088
15101
|
apiOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
15089
15102
|
reasoningOutputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
15090
15103
|
totalTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
@@ -15496,6 +15509,10 @@ var threadSteeringInspectResultSchema = external_exports.object({
|
|
|
15496
15509
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
15497
15510
|
}).strict();
|
|
15498
15511
|
|
|
15512
|
+
// ../../shared-contracts/dist/thread-archive-confirm.js
|
|
15513
|
+
var threadArchiveConfirmParamsSchema = external_exports.object({ threadId: hostThreadIdSchema }).strict();
|
|
15514
|
+
var threadArchiveConfirmResultSchema = external_exports.object({ confirmed: external_exports.boolean() }).strict();
|
|
15515
|
+
|
|
15499
15516
|
// ../../shared-contracts/dist/client-channel.js
|
|
15500
15517
|
var CLIENT_CHANNEL_VERSION = 1;
|
|
15501
15518
|
var CLIENT_REQUEST_LIMIT_BYTES = 128 * 1024 * 1024;
|
|
@@ -15635,7 +15652,12 @@ var clientThreadSnapshotSchema = external_exports.object({
|
|
|
15635
15652
|
/** Current interruptible Host Turn, including command Turns omitted from client history. */
|
|
15636
15653
|
activeTurnId: external_exports.string().min(1).nullable().optional(),
|
|
15637
15654
|
/** Most recent explicit command in this Host process; not native conversation history. */
|
|
15638
|
-
command: external_exports.object({
|
|
15655
|
+
command: external_exports.object({
|
|
15656
|
+
name: external_exports.string().min(1),
|
|
15657
|
+
turn: clientTurnSchema,
|
|
15658
|
+
/** First ordinary Turn started after this command; its retained result is not a new event. */
|
|
15659
|
+
subsequentTurnId: external_exports.string().min(1).optional()
|
|
15660
|
+
}).optional(),
|
|
15639
15661
|
thread: external_exports.object({
|
|
15640
15662
|
id: external_exports.string().min(1),
|
|
15641
15663
|
cwd: external_exports.string(),
|
|
@@ -15843,7 +15865,6 @@ var webAccessStateSchema = external_exports.object({
|
|
|
15843
15865
|
quotaUntil: external_exports.string().optional()
|
|
15844
15866
|
}).strict().optional()
|
|
15845
15867
|
}).strict();
|
|
15846
|
-
var webLocalAccessRequiredDetailsSchema = external_exports.object({ url: external_exports.string() }).strict();
|
|
15847
15868
|
|
|
15848
15869
|
// ../../shared-contracts/dist/delegation-read.js
|
|
15849
15870
|
var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
@@ -17130,6 +17151,7 @@ var usageFields = /* @__PURE__ */ new Set([
|
|
|
17130
17151
|
"totalCredits",
|
|
17131
17152
|
"contextUsagePercent",
|
|
17132
17153
|
"outputTokensPerSecond",
|
|
17154
|
+
"sessionOutputTokensPerSecond",
|
|
17133
17155
|
"apiOutputTokensPerSecond",
|
|
17134
17156
|
"costSource",
|
|
17135
17157
|
"unpricedModels"
|
|
@@ -17152,6 +17174,7 @@ function parseHostUsage(value) {
|
|
|
17152
17174
|
for (const field2 of [
|
|
17153
17175
|
"totalCredits",
|
|
17154
17176
|
"contextUsagePercent",
|
|
17177
|
+
"sessionOutputTokensPerSecond",
|
|
17155
17178
|
"apiOutputTokensPerSecond"
|
|
17156
17179
|
]) {
|
|
17157
17180
|
const candidate = value[field2];
|
|
@@ -21879,6 +21902,7 @@ var PiRpcSession = class {
|
|
|
21879
21902
|
#autonomousLifecycleHandler = null;
|
|
21880
21903
|
#usageHandler = null;
|
|
21881
21904
|
#usageRequestStartedAtMs = null;
|
|
21905
|
+
#usageRequestTimingUnavailable = false;
|
|
21882
21906
|
// Pieces of the unterminated frame; joined once at its newline so a large frame (a long
|
|
21883
21907
|
// Session's get_entries) costs linear rather than quadratic copying on the Host event loop.
|
|
21884
21908
|
#buffer = [];
|
|
@@ -21954,14 +21978,29 @@ var PiRpcSession = class {
|
|
|
21954
21978
|
/** Every finished assistant message is one model request, with or without an active Turn. */
|
|
21955
21979
|
#observeUsage(value) {
|
|
21956
21980
|
if (value.type === "message_start") {
|
|
21957
|
-
if (isRecord9(value.message) && value.message.role === "assistant")
|
|
21981
|
+
if (isRecord9(value.message) && value.message.role === "assistant") {
|
|
21958
21982
|
this.#usageRequestStartedAtMs = null;
|
|
21983
|
+
this.#usageRequestTimingUnavailable = false;
|
|
21984
|
+
}
|
|
21959
21985
|
return;
|
|
21960
21986
|
}
|
|
21961
21987
|
if (value.type === "message_update") {
|
|
21962
21988
|
const event = value.assistantMessageEvent;
|
|
21963
|
-
if (this.#usageRequestStartedAtMs === null && isRecord9(event) && typeof event.type === "string"
|
|
21964
|
-
|
|
21989
|
+
if (this.#usageRequestStartedAtMs === null && !this.#usageRequestTimingUnavailable && isRecord9(event) && typeof event.type === "string") {
|
|
21990
|
+
if (
|
|
21991
|
+
// Native thinking starts can precede visible text by seconds; output usage includes it.
|
|
21992
|
+
/^(thinking|reasoning|thought)_start$/u.test(event.type) || /^(text|thinking|reasoning|thought)_delta$/u.test(event.type) && typeof event.delta === "string" && event.delta.length > 0
|
|
21993
|
+
)
|
|
21994
|
+
this.#usageRequestStartedAtMs = Date.now();
|
|
21995
|
+
else if (event.type === "toolcall_delta" && typeof event.delta === "string" && event.delta.length > 0) {
|
|
21996
|
+
try {
|
|
21997
|
+
JSON.parse(event.delta);
|
|
21998
|
+
this.#usageRequestTimingUnavailable = true;
|
|
21999
|
+
} catch {
|
|
22000
|
+
this.#usageRequestStartedAtMs = Date.now();
|
|
22001
|
+
}
|
|
22002
|
+
} else if (event.type === "toolcall_end")
|
|
22003
|
+
this.#usageRequestTimingUnavailable = true;
|
|
21965
22004
|
}
|
|
21966
22005
|
return;
|
|
21967
22006
|
}
|
|
@@ -27648,13 +27648,25 @@ var threadPermissionModeSelectParamsSchema = external_exports.object({
|
|
|
27648
27648
|
var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonnegative();
|
|
27649
27649
|
var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
|
|
27650
27650
|
var cacheHitRatePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
27651
|
+
var usageOutputTimingSchema = external_exports.object({
|
|
27652
|
+
version: external_exports.literal(3).optional(),
|
|
27653
|
+
requestId: external_exports.string().min(1),
|
|
27654
|
+
turnId: external_exports.string().min(1).max(1024),
|
|
27655
|
+
outputTokens: nonNegativeSafeIntegerSchema,
|
|
27656
|
+
startedAtMs: nonNegativeSafeIntegerSchema,
|
|
27657
|
+
completedAtMs: nonNegativeSafeIntegerSchema
|
|
27658
|
+
}).strict().refine((value) => value.completedAtMs > value.startedAtMs);
|
|
27651
27659
|
var usageMeasurementSchema = external_exports.object({
|
|
27660
|
+
version: external_exports.union([external_exports.literal(2), external_exports.literal(3)]).optional(),
|
|
27652
27661
|
value: finiteNonNegativeNumberSchema,
|
|
27653
27662
|
turnId: external_exports.string().min(1).max(1024),
|
|
27654
27663
|
at: nonNegativeSafeIntegerSchema
|
|
27655
27664
|
}).strict();
|
|
27656
27665
|
var usageMeasurementsSchema = external_exports.object({
|
|
27657
|
-
|
|
27666
|
+
// Unversioned intervals can omit hidden thinking time; do not restore them into averages.
|
|
27667
|
+
outputTimings: external_exports.array(usageOutputTimingSchema).transform((values) => values.filter((value) => value.version === 3)).optional(),
|
|
27668
|
+
// Retain independent TTFT facts when dropping incompatible speed measurements.
|
|
27669
|
+
outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 3).optional().catch(void 0),
|
|
27658
27670
|
timeToFirstOutputMs: usageMeasurementSchema.extend({ value: nonNegativeSafeIntegerSchema }).optional()
|
|
27659
27671
|
}).strict();
|
|
27660
27672
|
var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text) => text.length <= maximum));
|
|
@@ -27674,6 +27686,7 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
27674
27686
|
cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
27675
27687
|
outputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
27676
27688
|
outputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
27689
|
+
sessionOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
27677
27690
|
apiOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
27678
27691
|
reasoningOutputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
27679
27692
|
totalTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
@@ -28085,6 +28098,10 @@ var threadSteeringInspectResultSchema = external_exports.object({
|
|
|
28085
28098
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
28086
28099
|
}).strict();
|
|
28087
28100
|
|
|
28101
|
+
// ../../shared-contracts/dist/thread-archive-confirm.js
|
|
28102
|
+
var threadArchiveConfirmParamsSchema = external_exports.object({ threadId: hostThreadIdSchema }).strict();
|
|
28103
|
+
var threadArchiveConfirmResultSchema = external_exports.object({ confirmed: external_exports.boolean() }).strict();
|
|
28104
|
+
|
|
28088
28105
|
// ../../shared-contracts/dist/client-channel.js
|
|
28089
28106
|
var CLIENT_CHANNEL_VERSION = 1;
|
|
28090
28107
|
var CLIENT_REQUEST_LIMIT_BYTES = 128 * 1024 * 1024;
|
|
@@ -28224,7 +28241,12 @@ var clientThreadSnapshotSchema = external_exports.object({
|
|
|
28224
28241
|
/** Current interruptible Host Turn, including command Turns omitted from client history. */
|
|
28225
28242
|
activeTurnId: external_exports.string().min(1).nullable().optional(),
|
|
28226
28243
|
/** Most recent explicit command in this Host process; not native conversation history. */
|
|
28227
|
-
command: external_exports.object({
|
|
28244
|
+
command: external_exports.object({
|
|
28245
|
+
name: external_exports.string().min(1),
|
|
28246
|
+
turn: clientTurnSchema,
|
|
28247
|
+
/** First ordinary Turn started after this command; its retained result is not a new event. */
|
|
28248
|
+
subsequentTurnId: external_exports.string().min(1).optional()
|
|
28249
|
+
}).optional(),
|
|
28228
28250
|
thread: external_exports.object({
|
|
28229
28251
|
id: external_exports.string().min(1),
|
|
28230
28252
|
cwd: external_exports.string(),
|
|
@@ -28432,7 +28454,6 @@ var webAccessStateSchema = external_exports.object({
|
|
|
28432
28454
|
quotaUntil: external_exports.string().optional()
|
|
28433
28455
|
}).strict().optional()
|
|
28434
28456
|
}).strict();
|
|
28435
|
-
var webLocalAccessRequiredDetailsSchema = external_exports.object({ url: external_exports.string() }).strict();
|
|
28436
28457
|
|
|
28437
28458
|
// ../../shared-contracts/dist/delegation-read.js
|
|
28438
28459
|
var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
@@ -29995,6 +30016,7 @@ var usageFields = /* @__PURE__ */ new Set([
|
|
|
29995
30016
|
"totalCredits",
|
|
29996
30017
|
"contextUsagePercent",
|
|
29997
30018
|
"outputTokensPerSecond",
|
|
30019
|
+
"sessionOutputTokensPerSecond",
|
|
29998
30020
|
"apiOutputTokensPerSecond",
|
|
29999
30021
|
"costSource",
|
|
30000
30022
|
"unpricedModels"
|
|
@@ -30017,6 +30039,7 @@ function parseHostUsage(value) {
|
|
|
30017
30039
|
for (const field2 of [
|
|
30018
30040
|
"totalCredits",
|
|
30019
30041
|
"contextUsagePercent",
|
|
30042
|
+
"sessionOutputTokensPerSecond",
|
|
30020
30043
|
"apiOutputTokensPerSecond"
|
|
30021
30044
|
]) {
|
|
30022
30045
|
const candidate = value[field2];
|
|
@@ -53046,6 +53069,8 @@ var QoderSession = class {
|
|
|
53046
53069
|
}
|
|
53047
53070
|
}
|
|
53048
53071
|
async #dispatchMessage(message) {
|
|
53072
|
+
if ((message.type === "assistant" || message.type === "stream_event" || message.type === "user") && message.parent_tool_use_id !== null && message.parent_tool_use_id !== void 0)
|
|
53073
|
+
return;
|
|
53049
53074
|
switch (message.type) {
|
|
53050
53075
|
case "system":
|
|
53051
53076
|
this.#handleSystemMessage(message);
|
|
@@ -53222,7 +53247,17 @@ var QoderSession = class {
|
|
|
53222
53247
|
if (!Array.isArray(content))
|
|
53223
53248
|
return;
|
|
53224
53249
|
const hasToolUseInMessage = content.some((block) => typeof block === "object" && block !== null && block.type === "tool_use");
|
|
53225
|
-
for (const block of content) {
|
|
53250
|
+
for (const [index, block] of content.entries()) {
|
|
53251
|
+
if (message.uuid && typeof block === "object" && block !== null) {
|
|
53252
|
+
const raw = block;
|
|
53253
|
+
const text = raw.type === "text" ? raw.text : raw.type === "thinking" ? raw.thinking : void 0;
|
|
53254
|
+
if (typeof text === "string") {
|
|
53255
|
+
const key = JSON.stringify([message.uuid, index, raw.type, text]);
|
|
53256
|
+
if (this.#activeTurn.projectedTextSnapshots.has(key))
|
|
53257
|
+
continue;
|
|
53258
|
+
this.#activeTurn.projectedTextSnapshots.add(key);
|
|
53259
|
+
}
|
|
53260
|
+
}
|
|
53226
53261
|
this.#projectAssistantBlock(block, hasToolUseInMessage);
|
|
53227
53262
|
}
|
|
53228
53263
|
}
|
|
@@ -53344,6 +53379,11 @@ var QoderSession = class {
|
|
|
53344
53379
|
});
|
|
53345
53380
|
}
|
|
53346
53381
|
} else if (rawBlock.type === "tool_use") {
|
|
53382
|
+
if (typeof rawBlock.id === "string" && rawBlock.id.trim()) {
|
|
53383
|
+
if (this.#activeTurn.startedToolIds.has(rawBlock.id))
|
|
53384
|
+
return;
|
|
53385
|
+
this.#activeTurn.startedToolIds.add(rawBlock.id);
|
|
53386
|
+
}
|
|
53347
53387
|
if (this.#activeTurn.activeStreamingMessageItemId) {
|
|
53348
53388
|
this.#emitEvent({
|
|
53349
53389
|
type: "item.completed",
|
|
@@ -53823,6 +53863,8 @@ var QoderSession = class {
|
|
|
53823
53863
|
this.#activeTurn = {
|
|
53824
53864
|
turnId: command.turnId,
|
|
53825
53865
|
userMessageUuid,
|
|
53866
|
+
startedToolIds: /* @__PURE__ */ new Set(),
|
|
53867
|
+
projectedTextSnapshots: /* @__PURE__ */ new Set(),
|
|
53826
53868
|
accumulatedStreamingText: "",
|
|
53827
53869
|
accumulatedStreamingReasoning: ""
|
|
53828
53870
|
};
|
|
@@ -54211,6 +54253,8 @@ var QoderSession = class {
|
|
|
54211
54253
|
this.#activeTurn = {
|
|
54212
54254
|
turnId: command.turnId,
|
|
54213
54255
|
userMessageUuid,
|
|
54256
|
+
startedToolIds: /* @__PURE__ */ new Set(),
|
|
54257
|
+
projectedTextSnapshots: /* @__PURE__ */ new Set(),
|
|
54214
54258
|
accumulatedStreamingText: "",
|
|
54215
54259
|
accumulatedStreamingReasoning: "",
|
|
54216
54260
|
isCompaction,
|
|
@@ -27245,13 +27245,25 @@ var threadPermissionModeSelectParamsSchema = external_exports.object({
|
|
|
27245
27245
|
var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonnegative();
|
|
27246
27246
|
var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
|
|
27247
27247
|
var cacheHitRatePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
27248
|
+
var usageOutputTimingSchema = external_exports.object({
|
|
27249
|
+
version: external_exports.literal(3).optional(),
|
|
27250
|
+
requestId: external_exports.string().min(1),
|
|
27251
|
+
turnId: external_exports.string().min(1).max(1024),
|
|
27252
|
+
outputTokens: nonNegativeSafeIntegerSchema,
|
|
27253
|
+
startedAtMs: nonNegativeSafeIntegerSchema,
|
|
27254
|
+
completedAtMs: nonNegativeSafeIntegerSchema
|
|
27255
|
+
}).strict().refine((value) => value.completedAtMs > value.startedAtMs);
|
|
27248
27256
|
var usageMeasurementSchema = external_exports.object({
|
|
27257
|
+
version: external_exports.union([external_exports.literal(2), external_exports.literal(3)]).optional(),
|
|
27249
27258
|
value: finiteNonNegativeNumberSchema,
|
|
27250
27259
|
turnId: external_exports.string().min(1).max(1024),
|
|
27251
27260
|
at: nonNegativeSafeIntegerSchema
|
|
27252
27261
|
}).strict();
|
|
27253
27262
|
var usageMeasurementsSchema = external_exports.object({
|
|
27254
|
-
|
|
27263
|
+
// Unversioned intervals can omit hidden thinking time; do not restore them into averages.
|
|
27264
|
+
outputTimings: external_exports.array(usageOutputTimingSchema).transform((values) => values.filter((value) => value.version === 3)).optional(),
|
|
27265
|
+
// Retain independent TTFT facts when dropping incompatible speed measurements.
|
|
27266
|
+
outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 3).optional().catch(void 0),
|
|
27255
27267
|
timeToFirstOutputMs: usageMeasurementSchema.extend({ value: nonNegativeSafeIntegerSchema }).optional()
|
|
27256
27268
|
}).strict();
|
|
27257
27269
|
var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text) => text.length <= maximum));
|
|
@@ -27271,6 +27283,7 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
27271
27283
|
cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
27272
27284
|
outputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
27273
27285
|
outputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
27286
|
+
sessionOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
27274
27287
|
apiOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
27275
27288
|
reasoningOutputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
27276
27289
|
totalTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
@@ -27682,6 +27695,10 @@ var threadSteeringInspectResultSchema = external_exports.object({
|
|
|
27682
27695
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
27683
27696
|
}).strict();
|
|
27684
27697
|
|
|
27698
|
+
// ../../shared-contracts/dist/thread-archive-confirm.js
|
|
27699
|
+
var threadArchiveConfirmParamsSchema = external_exports.object({ threadId: hostThreadIdSchema }).strict();
|
|
27700
|
+
var threadArchiveConfirmResultSchema = external_exports.object({ confirmed: external_exports.boolean() }).strict();
|
|
27701
|
+
|
|
27685
27702
|
// ../../shared-contracts/dist/client-channel.js
|
|
27686
27703
|
var CLIENT_CHANNEL_VERSION = 1;
|
|
27687
27704
|
var CLIENT_REQUEST_LIMIT_BYTES = 128 * 1024 * 1024;
|
|
@@ -27821,7 +27838,12 @@ var clientThreadSnapshotSchema = external_exports.object({
|
|
|
27821
27838
|
/** Current interruptible Host Turn, including command Turns omitted from client history. */
|
|
27822
27839
|
activeTurnId: external_exports.string().min(1).nullable().optional(),
|
|
27823
27840
|
/** Most recent explicit command in this Host process; not native conversation history. */
|
|
27824
|
-
command: external_exports.object({
|
|
27841
|
+
command: external_exports.object({
|
|
27842
|
+
name: external_exports.string().min(1),
|
|
27843
|
+
turn: clientTurnSchema,
|
|
27844
|
+
/** First ordinary Turn started after this command; its retained result is not a new event. */
|
|
27845
|
+
subsequentTurnId: external_exports.string().min(1).optional()
|
|
27846
|
+
}).optional(),
|
|
27825
27847
|
thread: external_exports.object({
|
|
27826
27848
|
id: external_exports.string().min(1),
|
|
27827
27849
|
cwd: external_exports.string(),
|
|
@@ -28029,7 +28051,6 @@ var webAccessStateSchema = external_exports.object({
|
|
|
28029
28051
|
quotaUntil: external_exports.string().optional()
|
|
28030
28052
|
}).strict().optional()
|
|
28031
28053
|
}).strict();
|
|
28032
|
-
var webLocalAccessRequiredDetailsSchema = external_exports.object({ url: external_exports.string() }).strict();
|
|
28033
28054
|
|
|
28034
28055
|
// ../../shared-contracts/dist/delegation-read.js
|
|
28035
28056
|
var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
@@ -29997,6 +30018,7 @@ var usageFields = /* @__PURE__ */ new Set([
|
|
|
29997
30018
|
"totalCredits",
|
|
29998
30019
|
"contextUsagePercent",
|
|
29999
30020
|
"outputTokensPerSecond",
|
|
30021
|
+
"sessionOutputTokensPerSecond",
|
|
30000
30022
|
"apiOutputTokensPerSecond",
|
|
30001
30023
|
"costSource",
|
|
30002
30024
|
"unpricedModels"
|
|
@@ -30019,6 +30041,7 @@ function parseHostUsage(value) {
|
|
|
30019
30041
|
for (const field2 of [
|
|
30020
30042
|
"totalCredits",
|
|
30021
30043
|
"contextUsagePercent",
|
|
30044
|
+
"sessionOutputTokensPerSecond",
|
|
30022
30045
|
"apiOutputTokensPerSecond"
|
|
30023
30046
|
]) {
|
|
30024
30047
|
const candidate = value[field2];
|
|
@@ -53048,6 +53071,8 @@ var QoderSession = class {
|
|
|
53048
53071
|
}
|
|
53049
53072
|
}
|
|
53050
53073
|
async #dispatchMessage(message) {
|
|
53074
|
+
if ((message.type === "assistant" || message.type === "stream_event" || message.type === "user") && message.parent_tool_use_id !== null && message.parent_tool_use_id !== void 0)
|
|
53075
|
+
return;
|
|
53051
53076
|
switch (message.type) {
|
|
53052
53077
|
case "system":
|
|
53053
53078
|
this.#handleSystemMessage(message);
|
|
@@ -53224,7 +53249,17 @@ var QoderSession = class {
|
|
|
53224
53249
|
if (!Array.isArray(content))
|
|
53225
53250
|
return;
|
|
53226
53251
|
const hasToolUseInMessage = content.some((block) => typeof block === "object" && block !== null && block.type === "tool_use");
|
|
53227
|
-
for (const block of content) {
|
|
53252
|
+
for (const [index, block] of content.entries()) {
|
|
53253
|
+
if (message.uuid && typeof block === "object" && block !== null) {
|
|
53254
|
+
const raw = block;
|
|
53255
|
+
const text = raw.type === "text" ? raw.text : raw.type === "thinking" ? raw.thinking : void 0;
|
|
53256
|
+
if (typeof text === "string") {
|
|
53257
|
+
const key = JSON.stringify([message.uuid, index, raw.type, text]);
|
|
53258
|
+
if (this.#activeTurn.projectedTextSnapshots.has(key))
|
|
53259
|
+
continue;
|
|
53260
|
+
this.#activeTurn.projectedTextSnapshots.add(key);
|
|
53261
|
+
}
|
|
53262
|
+
}
|
|
53228
53263
|
this.#projectAssistantBlock(block, hasToolUseInMessage);
|
|
53229
53264
|
}
|
|
53230
53265
|
}
|
|
@@ -53346,6 +53381,11 @@ var QoderSession = class {
|
|
|
53346
53381
|
});
|
|
53347
53382
|
}
|
|
53348
53383
|
} else if (rawBlock.type === "tool_use") {
|
|
53384
|
+
if (typeof rawBlock.id === "string" && rawBlock.id.trim()) {
|
|
53385
|
+
if (this.#activeTurn.startedToolIds.has(rawBlock.id))
|
|
53386
|
+
return;
|
|
53387
|
+
this.#activeTurn.startedToolIds.add(rawBlock.id);
|
|
53388
|
+
}
|
|
53349
53389
|
if (this.#activeTurn.activeStreamingMessageItemId) {
|
|
53350
53390
|
this.#emitEvent({
|
|
53351
53391
|
type: "item.completed",
|
|
@@ -53825,6 +53865,8 @@ var QoderSession = class {
|
|
|
53825
53865
|
this.#activeTurn = {
|
|
53826
53866
|
turnId: command.turnId,
|
|
53827
53867
|
userMessageUuid,
|
|
53868
|
+
startedToolIds: /* @__PURE__ */ new Set(),
|
|
53869
|
+
projectedTextSnapshots: /* @__PURE__ */ new Set(),
|
|
53828
53870
|
accumulatedStreamingText: "",
|
|
53829
53871
|
accumulatedStreamingReasoning: ""
|
|
53830
53872
|
};
|
|
@@ -54213,6 +54255,8 @@ var QoderSession = class {
|
|
|
54213
54255
|
this.#activeTurn = {
|
|
54214
54256
|
turnId: command.turnId,
|
|
54215
54257
|
userMessageUuid,
|
|
54258
|
+
startedToolIds: /* @__PURE__ */ new Set(),
|
|
54259
|
+
projectedTextSnapshots: /* @__PURE__ */ new Set(),
|
|
54216
54260
|
accumulatedStreamingText: "",
|
|
54217
54261
|
accumulatedStreamingReasoning: "",
|
|
54218
54262
|
isCompaction,
|
|
@@ -21550,13 +21550,25 @@ var threadPermissionModeSelectParamsSchema = external_exports.object({
|
|
|
21550
21550
|
var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonnegative();
|
|
21551
21551
|
var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
|
|
21552
21552
|
var cacheHitRatePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
21553
|
+
var usageOutputTimingSchema = external_exports.object({
|
|
21554
|
+
version: external_exports.literal(3).optional(),
|
|
21555
|
+
requestId: external_exports.string().min(1),
|
|
21556
|
+
turnId: external_exports.string().min(1).max(1024),
|
|
21557
|
+
outputTokens: nonNegativeSafeIntegerSchema,
|
|
21558
|
+
startedAtMs: nonNegativeSafeIntegerSchema,
|
|
21559
|
+
completedAtMs: nonNegativeSafeIntegerSchema
|
|
21560
|
+
}).strict().refine((value) => value.completedAtMs > value.startedAtMs);
|
|
21553
21561
|
var usageMeasurementSchema = external_exports.object({
|
|
21562
|
+
version: external_exports.union([external_exports.literal(2), external_exports.literal(3)]).optional(),
|
|
21554
21563
|
value: finiteNonNegativeNumberSchema,
|
|
21555
21564
|
turnId: external_exports.string().min(1).max(1024),
|
|
21556
21565
|
at: nonNegativeSafeIntegerSchema
|
|
21557
21566
|
}).strict();
|
|
21558
21567
|
var usageMeasurementsSchema = external_exports.object({
|
|
21559
|
-
|
|
21568
|
+
// Unversioned intervals can omit hidden thinking time; do not restore them into averages.
|
|
21569
|
+
outputTimings: external_exports.array(usageOutputTimingSchema).transform((values) => values.filter((value) => value.version === 3)).optional(),
|
|
21570
|
+
// Retain independent TTFT facts when dropping incompatible speed measurements.
|
|
21571
|
+
outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 3).optional().catch(void 0),
|
|
21560
21572
|
timeToFirstOutputMs: usageMeasurementSchema.extend({ value: nonNegativeSafeIntegerSchema }).optional()
|
|
21561
21573
|
}).strict();
|
|
21562
21574
|
var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text) => text.length <= maximum));
|
|
@@ -21576,6 +21588,7 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
21576
21588
|
cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
21577
21589
|
outputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
21578
21590
|
outputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
21591
|
+
sessionOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
21579
21592
|
apiOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
21580
21593
|
reasoningOutputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
21581
21594
|
totalTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
@@ -21987,6 +22000,10 @@ var threadSteeringInspectResultSchema = external_exports.object({
|
|
|
21987
22000
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
21988
22001
|
}).strict();
|
|
21989
22002
|
|
|
22003
|
+
// ../../shared-contracts/dist/thread-archive-confirm.js
|
|
22004
|
+
var threadArchiveConfirmParamsSchema = external_exports.object({ threadId: hostThreadIdSchema }).strict();
|
|
22005
|
+
var threadArchiveConfirmResultSchema = external_exports.object({ confirmed: external_exports.boolean() }).strict();
|
|
22006
|
+
|
|
21990
22007
|
// ../../shared-contracts/dist/client-channel.js
|
|
21991
22008
|
var CLIENT_CHANNEL_VERSION = 1;
|
|
21992
22009
|
var CLIENT_REQUEST_LIMIT_BYTES = 128 * 1024 * 1024;
|
|
@@ -22126,7 +22143,12 @@ var clientThreadSnapshotSchema = external_exports.object({
|
|
|
22126
22143
|
/** Current interruptible Host Turn, including command Turns omitted from client history. */
|
|
22127
22144
|
activeTurnId: external_exports.string().min(1).nullable().optional(),
|
|
22128
22145
|
/** Most recent explicit command in this Host process; not native conversation history. */
|
|
22129
|
-
command: external_exports.object({
|
|
22146
|
+
command: external_exports.object({
|
|
22147
|
+
name: external_exports.string().min(1),
|
|
22148
|
+
turn: clientTurnSchema,
|
|
22149
|
+
/** First ordinary Turn started after this command; its retained result is not a new event. */
|
|
22150
|
+
subsequentTurnId: external_exports.string().min(1).optional()
|
|
22151
|
+
}).optional(),
|
|
22130
22152
|
thread: external_exports.object({
|
|
22131
22153
|
id: external_exports.string().min(1),
|
|
22132
22154
|
cwd: external_exports.string(),
|
|
@@ -22334,7 +22356,6 @@ var webAccessStateSchema = external_exports.object({
|
|
|
22334
22356
|
quotaUntil: external_exports.string().optional()
|
|
22335
22357
|
}).strict().optional()
|
|
22336
22358
|
}).strict();
|
|
22337
|
-
var webLocalAccessRequiredDetailsSchema = external_exports.object({ url: external_exports.string() }).strict();
|
|
22338
22359
|
|
|
22339
22360
|
// ../../shared-contracts/dist/delegation-read.js
|
|
22340
22361
|
var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
@@ -23618,6 +23639,7 @@ var usageFields = /* @__PURE__ */ new Set([
|
|
|
23618
23639
|
"totalCredits",
|
|
23619
23640
|
"contextUsagePercent",
|
|
23620
23641
|
"outputTokensPerSecond",
|
|
23642
|
+
"sessionOutputTokensPerSecond",
|
|
23621
23643
|
"apiOutputTokensPerSecond",
|
|
23622
23644
|
"costSource",
|
|
23623
23645
|
"unpricedModels"
|
|
@@ -23640,6 +23662,7 @@ function parseHostUsage(value) {
|
|
|
23640
23662
|
for (const field2 of [
|
|
23641
23663
|
"totalCredits",
|
|
23642
23664
|
"contextUsagePercent",
|
|
23665
|
+
"sessionOutputTokensPerSecond",
|
|
23643
23666
|
"apiOutputTokensPerSecond"
|
|
23644
23667
|
]) {
|
|
23645
23668
|
const candidate = value[field2];
|
|
@@ -14662,13 +14662,25 @@ var threadPermissionModeSelectParamsSchema = external_exports.object({
|
|
|
14662
14662
|
var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonnegative();
|
|
14663
14663
|
var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
|
|
14664
14664
|
var cacheHitRatePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
14665
|
+
var usageOutputTimingSchema = external_exports.object({
|
|
14666
|
+
version: external_exports.literal(3).optional(),
|
|
14667
|
+
requestId: external_exports.string().min(1),
|
|
14668
|
+
turnId: external_exports.string().min(1).max(1024),
|
|
14669
|
+
outputTokens: nonNegativeSafeIntegerSchema,
|
|
14670
|
+
startedAtMs: nonNegativeSafeIntegerSchema,
|
|
14671
|
+
completedAtMs: nonNegativeSafeIntegerSchema
|
|
14672
|
+
}).strict().refine((value) => value.completedAtMs > value.startedAtMs);
|
|
14665
14673
|
var usageMeasurementSchema = external_exports.object({
|
|
14674
|
+
version: external_exports.union([external_exports.literal(2), external_exports.literal(3)]).optional(),
|
|
14666
14675
|
value: finiteNonNegativeNumberSchema,
|
|
14667
14676
|
turnId: external_exports.string().min(1).max(1024),
|
|
14668
14677
|
at: nonNegativeSafeIntegerSchema
|
|
14669
14678
|
}).strict();
|
|
14670
14679
|
var usageMeasurementsSchema = external_exports.object({
|
|
14671
|
-
|
|
14680
|
+
// Unversioned intervals can omit hidden thinking time; do not restore them into averages.
|
|
14681
|
+
outputTimings: external_exports.array(usageOutputTimingSchema).transform((values) => values.filter((value) => value.version === 3)).optional(),
|
|
14682
|
+
// Retain independent TTFT facts when dropping incompatible speed measurements.
|
|
14683
|
+
outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 3).optional().catch(void 0),
|
|
14672
14684
|
timeToFirstOutputMs: usageMeasurementSchema.extend({ value: nonNegativeSafeIntegerSchema }).optional()
|
|
14673
14685
|
}).strict();
|
|
14674
14686
|
var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text2) => text2.length <= maximum));
|
|
@@ -14688,6 +14700,7 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
14688
14700
|
cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14689
14701
|
outputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14690
14702
|
outputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
14703
|
+
sessionOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
14691
14704
|
apiOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
14692
14705
|
reasoningOutputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14693
14706
|
totalTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
@@ -15099,6 +15112,10 @@ var threadSteeringInspectResultSchema = external_exports.object({
|
|
|
15099
15112
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
15100
15113
|
}).strict();
|
|
15101
15114
|
|
|
15115
|
+
// ../../shared-contracts/dist/thread-archive-confirm.js
|
|
15116
|
+
var threadArchiveConfirmParamsSchema = external_exports.object({ threadId: hostThreadIdSchema }).strict();
|
|
15117
|
+
var threadArchiveConfirmResultSchema = external_exports.object({ confirmed: external_exports.boolean() }).strict();
|
|
15118
|
+
|
|
15102
15119
|
// ../../shared-contracts/dist/client-channel.js
|
|
15103
15120
|
var CLIENT_CHANNEL_VERSION = 1;
|
|
15104
15121
|
var CLIENT_REQUEST_LIMIT_BYTES = 128 * 1024 * 1024;
|
|
@@ -15238,7 +15255,12 @@ var clientThreadSnapshotSchema = external_exports.object({
|
|
|
15238
15255
|
/** Current interruptible Host Turn, including command Turns omitted from client history. */
|
|
15239
15256
|
activeTurnId: external_exports.string().min(1).nullable().optional(),
|
|
15240
15257
|
/** Most recent explicit command in this Host process; not native conversation history. */
|
|
15241
|
-
command: external_exports.object({
|
|
15258
|
+
command: external_exports.object({
|
|
15259
|
+
name: external_exports.string().min(1),
|
|
15260
|
+
turn: clientTurnSchema,
|
|
15261
|
+
/** First ordinary Turn started after this command; its retained result is not a new event. */
|
|
15262
|
+
subsequentTurnId: external_exports.string().min(1).optional()
|
|
15263
|
+
}).optional(),
|
|
15242
15264
|
thread: external_exports.object({
|
|
15243
15265
|
id: external_exports.string().min(1),
|
|
15244
15266
|
cwd: external_exports.string(),
|
|
@@ -15446,7 +15468,6 @@ var webAccessStateSchema = external_exports.object({
|
|
|
15446
15468
|
quotaUntil: external_exports.string().optional()
|
|
15447
15469
|
}).strict().optional()
|
|
15448
15470
|
}).strict();
|
|
15449
|
-
var webLocalAccessRequiredDetailsSchema = external_exports.object({ url: external_exports.string() }).strict();
|
|
15450
15471
|
|
|
15451
15472
|
// ../../shared-contracts/dist/delegation-read.js
|
|
15452
15473
|
var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
@@ -16758,6 +16779,7 @@ var usageFields = /* @__PURE__ */ new Set([
|
|
|
16758
16779
|
"totalCredits",
|
|
16759
16780
|
"contextUsagePercent",
|
|
16760
16781
|
"outputTokensPerSecond",
|
|
16782
|
+
"sessionOutputTokensPerSecond",
|
|
16761
16783
|
"apiOutputTokensPerSecond",
|
|
16762
16784
|
"costSource",
|
|
16763
16785
|
"unpricedModels"
|
|
@@ -16780,6 +16802,7 @@ function parseHostUsage(value) {
|
|
|
16780
16802
|
for (const field2 of [
|
|
16781
16803
|
"totalCredits",
|
|
16782
16804
|
"contextUsagePercent",
|
|
16805
|
+
"sessionOutputTokensPerSecond",
|
|
16783
16806
|
"apiOutputTokensPerSecond"
|
|
16784
16807
|
]) {
|
|
16785
16808
|
const candidate = value[field2];
|
|
@@ -19139,10 +19162,15 @@ var CodeBuddyTurnOutput = class {
|
|
|
19139
19162
|
snapshot: structuredClone({ item, outcome })
|
|
19140
19163
|
});
|
|
19141
19164
|
}
|
|
19165
|
+
hasItem(itemId) {
|
|
19166
|
+
return this.#items.has(itemId);
|
|
19167
|
+
}
|
|
19142
19168
|
replayCommandResult(items) {
|
|
19143
19169
|
if (this.#items.size)
|
|
19144
19170
|
return;
|
|
19145
19171
|
for (const snapshot of items) {
|
|
19172
|
+
if (this.hasItem(snapshot.item.itemId))
|
|
19173
|
+
continue;
|
|
19146
19174
|
const item = structuredClone(snapshot.item);
|
|
19147
19175
|
this.#start(item);
|
|
19148
19176
|
this.#finish(item, snapshot.outcome);
|
|
@@ -19771,6 +19799,8 @@ function snapshotFromHistory(contents, ref, cwd, profile = CODEBUDDY_RUNTIME_PRO
|
|
|
19771
19799
|
current.completedAtMs = row.timestamp;
|
|
19772
19800
|
}
|
|
19773
19801
|
} else if (row.type === "function_call") {
|
|
19802
|
+
if (row.status === "incomplete" && data.isPartialAborted === true && data.discard === true)
|
|
19803
|
+
continue;
|
|
19774
19804
|
let input = row.arguments;
|
|
19775
19805
|
if (typeof input === "string") {
|
|
19776
19806
|
try {
|
|
@@ -25148,6 +25178,9 @@ function referencedChildren(rows2) {
|
|
|
25148
25178
|
const children = /* @__PURE__ */ new Map();
|
|
25149
25179
|
for (const row of rows2) {
|
|
25150
25180
|
if (row.type === "function_call" && row.name === "Agent") {
|
|
25181
|
+
const data = record3(row.providerData);
|
|
25182
|
+
if (row.status === "incomplete" && data.isPartialAborted === true && data.discard === true)
|
|
25183
|
+
continue;
|
|
25151
25184
|
const callId2 = text(row.callId);
|
|
25152
25185
|
if (!callId2 || calls.has(callId2))
|
|
25153
25186
|
throw new CodeBuddyError("protocolError", "Agent delegation identity is ambiguous");
|
|
@@ -26192,6 +26225,9 @@ var CodeBuddySubagents = class {
|
|
|
26192
26225
|
begin(turnId) {
|
|
26193
26226
|
this.#turnId = turnId;
|
|
26194
26227
|
}
|
|
26228
|
+
hasItem(itemId) {
|
|
26229
|
+
return [...this.#calls.values()].some((call) => call.turnId === this.#turnId && call.item.itemId === itemId);
|
|
26230
|
+
}
|
|
26195
26231
|
state(id) {
|
|
26196
26232
|
return [...this.#calls.values()].map((call) => call.item.subagents[0]).findLast((child) => child?.nativeSubagentId === id);
|
|
26197
26233
|
}
|
|
@@ -26465,7 +26501,7 @@ var CodeBuddySession = class {
|
|
|
26465
26501
|
}
|
|
26466
26502
|
if (this.#replaying)
|
|
26467
26503
|
return;
|
|
26468
|
-
if (this.subagents.update(update))
|
|
26504
|
+
if ((text(record3(update._meta)["codebuddy.ai/parentToolCallId"]) || !this.#active?.output.hasItem(`tool-${text(update.toolCallId)}`)) && this.subagents.update(update))
|
|
26469
26505
|
return;
|
|
26470
26506
|
if (update.sessionUpdate === "config_option_update" && this.#config)
|
|
26471
26507
|
this.#apply(configuration(update.configOptions, this.profile));
|
|
@@ -26758,7 +26794,7 @@ var CodeBuddySession = class {
|
|
|
26758
26794
|
throw new CodeBuddyError("protocolError", "Could not identify exactly one persisted Native Turn");
|
|
26759
26795
|
active.output.confirmCompaction(snapshot.turns.flatMap((turn) => turn.items).filter((snapshot2) => !active.beforeItems.has(snapshot2.item.itemId)));
|
|
26760
26796
|
if (active.nativeCommand)
|
|
26761
|
-
active.output.replayCommandResult(added[0]?.items ?? []);
|
|
26797
|
+
active.output.replayCommandResult((added[0]?.items ?? []).filter(({ item }) => !this.subagents.hasItem(item.itemId)));
|
|
26762
26798
|
const nativeTurnRef = added[0]?.nativeTurnRef;
|
|
26763
26799
|
if (nativeTurnRef)
|
|
26764
26800
|
this.#hasTurn = true;
|
|
@@ -27398,7 +27434,8 @@ require(process.argv[1]);`, bundle.cli] : [],
|
|
|
27398
27434
|
...acpArguments,
|
|
27399
27435
|
...serve ? ["--serve", "--host", "127.0.0.1", "--port", "0", "--auth", "password"] : []
|
|
27400
27436
|
], childEnvironment, platform),
|
|
27401
|
-
environment: childEnvironment
|
|
27437
|
+
environment: childEnvironment,
|
|
27438
|
+
...bundle ? { bundledCliPath: bundle.cli } : {}
|
|
27402
27439
|
};
|
|
27403
27440
|
}
|
|
27404
27441
|
|
|
@@ -27497,8 +27534,8 @@ async function readProductJson(file2) {
|
|
|
27497
27534
|
return JSON.parse(await readFile5(file2, "utf8"));
|
|
27498
27535
|
}
|
|
27499
27536
|
function bundledFallbackProductPath(invocation) {
|
|
27500
|
-
const cli = invocation.
|
|
27501
|
-
if (!cli
|
|
27537
|
+
const cli = invocation.bundledCliPath;
|
|
27538
|
+
if (!cli)
|
|
27502
27539
|
return;
|
|
27503
27540
|
return path11.join(path11.dirname(path11.dirname(cli)), "product.json");
|
|
27504
27541
|
}
|