@codexhost/cli-darwin-x64 0.19.0 → 0.21.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 +45 -4
- package/app/console-web.js +1124 -684
- package/app/desktop-controller.mjs +197 -50
- package/app/host-runtime.mjs +36192 -29254
- package/app/plugins/antigravity/assets/icon.svg +1 -1
- package/app/plugins/antigravity/plugin.mjs +8863 -4094
- package/app/plugins/claude-code/plugin.mjs +173 -26
- package/app/plugins/codebuddy/plugin.mjs +71 -6
- package/app/plugins/codex-usage/plugin.mjs +56 -4
- package/app/plugins/copilot/plugin.mjs +48 -4
- package/app/plugins/cursor-cli/plugin.mjs +48 -4
- package/app/plugins/deepseek-harness/plugin.mjs +73 -9
- package/app/plugins/devin/plugin.mjs +47 -4
- package/app/plugins/grok/plugin.mjs +84 -13
- package/app/plugins/hermes/plugin.mjs +47 -4
- package/app/plugins/kimi-code/plugin.mjs +73 -14
- package/app/plugins/kiro-cli/plugin.mjs +48 -4
- package/app/plugins/omp/plugin.mjs +74 -7
- package/app/plugins/opencode/plugin.mjs +74 -13
- package/app/plugins/pi/plugin.mjs +75 -7
- package/app/plugins/qoder/plugin.mjs +85 -5
- package/app/plugins/qoder-cn/plugin.mjs +85 -5
- package/app/plugins/qwen-code/plugin.mjs +48 -4
- package/app/plugins/workbuddy/plugin.mjs +75 -9
- package/app/plugins/zcode/plugin.mjs +56 -4
- package/app/renderer-extension.js +1431 -737
- package/app/web/assets/index-BdmZfTRW.js +201 -0
- package/app/web/assets/index-DJW4bmyx.css +1 -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 +1130 -686
- 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 +7 -7
- package/app/web/plugins/deepseek-ai__dsh-client-ui-conversation/client.js +27 -27
- package/app/web/plugins/deepseek-ai__dsh-client-ui-input-trigger/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-layout/client.js +2 -2
- package/app/web/plugins/deepseek-ai__dsh-client-ui-model-selection/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-session/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-settings-general/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar/client.js +1 -1
- package/app/web/plugins/deepseek-ai__dsh-client-ui-sidebar-documentpreview/client.js +9 -9
- 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 +1144 -731
- 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
|
@@ -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.union([external_exports.literal(3), external_exports.literal(4)]).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), external_exports.literal(4)]).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
|
+
// Older 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 === 4)).optional(),
|
|
27265
|
+
// Retain independent TTFT facts when dropping incompatible speed measurements.
|
|
27266
|
+
outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 4).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;
|
|
@@ -27712,6 +27729,11 @@ var clientChannelEventSchema = external_exports.discriminatedUnion("type", [
|
|
|
27712
27729
|
cursor: clientChannelCursorSchema,
|
|
27713
27730
|
cwd: external_exports.string().optional()
|
|
27714
27731
|
}),
|
|
27732
|
+
external_exports.object({
|
|
27733
|
+
type: external_exports.literal("harness-inspection-changed"),
|
|
27734
|
+
cursor: clientChannelCursorSchema,
|
|
27735
|
+
harnessId: external_exports.string().min(1)
|
|
27736
|
+
}),
|
|
27715
27737
|
external_exports.object({ type: external_exports.literal("display-settings-changed"), cursor: clientChannelCursorSchema }),
|
|
27716
27738
|
external_exports.object({
|
|
27717
27739
|
type: external_exports.literal("preferences-changed"),
|
|
@@ -27783,6 +27805,8 @@ var clientItemTruncationSchema = external_exports.object({
|
|
|
27783
27805
|
var clientTurnSchema = external_exports.object({
|
|
27784
27806
|
id: external_exports.string().min(1),
|
|
27785
27807
|
status: external_exports.string().min(1),
|
|
27808
|
+
/** Native history has no terminal evidence; Desktop's status vocabulary cannot express this. */
|
|
27809
|
+
codexhostTurnOutcome: external_exports.object({ status: external_exports.literal("unknown"), reason: external_exports.string() }).optional(),
|
|
27786
27810
|
items: external_exports.array(external_exports.object({ id: external_exports.string().min(1), type: external_exports.string().min(1) }).passthrough()),
|
|
27787
27811
|
/** Original file operations, independent of the cumulative Desktop fileChange card.
|
|
27788
27812
|
* Insert before the named non-file Item; null appends at the end of the Turn.
|
|
@@ -27821,7 +27845,12 @@ var clientThreadSnapshotSchema = external_exports.object({
|
|
|
27821
27845
|
/** Current interruptible Host Turn, including command Turns omitted from client history. */
|
|
27822
27846
|
activeTurnId: external_exports.string().min(1).nullable().optional(),
|
|
27823
27847
|
/** Most recent explicit command in this Host process; not native conversation history. */
|
|
27824
|
-
command: external_exports.object({
|
|
27848
|
+
command: external_exports.object({
|
|
27849
|
+
name: external_exports.string().min(1),
|
|
27850
|
+
turn: clientTurnSchema,
|
|
27851
|
+
/** First ordinary Turn started after this command; its retained result is not a new event. */
|
|
27852
|
+
subsequentTurnId: external_exports.string().min(1).optional()
|
|
27853
|
+
}).optional(),
|
|
27825
27854
|
thread: external_exports.object({
|
|
27826
27855
|
id: external_exports.string().min(1),
|
|
27827
27856
|
cwd: external_exports.string(),
|
|
@@ -28029,7 +28058,6 @@ var webAccessStateSchema = external_exports.object({
|
|
|
28029
28058
|
quotaUntil: external_exports.string().optional()
|
|
28030
28059
|
}).strict().optional()
|
|
28031
28060
|
}).strict();
|
|
28032
|
-
var webLocalAccessRequiredDetailsSchema = external_exports.object({ url: external_exports.string() }).strict();
|
|
28033
28061
|
|
|
28034
28062
|
// ../../shared-contracts/dist/delegation-read.js
|
|
28035
28063
|
var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
@@ -28995,6 +29023,7 @@ var THREAD_WATCH_NOTICE_OUTCOMES = [
|
|
|
28995
29023
|
"completed",
|
|
28996
29024
|
"failed",
|
|
28997
29025
|
"interrupted",
|
|
29026
|
+
"needsInput",
|
|
28998
29027
|
"timedOut",
|
|
28999
29028
|
"unreadable",
|
|
29000
29029
|
"notFound"
|
|
@@ -29041,13 +29070,25 @@ var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
|
|
|
29041
29070
|
var thread = { ...target, threadId: identity };
|
|
29042
29071
|
var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
29043
29072
|
external_exports.strictObject({ kind: external_exports.literal("hosts") }),
|
|
29073
|
+
external_exports.strictObject({ kind: external_exports.literal("status"), ...thread }),
|
|
29044
29074
|
external_exports.strictObject({
|
|
29045
29075
|
kind: external_exports.literal("list"),
|
|
29046
29076
|
...target,
|
|
29047
29077
|
cursor: external_exports.string().nullable(),
|
|
29048
29078
|
archived: external_exports.boolean()
|
|
29049
29079
|
}),
|
|
29050
|
-
external_exports.strictObject({
|
|
29080
|
+
external_exports.strictObject({
|
|
29081
|
+
kind: external_exports.literal("read"),
|
|
29082
|
+
...thread,
|
|
29083
|
+
page: external_exports.strictObject({
|
|
29084
|
+
cursor: external_exports.string().min(1).max(8192).nullable(),
|
|
29085
|
+
epoch: identity.optional(),
|
|
29086
|
+
sortDirection: external_exports.enum(["asc", "desc"]).optional(),
|
|
29087
|
+
limit: external_exports.number().int().min(1).max(20).optional()
|
|
29088
|
+
}).refine((page) => page.cursor === null || page.epoch !== void 0, {
|
|
29089
|
+
message: "A history continuation requires its connection epoch"
|
|
29090
|
+
}).optional()
|
|
29091
|
+
}),
|
|
29051
29092
|
external_exports.strictObject({
|
|
29052
29093
|
kind: external_exports.literal("configure"),
|
|
29053
29094
|
...thread,
|
|
@@ -29610,12 +29651,14 @@ function discoverySpec(variant) {
|
|
|
29610
29651
|
installRoots: {
|
|
29611
29652
|
posix: [
|
|
29612
29653
|
"~/.local/bin",
|
|
29654
|
+
`~/${configDirectory}/bin/${command}`,
|
|
29613
29655
|
`~/${configDirectory}/bin`,
|
|
29614
29656
|
VERSION_MANAGER_ROOTS,
|
|
29615
29657
|
"/usr/local/bin",
|
|
29616
29658
|
"/opt/homebrew/bin"
|
|
29617
29659
|
],
|
|
29618
29660
|
windows: [
|
|
29661
|
+
`~/${configDirectory}/bin/${command}`,
|
|
29619
29662
|
`\${LOCALAPPDATA}/Programs/${productName}`,
|
|
29620
29663
|
`\${LOCALAPPDATA}/${productName}`,
|
|
29621
29664
|
`~/${configDirectory}/bin`,
|
|
@@ -29997,6 +30040,7 @@ var usageFields = /* @__PURE__ */ new Set([
|
|
|
29997
30040
|
"totalCredits",
|
|
29998
30041
|
"contextUsagePercent",
|
|
29999
30042
|
"outputTokensPerSecond",
|
|
30043
|
+
"sessionOutputTokensPerSecond",
|
|
30000
30044
|
"apiOutputTokensPerSecond",
|
|
30001
30045
|
"costSource",
|
|
30002
30046
|
"unpricedModels"
|
|
@@ -30019,6 +30063,7 @@ function parseHostUsage(value) {
|
|
|
30019
30063
|
for (const field2 of [
|
|
30020
30064
|
"totalCredits",
|
|
30021
30065
|
"contextUsagePercent",
|
|
30066
|
+
"sessionOutputTokensPerSecond",
|
|
30022
30067
|
"apiOutputTokensPerSecond"
|
|
30023
30068
|
]) {
|
|
30024
30069
|
const candidate = value[field2];
|
|
@@ -30097,6 +30142,7 @@ var requestTokenFields = [
|
|
|
30097
30142
|
"cacheWrite1hInputTokens",
|
|
30098
30143
|
"outputTokens",
|
|
30099
30144
|
"reasoningOutputTokens",
|
|
30145
|
+
"timedOutputTokens",
|
|
30100
30146
|
"startedAtMs",
|
|
30101
30147
|
"completedAtMs"
|
|
30102
30148
|
];
|
|
@@ -53048,6 +53094,8 @@ var QoderSession = class {
|
|
|
53048
53094
|
}
|
|
53049
53095
|
}
|
|
53050
53096
|
async #dispatchMessage(message) {
|
|
53097
|
+
if ((message.type === "assistant" || message.type === "stream_event" || message.type === "user") && message.parent_tool_use_id !== null && message.parent_tool_use_id !== void 0)
|
|
53098
|
+
return;
|
|
53051
53099
|
switch (message.type) {
|
|
53052
53100
|
case "system":
|
|
53053
53101
|
this.#handleSystemMessage(message);
|
|
@@ -53224,7 +53272,17 @@ var QoderSession = class {
|
|
|
53224
53272
|
if (!Array.isArray(content))
|
|
53225
53273
|
return;
|
|
53226
53274
|
const hasToolUseInMessage = content.some((block) => typeof block === "object" && block !== null && block.type === "tool_use");
|
|
53227
|
-
for (const block of content) {
|
|
53275
|
+
for (const [index, block] of content.entries()) {
|
|
53276
|
+
if (message.uuid && typeof block === "object" && block !== null) {
|
|
53277
|
+
const raw = block;
|
|
53278
|
+
const text = raw.type === "text" ? raw.text : raw.type === "thinking" ? raw.thinking : void 0;
|
|
53279
|
+
if (typeof text === "string") {
|
|
53280
|
+
const key = JSON.stringify([message.uuid, index, raw.type, text]);
|
|
53281
|
+
if (this.#activeTurn.projectedTextSnapshots.has(key))
|
|
53282
|
+
continue;
|
|
53283
|
+
this.#activeTurn.projectedTextSnapshots.add(key);
|
|
53284
|
+
}
|
|
53285
|
+
}
|
|
53228
53286
|
this.#projectAssistantBlock(block, hasToolUseInMessage);
|
|
53229
53287
|
}
|
|
53230
53288
|
}
|
|
@@ -53346,6 +53404,11 @@ var QoderSession = class {
|
|
|
53346
53404
|
});
|
|
53347
53405
|
}
|
|
53348
53406
|
} else if (rawBlock.type === "tool_use") {
|
|
53407
|
+
if (typeof rawBlock.id === "string" && rawBlock.id.trim()) {
|
|
53408
|
+
if (this.#activeTurn.startedToolIds.has(rawBlock.id))
|
|
53409
|
+
return;
|
|
53410
|
+
this.#activeTurn.startedToolIds.add(rawBlock.id);
|
|
53411
|
+
}
|
|
53349
53412
|
if (this.#activeTurn.activeStreamingMessageItemId) {
|
|
53350
53413
|
this.#emitEvent({
|
|
53351
53414
|
type: "item.completed",
|
|
@@ -53825,6 +53888,8 @@ var QoderSession = class {
|
|
|
53825
53888
|
this.#activeTurn = {
|
|
53826
53889
|
turnId: command.turnId,
|
|
53827
53890
|
userMessageUuid,
|
|
53891
|
+
startedToolIds: /* @__PURE__ */ new Set(),
|
|
53892
|
+
projectedTextSnapshots: /* @__PURE__ */ new Set(),
|
|
53828
53893
|
accumulatedStreamingText: "",
|
|
53829
53894
|
accumulatedStreamingReasoning: ""
|
|
53830
53895
|
};
|
|
@@ -54213,6 +54278,8 @@ var QoderSession = class {
|
|
|
54213
54278
|
this.#activeTurn = {
|
|
54214
54279
|
turnId: command.turnId,
|
|
54215
54280
|
userMessageUuid,
|
|
54281
|
+
startedToolIds: /* @__PURE__ */ new Set(),
|
|
54282
|
+
projectedTextSnapshots: /* @__PURE__ */ new Set(),
|
|
54216
54283
|
accumulatedStreamingText: "",
|
|
54217
54284
|
accumulatedStreamingReasoning: "",
|
|
54218
54285
|
isCompaction,
|
|
@@ -55346,6 +55413,19 @@ function createQoderInstallation(environment, command, variant = "global") {
|
|
|
55346
55413
|
message: "This Qoder China release does not expose a non-installing update check. Use its original installer."
|
|
55347
55414
|
};
|
|
55348
55415
|
const output = await run(["update", "--check"]);
|
|
55416
|
+
if (/unable to determine installation method/i.test(output))
|
|
55417
|
+
return {
|
|
55418
|
+
currentVersion,
|
|
55419
|
+
latestVersion: "Unknown",
|
|
55420
|
+
updateAvailable: false,
|
|
55421
|
+
canUpdate: false,
|
|
55422
|
+
messageCode: "qoder-check-unavailable",
|
|
55423
|
+
notice: {
|
|
55424
|
+
en: "This Qoder CLI cannot determine how it was installed and cannot check for updates. Use the installer or application that installed it.",
|
|
55425
|
+
"zh-CN": "当前 Qoder CLI 无法识别自身的安装方式,不能检查更新。请使用安装它的安装程序或应用进行更新。"
|
|
55426
|
+
},
|
|
55427
|
+
message: "This Qoder CLI cannot determine how it was installed and cannot check for updates."
|
|
55428
|
+
};
|
|
55349
55429
|
const available = output.match(/Update available:\s*\S+\s*(?:->|\u2192)\s*(\S+)/i);
|
|
55350
55430
|
if (available?.[1])
|
|
55351
55431
|
return {
|
|
@@ -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.union([external_exports.literal(3), external_exports.literal(4)]).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), external_exports.literal(4)]).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
|
+
// Older 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 === 4)).optional(),
|
|
21570
|
+
// Retain independent TTFT facts when dropping incompatible speed measurements.
|
|
21571
|
+
outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 4).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;
|
|
@@ -22017,6 +22034,11 @@ var clientChannelEventSchema = external_exports.discriminatedUnion("type", [
|
|
|
22017
22034
|
cursor: clientChannelCursorSchema,
|
|
22018
22035
|
cwd: external_exports.string().optional()
|
|
22019
22036
|
}),
|
|
22037
|
+
external_exports.object({
|
|
22038
|
+
type: external_exports.literal("harness-inspection-changed"),
|
|
22039
|
+
cursor: clientChannelCursorSchema,
|
|
22040
|
+
harnessId: external_exports.string().min(1)
|
|
22041
|
+
}),
|
|
22020
22042
|
external_exports.object({ type: external_exports.literal("display-settings-changed"), cursor: clientChannelCursorSchema }),
|
|
22021
22043
|
external_exports.object({
|
|
22022
22044
|
type: external_exports.literal("preferences-changed"),
|
|
@@ -22088,6 +22110,8 @@ var clientItemTruncationSchema = external_exports.object({
|
|
|
22088
22110
|
var clientTurnSchema = external_exports.object({
|
|
22089
22111
|
id: external_exports.string().min(1),
|
|
22090
22112
|
status: external_exports.string().min(1),
|
|
22113
|
+
/** Native history has no terminal evidence; Desktop's status vocabulary cannot express this. */
|
|
22114
|
+
codexhostTurnOutcome: external_exports.object({ status: external_exports.literal("unknown"), reason: external_exports.string() }).optional(),
|
|
22091
22115
|
items: external_exports.array(external_exports.object({ id: external_exports.string().min(1), type: external_exports.string().min(1) }).passthrough()),
|
|
22092
22116
|
/** Original file operations, independent of the cumulative Desktop fileChange card.
|
|
22093
22117
|
* Insert before the named non-file Item; null appends at the end of the Turn.
|
|
@@ -22126,7 +22150,12 @@ var clientThreadSnapshotSchema = external_exports.object({
|
|
|
22126
22150
|
/** Current interruptible Host Turn, including command Turns omitted from client history. */
|
|
22127
22151
|
activeTurnId: external_exports.string().min(1).nullable().optional(),
|
|
22128
22152
|
/** Most recent explicit command in this Host process; not native conversation history. */
|
|
22129
|
-
command: external_exports.object({
|
|
22153
|
+
command: external_exports.object({
|
|
22154
|
+
name: external_exports.string().min(1),
|
|
22155
|
+
turn: clientTurnSchema,
|
|
22156
|
+
/** First ordinary Turn started after this command; its retained result is not a new event. */
|
|
22157
|
+
subsequentTurnId: external_exports.string().min(1).optional()
|
|
22158
|
+
}).optional(),
|
|
22130
22159
|
thread: external_exports.object({
|
|
22131
22160
|
id: external_exports.string().min(1),
|
|
22132
22161
|
cwd: external_exports.string(),
|
|
@@ -22334,7 +22363,6 @@ var webAccessStateSchema = external_exports.object({
|
|
|
22334
22363
|
quotaUntil: external_exports.string().optional()
|
|
22335
22364
|
}).strict().optional()
|
|
22336
22365
|
}).strict();
|
|
22337
|
-
var webLocalAccessRequiredDetailsSchema = external_exports.object({ url: external_exports.string() }).strict();
|
|
22338
22366
|
|
|
22339
22367
|
// ../../shared-contracts/dist/delegation-read.js
|
|
22340
22368
|
var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
@@ -23298,6 +23326,7 @@ var THREAD_WATCH_NOTICE_OUTCOMES = [
|
|
|
23298
23326
|
"completed",
|
|
23299
23327
|
"failed",
|
|
23300
23328
|
"interrupted",
|
|
23329
|
+
"needsInput",
|
|
23301
23330
|
"timedOut",
|
|
23302
23331
|
"unreadable",
|
|
23303
23332
|
"notFound"
|
|
@@ -23344,13 +23373,25 @@ var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
|
|
|
23344
23373
|
var thread = { ...target, threadId: identity };
|
|
23345
23374
|
var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
23346
23375
|
external_exports.strictObject({ kind: external_exports.literal("hosts") }),
|
|
23376
|
+
external_exports.strictObject({ kind: external_exports.literal("status"), ...thread }),
|
|
23347
23377
|
external_exports.strictObject({
|
|
23348
23378
|
kind: external_exports.literal("list"),
|
|
23349
23379
|
...target,
|
|
23350
23380
|
cursor: external_exports.string().nullable(),
|
|
23351
23381
|
archived: external_exports.boolean()
|
|
23352
23382
|
}),
|
|
23353
|
-
external_exports.strictObject({
|
|
23383
|
+
external_exports.strictObject({
|
|
23384
|
+
kind: external_exports.literal("read"),
|
|
23385
|
+
...thread,
|
|
23386
|
+
page: external_exports.strictObject({
|
|
23387
|
+
cursor: external_exports.string().min(1).max(8192).nullable(),
|
|
23388
|
+
epoch: identity.optional(),
|
|
23389
|
+
sortDirection: external_exports.enum(["asc", "desc"]).optional(),
|
|
23390
|
+
limit: external_exports.number().int().min(1).max(20).optional()
|
|
23391
|
+
}).refine((page) => page.cursor === null || page.epoch !== void 0, {
|
|
23392
|
+
message: "A history continuation requires its connection epoch"
|
|
23393
|
+
}).optional()
|
|
23394
|
+
}),
|
|
23354
23395
|
external_exports.strictObject({
|
|
23355
23396
|
kind: external_exports.literal("configure"),
|
|
23356
23397
|
...thread,
|
|
@@ -23618,6 +23659,7 @@ var usageFields = /* @__PURE__ */ new Set([
|
|
|
23618
23659
|
"totalCredits",
|
|
23619
23660
|
"contextUsagePercent",
|
|
23620
23661
|
"outputTokensPerSecond",
|
|
23662
|
+
"sessionOutputTokensPerSecond",
|
|
23621
23663
|
"apiOutputTokensPerSecond",
|
|
23622
23664
|
"costSource",
|
|
23623
23665
|
"unpricedModels"
|
|
@@ -23640,6 +23682,7 @@ function parseHostUsage(value) {
|
|
|
23640
23682
|
for (const field2 of [
|
|
23641
23683
|
"totalCredits",
|
|
23642
23684
|
"contextUsagePercent",
|
|
23685
|
+
"sessionOutputTokensPerSecond",
|
|
23643
23686
|
"apiOutputTokensPerSecond"
|
|
23644
23687
|
]) {
|
|
23645
23688
|
const candidate = value[field2];
|
|
@@ -23718,6 +23761,7 @@ var requestTokenFields = [
|
|
|
23718
23761
|
"cacheWrite1hInputTokens",
|
|
23719
23762
|
"outputTokens",
|
|
23720
23763
|
"reasoningOutputTokens",
|
|
23764
|
+
"timedOutputTokens",
|
|
23721
23765
|
"startedAtMs",
|
|
23722
23766
|
"completedAtMs"
|
|
23723
23767
|
];
|
|
@@ -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.union([external_exports.literal(3), external_exports.literal(4)]).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), external_exports.literal(4)]).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
|
+
// Older 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 === 4)).optional(),
|
|
14682
|
+
// Retain independent TTFT facts when dropping incompatible speed measurements.
|
|
14683
|
+
outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 4).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;
|
|
@@ -15129,6 +15146,11 @@ var clientChannelEventSchema = external_exports.discriminatedUnion("type", [
|
|
|
15129
15146
|
cursor: clientChannelCursorSchema,
|
|
15130
15147
|
cwd: external_exports.string().optional()
|
|
15131
15148
|
}),
|
|
15149
|
+
external_exports.object({
|
|
15150
|
+
type: external_exports.literal("harness-inspection-changed"),
|
|
15151
|
+
cursor: clientChannelCursorSchema,
|
|
15152
|
+
harnessId: external_exports.string().min(1)
|
|
15153
|
+
}),
|
|
15132
15154
|
external_exports.object({ type: external_exports.literal("display-settings-changed"), cursor: clientChannelCursorSchema }),
|
|
15133
15155
|
external_exports.object({
|
|
15134
15156
|
type: external_exports.literal("preferences-changed"),
|
|
@@ -15200,6 +15222,8 @@ var clientItemTruncationSchema = external_exports.object({
|
|
|
15200
15222
|
var clientTurnSchema = external_exports.object({
|
|
15201
15223
|
id: external_exports.string().min(1),
|
|
15202
15224
|
status: external_exports.string().min(1),
|
|
15225
|
+
/** Native history has no terminal evidence; Desktop's status vocabulary cannot express this. */
|
|
15226
|
+
codexhostTurnOutcome: external_exports.object({ status: external_exports.literal("unknown"), reason: external_exports.string() }).optional(),
|
|
15203
15227
|
items: external_exports.array(external_exports.object({ id: external_exports.string().min(1), type: external_exports.string().min(1) }).passthrough()),
|
|
15204
15228
|
/** Original file operations, independent of the cumulative Desktop fileChange card.
|
|
15205
15229
|
* Insert before the named non-file Item; null appends at the end of the Turn.
|
|
@@ -15238,7 +15262,12 @@ var clientThreadSnapshotSchema = external_exports.object({
|
|
|
15238
15262
|
/** Current interruptible Host Turn, including command Turns omitted from client history. */
|
|
15239
15263
|
activeTurnId: external_exports.string().min(1).nullable().optional(),
|
|
15240
15264
|
/** Most recent explicit command in this Host process; not native conversation history. */
|
|
15241
|
-
command: external_exports.object({
|
|
15265
|
+
command: external_exports.object({
|
|
15266
|
+
name: external_exports.string().min(1),
|
|
15267
|
+
turn: clientTurnSchema,
|
|
15268
|
+
/** First ordinary Turn started after this command; its retained result is not a new event. */
|
|
15269
|
+
subsequentTurnId: external_exports.string().min(1).optional()
|
|
15270
|
+
}).optional(),
|
|
15242
15271
|
thread: external_exports.object({
|
|
15243
15272
|
id: external_exports.string().min(1),
|
|
15244
15273
|
cwd: external_exports.string(),
|
|
@@ -15446,7 +15475,6 @@ var webAccessStateSchema = external_exports.object({
|
|
|
15446
15475
|
quotaUntil: external_exports.string().optional()
|
|
15447
15476
|
}).strict().optional()
|
|
15448
15477
|
}).strict();
|
|
15449
|
-
var webLocalAccessRequiredDetailsSchema = external_exports.object({ url: external_exports.string() }).strict();
|
|
15450
15478
|
|
|
15451
15479
|
// ../../shared-contracts/dist/delegation-read.js
|
|
15452
15480
|
var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
@@ -16412,6 +16440,7 @@ var THREAD_WATCH_NOTICE_OUTCOMES = [
|
|
|
16412
16440
|
"completed",
|
|
16413
16441
|
"failed",
|
|
16414
16442
|
"interrupted",
|
|
16443
|
+
"needsInput",
|
|
16415
16444
|
"timedOut",
|
|
16416
16445
|
"unreadable",
|
|
16417
16446
|
"notFound"
|
|
@@ -16458,13 +16487,25 @@ var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
|
|
|
16458
16487
|
var thread = { ...target, threadId: identity };
|
|
16459
16488
|
var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
16460
16489
|
external_exports.strictObject({ kind: external_exports.literal("hosts") }),
|
|
16490
|
+
external_exports.strictObject({ kind: external_exports.literal("status"), ...thread }),
|
|
16461
16491
|
external_exports.strictObject({
|
|
16462
16492
|
kind: external_exports.literal("list"),
|
|
16463
16493
|
...target,
|
|
16464
16494
|
cursor: external_exports.string().nullable(),
|
|
16465
16495
|
archived: external_exports.boolean()
|
|
16466
16496
|
}),
|
|
16467
|
-
external_exports.strictObject({
|
|
16497
|
+
external_exports.strictObject({
|
|
16498
|
+
kind: external_exports.literal("read"),
|
|
16499
|
+
...thread,
|
|
16500
|
+
page: external_exports.strictObject({
|
|
16501
|
+
cursor: external_exports.string().min(1).max(8192).nullable(),
|
|
16502
|
+
epoch: identity.optional(),
|
|
16503
|
+
sortDirection: external_exports.enum(["asc", "desc"]).optional(),
|
|
16504
|
+
limit: external_exports.number().int().min(1).max(20).optional()
|
|
16505
|
+
}).refine((page) => page.cursor === null || page.epoch !== void 0, {
|
|
16506
|
+
message: "A history continuation requires its connection epoch"
|
|
16507
|
+
}).optional()
|
|
16508
|
+
}),
|
|
16468
16509
|
external_exports.strictObject({
|
|
16469
16510
|
kind: external_exports.literal("configure"),
|
|
16470
16511
|
...thread,
|
|
@@ -16758,6 +16799,7 @@ var usageFields = /* @__PURE__ */ new Set([
|
|
|
16758
16799
|
"totalCredits",
|
|
16759
16800
|
"contextUsagePercent",
|
|
16760
16801
|
"outputTokensPerSecond",
|
|
16802
|
+
"sessionOutputTokensPerSecond",
|
|
16761
16803
|
"apiOutputTokensPerSecond",
|
|
16762
16804
|
"costSource",
|
|
16763
16805
|
"unpricedModels"
|
|
@@ -16780,6 +16822,7 @@ function parseHostUsage(value) {
|
|
|
16780
16822
|
for (const field2 of [
|
|
16781
16823
|
"totalCredits",
|
|
16782
16824
|
"contextUsagePercent",
|
|
16825
|
+
"sessionOutputTokensPerSecond",
|
|
16783
16826
|
"apiOutputTokensPerSecond"
|
|
16784
16827
|
]) {
|
|
16785
16828
|
const candidate = value[field2];
|
|
@@ -16858,6 +16901,7 @@ var requestTokenFields = [
|
|
|
16858
16901
|
"cacheWrite1hInputTokens",
|
|
16859
16902
|
"outputTokens",
|
|
16860
16903
|
"reasoningOutputTokens",
|
|
16904
|
+
"timedOutputTokens",
|
|
16861
16905
|
"startedAtMs",
|
|
16862
16906
|
"completedAtMs"
|
|
16863
16907
|
];
|
|
@@ -16910,6 +16954,14 @@ function parseHostUsageRequest(value) {
|
|
|
16910
16954
|
if (request.startedAtMs === void 0 !== (request.completedAtMs === void 0)) {
|
|
16911
16955
|
throw new Error("Harness Usage request timing fields must be provided together");
|
|
16912
16956
|
}
|
|
16957
|
+
if (request.timedOutputTokens !== void 0) {
|
|
16958
|
+
if (request.startedAtMs === void 0) {
|
|
16959
|
+
throw new Error("Harness Usage request 'timedOutputTokens' requires timing fields");
|
|
16960
|
+
}
|
|
16961
|
+
if (request.timedOutputTokens > request.outputTokens) {
|
|
16962
|
+
throw new Error("Harness Usage request 'timedOutputTokens' must not exceed 'outputTokens'");
|
|
16963
|
+
}
|
|
16964
|
+
}
|
|
16913
16965
|
if (request.startedAtMs !== void 0 && request.completedAtMs !== void 0 && request.completedAtMs < request.startedAtMs) {
|
|
16914
16966
|
throw new Error("Harness Usage request 'completedAtMs' must not precede 'startedAtMs'");
|
|
16915
16967
|
}
|
|
@@ -19139,10 +19191,15 @@ var CodeBuddyTurnOutput = class {
|
|
|
19139
19191
|
snapshot: structuredClone({ item, outcome })
|
|
19140
19192
|
});
|
|
19141
19193
|
}
|
|
19194
|
+
hasItem(itemId) {
|
|
19195
|
+
return this.#items.has(itemId);
|
|
19196
|
+
}
|
|
19142
19197
|
replayCommandResult(items) {
|
|
19143
19198
|
if (this.#items.size)
|
|
19144
19199
|
return;
|
|
19145
19200
|
for (const snapshot of items) {
|
|
19201
|
+
if (this.hasItem(snapshot.item.itemId))
|
|
19202
|
+
continue;
|
|
19146
19203
|
const item = structuredClone(snapshot.item);
|
|
19147
19204
|
this.#start(item);
|
|
19148
19205
|
this.#finish(item, snapshot.outcome);
|
|
@@ -19771,6 +19828,8 @@ function snapshotFromHistory(contents, ref, cwd, profile = CODEBUDDY_RUNTIME_PRO
|
|
|
19771
19828
|
current.completedAtMs = row.timestamp;
|
|
19772
19829
|
}
|
|
19773
19830
|
} else if (row.type === "function_call") {
|
|
19831
|
+
if (row.status === "incomplete" && data.isPartialAborted === true && data.discard === true)
|
|
19832
|
+
continue;
|
|
19774
19833
|
let input = row.arguments;
|
|
19775
19834
|
if (typeof input === "string") {
|
|
19776
19835
|
try {
|
|
@@ -25148,6 +25207,9 @@ function referencedChildren(rows2) {
|
|
|
25148
25207
|
const children = /* @__PURE__ */ new Map();
|
|
25149
25208
|
for (const row of rows2) {
|
|
25150
25209
|
if (row.type === "function_call" && row.name === "Agent") {
|
|
25210
|
+
const data = record3(row.providerData);
|
|
25211
|
+
if (row.status === "incomplete" && data.isPartialAborted === true && data.discard === true)
|
|
25212
|
+
continue;
|
|
25151
25213
|
const callId2 = text(row.callId);
|
|
25152
25214
|
if (!callId2 || calls.has(callId2))
|
|
25153
25215
|
throw new CodeBuddyError("protocolError", "Agent delegation identity is ambiguous");
|
|
@@ -26192,6 +26254,9 @@ var CodeBuddySubagents = class {
|
|
|
26192
26254
|
begin(turnId) {
|
|
26193
26255
|
this.#turnId = turnId;
|
|
26194
26256
|
}
|
|
26257
|
+
hasItem(itemId) {
|
|
26258
|
+
return [...this.#calls.values()].some((call) => call.turnId === this.#turnId && call.item.itemId === itemId);
|
|
26259
|
+
}
|
|
26195
26260
|
state(id) {
|
|
26196
26261
|
return [...this.#calls.values()].map((call) => call.item.subagents[0]).findLast((child) => child?.nativeSubagentId === id);
|
|
26197
26262
|
}
|
|
@@ -26465,7 +26530,7 @@ var CodeBuddySession = class {
|
|
|
26465
26530
|
}
|
|
26466
26531
|
if (this.#replaying)
|
|
26467
26532
|
return;
|
|
26468
|
-
if (this.subagents.update(update))
|
|
26533
|
+
if ((text(record3(update._meta)["codebuddy.ai/parentToolCallId"]) || !this.#active?.output.hasItem(`tool-${text(update.toolCallId)}`)) && this.subagents.update(update))
|
|
26469
26534
|
return;
|
|
26470
26535
|
if (update.sessionUpdate === "config_option_update" && this.#config)
|
|
26471
26536
|
this.#apply(configuration(update.configOptions, this.profile));
|
|
@@ -26758,7 +26823,7 @@ var CodeBuddySession = class {
|
|
|
26758
26823
|
throw new CodeBuddyError("protocolError", "Could not identify exactly one persisted Native Turn");
|
|
26759
26824
|
active.output.confirmCompaction(snapshot.turns.flatMap((turn) => turn.items).filter((snapshot2) => !active.beforeItems.has(snapshot2.item.itemId)));
|
|
26760
26825
|
if (active.nativeCommand)
|
|
26761
|
-
active.output.replayCommandResult(added[0]?.items ?? []);
|
|
26826
|
+
active.output.replayCommandResult((added[0]?.items ?? []).filter(({ item }) => !this.subagents.hasItem(item.itemId)));
|
|
26762
26827
|
const nativeTurnRef = added[0]?.nativeTurnRef;
|
|
26763
26828
|
if (nativeTurnRef)
|
|
26764
26829
|
this.#hasTurn = true;
|
|
@@ -27398,7 +27463,8 @@ require(process.argv[1]);`, bundle.cli] : [],
|
|
|
27398
27463
|
...acpArguments,
|
|
27399
27464
|
...serve ? ["--serve", "--host", "127.0.0.1", "--port", "0", "--auth", "password"] : []
|
|
27400
27465
|
], childEnvironment, platform),
|
|
27401
|
-
environment: childEnvironment
|
|
27466
|
+
environment: childEnvironment,
|
|
27467
|
+
...bundle ? { bundledCliPath: bundle.cli } : {}
|
|
27402
27468
|
};
|
|
27403
27469
|
}
|
|
27404
27470
|
|
|
@@ -27497,8 +27563,8 @@ async function readProductJson(file2) {
|
|
|
27497
27563
|
return JSON.parse(await readFile5(file2, "utf8"));
|
|
27498
27564
|
}
|
|
27499
27565
|
function bundledFallbackProductPath(invocation) {
|
|
27500
|
-
const cli = invocation.
|
|
27501
|
-
if (!cli
|
|
27566
|
+
const cli = invocation.bundledCliPath;
|
|
27567
|
+
if (!cli)
|
|
27502
27568
|
return;
|
|
27503
27569
|
return path11.join(path11.dirname(path11.dirname(cli)), "product.json");
|
|
27504
27570
|
}
|