@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
|
@@ -15138,13 +15138,25 @@ var threadPermissionModeSelectParamsSchema = external_exports.object({
|
|
|
15138
15138
|
var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonnegative();
|
|
15139
15139
|
var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
|
|
15140
15140
|
var cacheHitRatePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
15141
|
+
var usageOutputTimingSchema = external_exports.object({
|
|
15142
|
+
version: external_exports.union([external_exports.literal(3), external_exports.literal(4)]).optional(),
|
|
15143
|
+
requestId: external_exports.string().min(1),
|
|
15144
|
+
turnId: external_exports.string().min(1).max(1024),
|
|
15145
|
+
outputTokens: nonNegativeSafeIntegerSchema,
|
|
15146
|
+
startedAtMs: nonNegativeSafeIntegerSchema,
|
|
15147
|
+
completedAtMs: nonNegativeSafeIntegerSchema
|
|
15148
|
+
}).strict().refine((value) => value.completedAtMs > value.startedAtMs);
|
|
15141
15149
|
var usageMeasurementSchema = external_exports.object({
|
|
15150
|
+
version: external_exports.union([external_exports.literal(2), external_exports.literal(3), external_exports.literal(4)]).optional(),
|
|
15142
15151
|
value: finiteNonNegativeNumberSchema,
|
|
15143
15152
|
turnId: external_exports.string().min(1).max(1024),
|
|
15144
15153
|
at: nonNegativeSafeIntegerSchema
|
|
15145
15154
|
}).strict();
|
|
15146
15155
|
var usageMeasurementsSchema = external_exports.object({
|
|
15147
|
-
|
|
15156
|
+
// Older intervals can omit hidden thinking time; do not restore them into averages.
|
|
15157
|
+
outputTimings: external_exports.array(usageOutputTimingSchema).transform((values) => values.filter((value) => value.version === 4)).optional(),
|
|
15158
|
+
// Retain independent TTFT facts when dropping incompatible speed measurements.
|
|
15159
|
+
outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 4).optional().catch(void 0),
|
|
15148
15160
|
timeToFirstOutputMs: usageMeasurementSchema.extend({ value: nonNegativeSafeIntegerSchema }).optional()
|
|
15149
15161
|
}).strict();
|
|
15150
15162
|
var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text2) => text2.length <= maximum));
|
|
@@ -15164,6 +15176,7 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
15164
15176
|
cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
15165
15177
|
outputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
15166
15178
|
outputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
15179
|
+
sessionOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
15167
15180
|
apiOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
15168
15181
|
reasoningOutputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
15169
15182
|
totalTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
@@ -15575,6 +15588,10 @@ var threadSteeringInspectResultSchema = external_exports.object({
|
|
|
15575
15588
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
15576
15589
|
}).strict();
|
|
15577
15590
|
|
|
15591
|
+
// ../../shared-contracts/dist/thread-archive-confirm.js
|
|
15592
|
+
var threadArchiveConfirmParamsSchema = external_exports.object({ threadId: hostThreadIdSchema }).strict();
|
|
15593
|
+
var threadArchiveConfirmResultSchema = external_exports.object({ confirmed: external_exports.boolean() }).strict();
|
|
15594
|
+
|
|
15578
15595
|
// ../../shared-contracts/dist/client-channel.js
|
|
15579
15596
|
var CLIENT_CHANNEL_VERSION = 1;
|
|
15580
15597
|
var CLIENT_REQUEST_LIMIT_BYTES = 128 * 1024 * 1024;
|
|
@@ -15605,6 +15622,11 @@ var clientChannelEventSchema = external_exports.discriminatedUnion("type", [
|
|
|
15605
15622
|
cursor: clientChannelCursorSchema,
|
|
15606
15623
|
cwd: external_exports.string().optional()
|
|
15607
15624
|
}),
|
|
15625
|
+
external_exports.object({
|
|
15626
|
+
type: external_exports.literal("harness-inspection-changed"),
|
|
15627
|
+
cursor: clientChannelCursorSchema,
|
|
15628
|
+
harnessId: external_exports.string().min(1)
|
|
15629
|
+
}),
|
|
15608
15630
|
external_exports.object({ type: external_exports.literal("display-settings-changed"), cursor: clientChannelCursorSchema }),
|
|
15609
15631
|
external_exports.object({
|
|
15610
15632
|
type: external_exports.literal("preferences-changed"),
|
|
@@ -15676,6 +15698,8 @@ var clientItemTruncationSchema = external_exports.object({
|
|
|
15676
15698
|
var clientTurnSchema = external_exports.object({
|
|
15677
15699
|
id: external_exports.string().min(1),
|
|
15678
15700
|
status: external_exports.string().min(1),
|
|
15701
|
+
/** Native history has no terminal evidence; Desktop's status vocabulary cannot express this. */
|
|
15702
|
+
codexhostTurnOutcome: external_exports.object({ status: external_exports.literal("unknown"), reason: external_exports.string() }).optional(),
|
|
15679
15703
|
items: external_exports.array(external_exports.object({ id: external_exports.string().min(1), type: external_exports.string().min(1) }).passthrough()),
|
|
15680
15704
|
/** Original file operations, independent of the cumulative Desktop fileChange card.
|
|
15681
15705
|
* Insert before the named non-file Item; null appends at the end of the Turn.
|
|
@@ -15714,7 +15738,12 @@ var clientThreadSnapshotSchema = external_exports.object({
|
|
|
15714
15738
|
/** Current interruptible Host Turn, including command Turns omitted from client history. */
|
|
15715
15739
|
activeTurnId: external_exports.string().min(1).nullable().optional(),
|
|
15716
15740
|
/** Most recent explicit command in this Host process; not native conversation history. */
|
|
15717
|
-
command: external_exports.object({
|
|
15741
|
+
command: external_exports.object({
|
|
15742
|
+
name: external_exports.string().min(1),
|
|
15743
|
+
turn: clientTurnSchema,
|
|
15744
|
+
/** First ordinary Turn started after this command; its retained result is not a new event. */
|
|
15745
|
+
subsequentTurnId: external_exports.string().min(1).optional()
|
|
15746
|
+
}).optional(),
|
|
15718
15747
|
thread: external_exports.object({
|
|
15719
15748
|
id: external_exports.string().min(1),
|
|
15720
15749
|
cwd: external_exports.string(),
|
|
@@ -15922,7 +15951,6 @@ var webAccessStateSchema = external_exports.object({
|
|
|
15922
15951
|
quotaUntil: external_exports.string().optional()
|
|
15923
15952
|
}).strict().optional()
|
|
15924
15953
|
}).strict();
|
|
15925
|
-
var webLocalAccessRequiredDetailsSchema = external_exports.object({ url: external_exports.string() }).strict();
|
|
15926
15954
|
|
|
15927
15955
|
// ../../shared-contracts/dist/delegation-read.js
|
|
15928
15956
|
var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
@@ -16888,6 +16916,7 @@ var THREAD_WATCH_NOTICE_OUTCOMES = [
|
|
|
16888
16916
|
"completed",
|
|
16889
16917
|
"failed",
|
|
16890
16918
|
"interrupted",
|
|
16919
|
+
"needsInput",
|
|
16891
16920
|
"timedOut",
|
|
16892
16921
|
"unreadable",
|
|
16893
16922
|
"notFound"
|
|
@@ -16934,13 +16963,25 @@ var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
|
|
|
16934
16963
|
var thread = { ...target, threadId: identity };
|
|
16935
16964
|
var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
16936
16965
|
external_exports.strictObject({ kind: external_exports.literal("hosts") }),
|
|
16966
|
+
external_exports.strictObject({ kind: external_exports.literal("status"), ...thread }),
|
|
16937
16967
|
external_exports.strictObject({
|
|
16938
16968
|
kind: external_exports.literal("list"),
|
|
16939
16969
|
...target,
|
|
16940
16970
|
cursor: external_exports.string().nullable(),
|
|
16941
16971
|
archived: external_exports.boolean()
|
|
16942
16972
|
}),
|
|
16943
|
-
external_exports.strictObject({
|
|
16973
|
+
external_exports.strictObject({
|
|
16974
|
+
kind: external_exports.literal("read"),
|
|
16975
|
+
...thread,
|
|
16976
|
+
page: external_exports.strictObject({
|
|
16977
|
+
cursor: external_exports.string().min(1).max(8192).nullable(),
|
|
16978
|
+
epoch: identity.optional(),
|
|
16979
|
+
sortDirection: external_exports.enum(["asc", "desc"]).optional(),
|
|
16980
|
+
limit: external_exports.number().int().min(1).max(20).optional()
|
|
16981
|
+
}).refine((page) => page.cursor === null || page.epoch !== void 0, {
|
|
16982
|
+
message: "A history continuation requires its connection epoch"
|
|
16983
|
+
}).optional()
|
|
16984
|
+
}),
|
|
16944
16985
|
external_exports.strictObject({
|
|
16945
16986
|
kind: external_exports.literal("configure"),
|
|
16946
16987
|
...thread,
|
|
@@ -17234,6 +17275,7 @@ var usageFields = /* @__PURE__ */ new Set([
|
|
|
17234
17275
|
"totalCredits",
|
|
17235
17276
|
"contextUsagePercent",
|
|
17236
17277
|
"outputTokensPerSecond",
|
|
17278
|
+
"sessionOutputTokensPerSecond",
|
|
17237
17279
|
"apiOutputTokensPerSecond",
|
|
17238
17280
|
"costSource",
|
|
17239
17281
|
"unpricedModels"
|
|
@@ -17256,6 +17298,7 @@ function parseHostUsage(value) {
|
|
|
17256
17298
|
for (const field2 of [
|
|
17257
17299
|
"totalCredits",
|
|
17258
17300
|
"contextUsagePercent",
|
|
17301
|
+
"sessionOutputTokensPerSecond",
|
|
17259
17302
|
"apiOutputTokensPerSecond"
|
|
17260
17303
|
]) {
|
|
17261
17304
|
const candidate = value[field2];
|
|
@@ -17334,6 +17377,7 @@ var requestTokenFields = [
|
|
|
17334
17377
|
"cacheWrite1hInputTokens",
|
|
17335
17378
|
"outputTokens",
|
|
17336
17379
|
"reasoningOutputTokens",
|
|
17380
|
+
"timedOutputTokens",
|
|
17337
17381
|
"startedAtMs",
|
|
17338
17382
|
"completedAtMs"
|
|
17339
17383
|
];
|
|
@@ -17386,6 +17430,14 @@ function parseHostUsageRequest(value) {
|
|
|
17386
17430
|
if (request.startedAtMs === void 0 !== (request.completedAtMs === void 0)) {
|
|
17387
17431
|
throw new Error("Harness Usage request timing fields must be provided together");
|
|
17388
17432
|
}
|
|
17433
|
+
if (request.timedOutputTokens !== void 0) {
|
|
17434
|
+
if (request.startedAtMs === void 0) {
|
|
17435
|
+
throw new Error("Harness Usage request 'timedOutputTokens' requires timing fields");
|
|
17436
|
+
}
|
|
17437
|
+
if (request.timedOutputTokens > request.outputTokens) {
|
|
17438
|
+
throw new Error("Harness Usage request 'timedOutputTokens' must not exceed 'outputTokens'");
|
|
17439
|
+
}
|
|
17440
|
+
}
|
|
17389
17441
|
if (request.startedAtMs !== void 0 && request.completedAtMs !== void 0 && request.completedAtMs < request.startedAtMs) {
|
|
17390
17442
|
throw new Error("Harness Usage request 'completedAtMs' must not precede 'startedAtMs'");
|
|
17391
17443
|
}
|
|
@@ -18441,10 +18493,15 @@ var CodeBuddyTurnOutput = class {
|
|
|
18441
18493
|
snapshot: structuredClone({ item, outcome })
|
|
18442
18494
|
});
|
|
18443
18495
|
}
|
|
18496
|
+
hasItem(itemId) {
|
|
18497
|
+
return this.#items.has(itemId);
|
|
18498
|
+
}
|
|
18444
18499
|
replayCommandResult(items) {
|
|
18445
18500
|
if (this.#items.size)
|
|
18446
18501
|
return;
|
|
18447
18502
|
for (const snapshot of items) {
|
|
18503
|
+
if (this.hasItem(snapshot.item.itemId))
|
|
18504
|
+
continue;
|
|
18448
18505
|
const item = structuredClone(snapshot.item);
|
|
18449
18506
|
this.#start(item);
|
|
18450
18507
|
this.#finish(item, snapshot.outcome);
|
|
@@ -19073,6 +19130,8 @@ function snapshotFromHistory(contents, ref, cwd, profile = CODEBUDDY_RUNTIME_PRO
|
|
|
19073
19130
|
current.completedAtMs = row.timestamp;
|
|
19074
19131
|
}
|
|
19075
19132
|
} else if (row.type === "function_call") {
|
|
19133
|
+
if (row.status === "incomplete" && data.isPartialAborted === true && data.discard === true)
|
|
19134
|
+
continue;
|
|
19076
19135
|
let input = row.arguments;
|
|
19077
19136
|
if (typeof input === "string") {
|
|
19078
19137
|
try {
|
|
@@ -24084,6 +24143,9 @@ function referencedChildren(rows2) {
|
|
|
24084
24143
|
const children = /* @__PURE__ */ new Map();
|
|
24085
24144
|
for (const row of rows2) {
|
|
24086
24145
|
if (row.type === "function_call" && row.name === "Agent") {
|
|
24146
|
+
const data = record3(row.providerData);
|
|
24147
|
+
if (row.status === "incomplete" && data.isPartialAborted === true && data.discard === true)
|
|
24148
|
+
continue;
|
|
24087
24149
|
const callId2 = text(row.callId);
|
|
24088
24150
|
if (!callId2 || calls.has(callId2))
|
|
24089
24151
|
throw new CodeBuddyError("protocolError", "Agent delegation identity is ambiguous");
|
|
@@ -25128,6 +25190,9 @@ var CodeBuddySubagents = class {
|
|
|
25128
25190
|
begin(turnId) {
|
|
25129
25191
|
this.#turnId = turnId;
|
|
25130
25192
|
}
|
|
25193
|
+
hasItem(itemId) {
|
|
25194
|
+
return [...this.#calls.values()].some((call) => call.turnId === this.#turnId && call.item.itemId === itemId);
|
|
25195
|
+
}
|
|
25131
25196
|
state(id) {
|
|
25132
25197
|
return [...this.#calls.values()].map((call) => call.item.subagents[0]).findLast((child) => child?.nativeSubagentId === id);
|
|
25133
25198
|
}
|
|
@@ -25401,7 +25466,7 @@ var CodeBuddySession = class {
|
|
|
25401
25466
|
}
|
|
25402
25467
|
if (this.#replaying)
|
|
25403
25468
|
return;
|
|
25404
|
-
if (this.subagents.update(update))
|
|
25469
|
+
if ((text(record3(update._meta)["codebuddy.ai/parentToolCallId"]) || !this.#active?.output.hasItem(`tool-${text(update.toolCallId)}`)) && this.subagents.update(update))
|
|
25405
25470
|
return;
|
|
25406
25471
|
if (update.sessionUpdate === "config_option_update" && this.#config)
|
|
25407
25472
|
this.#apply(configuration(update.configOptions, this.profile));
|
|
@@ -25694,7 +25759,7 @@ var CodeBuddySession = class {
|
|
|
25694
25759
|
throw new CodeBuddyError("protocolError", "Could not identify exactly one persisted Native Turn");
|
|
25695
25760
|
active.output.confirmCompaction(snapshot.turns.flatMap((turn) => turn.items).filter((snapshot2) => !active.beforeItems.has(snapshot2.item.itemId)));
|
|
25696
25761
|
if (active.nativeCommand)
|
|
25697
|
-
active.output.replayCommandResult(added[0]?.items ?? []);
|
|
25762
|
+
active.output.replayCommandResult((added[0]?.items ?? []).filter(({ item }) => !this.subagents.hasItem(item.itemId)));
|
|
25698
25763
|
const nativeTurnRef = added[0]?.nativeTurnRef;
|
|
25699
25764
|
if (nativeTurnRef)
|
|
25700
25765
|
this.#hasTurn = true;
|
|
@@ -14656,13 +14656,25 @@ var threadPermissionModeSelectParamsSchema = external_exports.object({
|
|
|
14656
14656
|
var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonnegative();
|
|
14657
14657
|
var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
|
|
14658
14658
|
var cacheHitRatePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
14659
|
+
var usageOutputTimingSchema = external_exports.object({
|
|
14660
|
+
version: external_exports.union([external_exports.literal(3), external_exports.literal(4)]).optional(),
|
|
14661
|
+
requestId: external_exports.string().min(1),
|
|
14662
|
+
turnId: external_exports.string().min(1).max(1024),
|
|
14663
|
+
outputTokens: nonNegativeSafeIntegerSchema,
|
|
14664
|
+
startedAtMs: nonNegativeSafeIntegerSchema,
|
|
14665
|
+
completedAtMs: nonNegativeSafeIntegerSchema
|
|
14666
|
+
}).strict().refine((value) => value.completedAtMs > value.startedAtMs);
|
|
14659
14667
|
var usageMeasurementSchema = external_exports.object({
|
|
14668
|
+
version: external_exports.union([external_exports.literal(2), external_exports.literal(3), external_exports.literal(4)]).optional(),
|
|
14660
14669
|
value: finiteNonNegativeNumberSchema,
|
|
14661
14670
|
turnId: external_exports.string().min(1).max(1024),
|
|
14662
14671
|
at: nonNegativeSafeIntegerSchema
|
|
14663
14672
|
}).strict();
|
|
14664
14673
|
var usageMeasurementsSchema = external_exports.object({
|
|
14665
|
-
|
|
14674
|
+
// Older intervals can omit hidden thinking time; do not restore them into averages.
|
|
14675
|
+
outputTimings: external_exports.array(usageOutputTimingSchema).transform((values) => values.filter((value) => value.version === 4)).optional(),
|
|
14676
|
+
// Retain independent TTFT facts when dropping incompatible speed measurements.
|
|
14677
|
+
outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 4).optional().catch(void 0),
|
|
14666
14678
|
timeToFirstOutputMs: usageMeasurementSchema.extend({ value: nonNegativeSafeIntegerSchema }).optional()
|
|
14667
14679
|
}).strict();
|
|
14668
14680
|
var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text2) => text2.length <= maximum));
|
|
@@ -14682,6 +14694,7 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
14682
14694
|
cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14683
14695
|
outputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14684
14696
|
outputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
14697
|
+
sessionOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
14685
14698
|
apiOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
14686
14699
|
reasoningOutputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
14687
14700
|
totalTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
@@ -15093,6 +15106,10 @@ var threadSteeringInspectResultSchema = external_exports.object({
|
|
|
15093
15106
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
15094
15107
|
}).strict();
|
|
15095
15108
|
|
|
15109
|
+
// ../../shared-contracts/dist/thread-archive-confirm.js
|
|
15110
|
+
var threadArchiveConfirmParamsSchema = external_exports.object({ threadId: hostThreadIdSchema }).strict();
|
|
15111
|
+
var threadArchiveConfirmResultSchema = external_exports.object({ confirmed: external_exports.boolean() }).strict();
|
|
15112
|
+
|
|
15096
15113
|
// ../../shared-contracts/dist/client-channel.js
|
|
15097
15114
|
var CLIENT_CHANNEL_VERSION = 1;
|
|
15098
15115
|
var CLIENT_REQUEST_LIMIT_BYTES = 128 * 1024 * 1024;
|
|
@@ -15123,6 +15140,11 @@ var clientChannelEventSchema = external_exports.discriminatedUnion("type", [
|
|
|
15123
15140
|
cursor: clientChannelCursorSchema,
|
|
15124
15141
|
cwd: external_exports.string().optional()
|
|
15125
15142
|
}),
|
|
15143
|
+
external_exports.object({
|
|
15144
|
+
type: external_exports.literal("harness-inspection-changed"),
|
|
15145
|
+
cursor: clientChannelCursorSchema,
|
|
15146
|
+
harnessId: external_exports.string().min(1)
|
|
15147
|
+
}),
|
|
15126
15148
|
external_exports.object({ type: external_exports.literal("display-settings-changed"), cursor: clientChannelCursorSchema }),
|
|
15127
15149
|
external_exports.object({
|
|
15128
15150
|
type: external_exports.literal("preferences-changed"),
|
|
@@ -15194,6 +15216,8 @@ var clientItemTruncationSchema = external_exports.object({
|
|
|
15194
15216
|
var clientTurnSchema = external_exports.object({
|
|
15195
15217
|
id: external_exports.string().min(1),
|
|
15196
15218
|
status: external_exports.string().min(1),
|
|
15219
|
+
/** Native history has no terminal evidence; Desktop's status vocabulary cannot express this. */
|
|
15220
|
+
codexhostTurnOutcome: external_exports.object({ status: external_exports.literal("unknown"), reason: external_exports.string() }).optional(),
|
|
15197
15221
|
items: external_exports.array(external_exports.object({ id: external_exports.string().min(1), type: external_exports.string().min(1) }).passthrough()),
|
|
15198
15222
|
/** Original file operations, independent of the cumulative Desktop fileChange card.
|
|
15199
15223
|
* Insert before the named non-file Item; null appends at the end of the Turn.
|
|
@@ -15232,7 +15256,12 @@ var clientThreadSnapshotSchema = external_exports.object({
|
|
|
15232
15256
|
/** Current interruptible Host Turn, including command Turns omitted from client history. */
|
|
15233
15257
|
activeTurnId: external_exports.string().min(1).nullable().optional(),
|
|
15234
15258
|
/** Most recent explicit command in this Host process; not native conversation history. */
|
|
15235
|
-
command: external_exports.object({
|
|
15259
|
+
command: external_exports.object({
|
|
15260
|
+
name: external_exports.string().min(1),
|
|
15261
|
+
turn: clientTurnSchema,
|
|
15262
|
+
/** First ordinary Turn started after this command; its retained result is not a new event. */
|
|
15263
|
+
subsequentTurnId: external_exports.string().min(1).optional()
|
|
15264
|
+
}).optional(),
|
|
15236
15265
|
thread: external_exports.object({
|
|
15237
15266
|
id: external_exports.string().min(1),
|
|
15238
15267
|
cwd: external_exports.string(),
|
|
@@ -15440,7 +15469,6 @@ var webAccessStateSchema = external_exports.object({
|
|
|
15440
15469
|
quotaUntil: external_exports.string().optional()
|
|
15441
15470
|
}).strict().optional()
|
|
15442
15471
|
}).strict();
|
|
15443
|
-
var webLocalAccessRequiredDetailsSchema = external_exports.object({ url: external_exports.string() }).strict();
|
|
15444
15472
|
|
|
15445
15473
|
// ../../shared-contracts/dist/delegation-read.js
|
|
15446
15474
|
var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
@@ -16401,6 +16429,7 @@ var THREAD_WATCH_NOTICE_OUTCOMES = [
|
|
|
16401
16429
|
"completed",
|
|
16402
16430
|
"failed",
|
|
16403
16431
|
"interrupted",
|
|
16432
|
+
"needsInput",
|
|
16404
16433
|
"timedOut",
|
|
16405
16434
|
"unreadable",
|
|
16406
16435
|
"notFound"
|
|
@@ -16447,13 +16476,25 @@ var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
|
|
|
16447
16476
|
var thread = { ...target, threadId: identity };
|
|
16448
16477
|
var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
16449
16478
|
external_exports.strictObject({ kind: external_exports.literal("hosts") }),
|
|
16479
|
+
external_exports.strictObject({ kind: external_exports.literal("status"), ...thread }),
|
|
16450
16480
|
external_exports.strictObject({
|
|
16451
16481
|
kind: external_exports.literal("list"),
|
|
16452
16482
|
...target,
|
|
16453
16483
|
cursor: external_exports.string().nullable(),
|
|
16454
16484
|
archived: external_exports.boolean()
|
|
16455
16485
|
}),
|
|
16456
|
-
external_exports.strictObject({
|
|
16486
|
+
external_exports.strictObject({
|
|
16487
|
+
kind: external_exports.literal("read"),
|
|
16488
|
+
...thread,
|
|
16489
|
+
page: external_exports.strictObject({
|
|
16490
|
+
cursor: external_exports.string().min(1).max(8192).nullable(),
|
|
16491
|
+
epoch: identity.optional(),
|
|
16492
|
+
sortDirection: external_exports.enum(["asc", "desc"]).optional(),
|
|
16493
|
+
limit: external_exports.number().int().min(1).max(20).optional()
|
|
16494
|
+
}).refine((page) => page.cursor === null || page.epoch !== void 0, {
|
|
16495
|
+
message: "A history continuation requires its connection epoch"
|
|
16496
|
+
}).optional()
|
|
16497
|
+
}),
|
|
16457
16498
|
external_exports.strictObject({
|
|
16458
16499
|
kind: external_exports.literal("configure"),
|
|
16459
16500
|
...thread,
|
|
@@ -17651,6 +17692,7 @@ var usageFields = /* @__PURE__ */ new Set([
|
|
|
17651
17692
|
"totalCredits",
|
|
17652
17693
|
"contextUsagePercent",
|
|
17653
17694
|
"outputTokensPerSecond",
|
|
17695
|
+
"sessionOutputTokensPerSecond",
|
|
17654
17696
|
"apiOutputTokensPerSecond",
|
|
17655
17697
|
"costSource",
|
|
17656
17698
|
"unpricedModels"
|
|
@@ -17673,6 +17715,7 @@ function parseHostUsage(value) {
|
|
|
17673
17715
|
for (const field2 of [
|
|
17674
17716
|
"totalCredits",
|
|
17675
17717
|
"contextUsagePercent",
|
|
17718
|
+
"sessionOutputTokensPerSecond",
|
|
17676
17719
|
"apiOutputTokensPerSecond"
|
|
17677
17720
|
]) {
|
|
17678
17721
|
const candidate = value[field2];
|
|
@@ -17751,6 +17794,7 @@ var requestTokenFields = [
|
|
|
17751
17794
|
"cacheWrite1hInputTokens",
|
|
17752
17795
|
"outputTokens",
|
|
17753
17796
|
"reasoningOutputTokens",
|
|
17797
|
+
"timedOutputTokens",
|
|
17754
17798
|
"startedAtMs",
|
|
17755
17799
|
"completedAtMs"
|
|
17756
17800
|
];
|
|
@@ -17803,6 +17847,14 @@ function parseHostUsageRequest(value) {
|
|
|
17803
17847
|
if (request.startedAtMs === void 0 !== (request.completedAtMs === void 0)) {
|
|
17804
17848
|
throw new Error("Harness Usage request timing fields must be provided together");
|
|
17805
17849
|
}
|
|
17850
|
+
if (request.timedOutputTokens !== void 0) {
|
|
17851
|
+
if (request.startedAtMs === void 0) {
|
|
17852
|
+
throw new Error("Harness Usage request 'timedOutputTokens' requires timing fields");
|
|
17853
|
+
}
|
|
17854
|
+
if (request.timedOutputTokens > request.outputTokens) {
|
|
17855
|
+
throw new Error("Harness Usage request 'timedOutputTokens' must not exceed 'outputTokens'");
|
|
17856
|
+
}
|
|
17857
|
+
}
|
|
17806
17858
|
if (request.startedAtMs !== void 0 && request.completedAtMs !== void 0 && request.completedAtMs < request.startedAtMs) {
|
|
17807
17859
|
throw new Error("Harness Usage request 'completedAtMs' must not precede 'startedAtMs'");
|
|
17808
17860
|
}
|
|
@@ -18713,13 +18713,25 @@ var threadPermissionModeSelectParamsSchema = external_exports.object({
|
|
|
18713
18713
|
var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonnegative();
|
|
18714
18714
|
var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
|
|
18715
18715
|
var cacheHitRatePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
18716
|
+
var usageOutputTimingSchema = external_exports.object({
|
|
18717
|
+
version: external_exports.union([external_exports.literal(3), external_exports.literal(4)]).optional(),
|
|
18718
|
+
requestId: external_exports.string().min(1),
|
|
18719
|
+
turnId: external_exports.string().min(1).max(1024),
|
|
18720
|
+
outputTokens: nonNegativeSafeIntegerSchema,
|
|
18721
|
+
startedAtMs: nonNegativeSafeIntegerSchema,
|
|
18722
|
+
completedAtMs: nonNegativeSafeIntegerSchema
|
|
18723
|
+
}).strict().refine((value) => value.completedAtMs > value.startedAtMs);
|
|
18716
18724
|
var usageMeasurementSchema = external_exports.object({
|
|
18725
|
+
version: external_exports.union([external_exports.literal(2), external_exports.literal(3), external_exports.literal(4)]).optional(),
|
|
18717
18726
|
value: finiteNonNegativeNumberSchema,
|
|
18718
18727
|
turnId: external_exports.string().min(1).max(1024),
|
|
18719
18728
|
at: nonNegativeSafeIntegerSchema
|
|
18720
18729
|
}).strict();
|
|
18721
18730
|
var usageMeasurementsSchema = external_exports.object({
|
|
18722
|
-
|
|
18731
|
+
// Older intervals can omit hidden thinking time; do not restore them into averages.
|
|
18732
|
+
outputTimings: external_exports.array(usageOutputTimingSchema).transform((values) => values.filter((value) => value.version === 4)).optional(),
|
|
18733
|
+
// Retain independent TTFT facts when dropping incompatible speed measurements.
|
|
18734
|
+
outputTokensPerSecond: usageMeasurementSchema.refine((value) => value.version === 4).optional().catch(void 0),
|
|
18723
18735
|
timeToFirstOutputMs: usageMeasurementSchema.extend({ value: nonNegativeSafeIntegerSchema }).optional()
|
|
18724
18736
|
}).strict();
|
|
18725
18737
|
var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text) => text.length <= maximum));
|
|
@@ -18739,6 +18751,7 @@ var threadUsageSnapshotSchema = external_exports.object({
|
|
|
18739
18751
|
cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
18740
18752
|
outputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
18741
18753
|
outputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
18754
|
+
sessionOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
18742
18755
|
apiOutputTokensPerSecond: finiteNonNegativeNumberSchema.optional(),
|
|
18743
18756
|
reasoningOutputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
18744
18757
|
totalTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
@@ -19150,6 +19163,10 @@ var threadSteeringInspectResultSchema = external_exports.object({
|
|
|
19150
19163
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
19151
19164
|
}).strict();
|
|
19152
19165
|
|
|
19166
|
+
// ../../shared-contracts/dist/thread-archive-confirm.js
|
|
19167
|
+
var threadArchiveConfirmParamsSchema = external_exports.object({ threadId: hostThreadIdSchema }).strict();
|
|
19168
|
+
var threadArchiveConfirmResultSchema = external_exports.object({ confirmed: external_exports.boolean() }).strict();
|
|
19169
|
+
|
|
19153
19170
|
// ../../shared-contracts/dist/client-channel.js
|
|
19154
19171
|
var CLIENT_CHANNEL_VERSION = 1;
|
|
19155
19172
|
var CLIENT_REQUEST_LIMIT_BYTES = 128 * 1024 * 1024;
|
|
@@ -19180,6 +19197,11 @@ var clientChannelEventSchema = external_exports.discriminatedUnion("type", [
|
|
|
19180
19197
|
cursor: clientChannelCursorSchema,
|
|
19181
19198
|
cwd: external_exports.string().optional()
|
|
19182
19199
|
}),
|
|
19200
|
+
external_exports.object({
|
|
19201
|
+
type: external_exports.literal("harness-inspection-changed"),
|
|
19202
|
+
cursor: clientChannelCursorSchema,
|
|
19203
|
+
harnessId: external_exports.string().min(1)
|
|
19204
|
+
}),
|
|
19183
19205
|
external_exports.object({ type: external_exports.literal("display-settings-changed"), cursor: clientChannelCursorSchema }),
|
|
19184
19206
|
external_exports.object({
|
|
19185
19207
|
type: external_exports.literal("preferences-changed"),
|
|
@@ -19251,6 +19273,8 @@ var clientItemTruncationSchema = external_exports.object({
|
|
|
19251
19273
|
var clientTurnSchema = external_exports.object({
|
|
19252
19274
|
id: external_exports.string().min(1),
|
|
19253
19275
|
status: external_exports.string().min(1),
|
|
19276
|
+
/** Native history has no terminal evidence; Desktop's status vocabulary cannot express this. */
|
|
19277
|
+
codexhostTurnOutcome: external_exports.object({ status: external_exports.literal("unknown"), reason: external_exports.string() }).optional(),
|
|
19254
19278
|
items: external_exports.array(external_exports.object({ id: external_exports.string().min(1), type: external_exports.string().min(1) }).passthrough()),
|
|
19255
19279
|
/** Original file operations, independent of the cumulative Desktop fileChange card.
|
|
19256
19280
|
* Insert before the named non-file Item; null appends at the end of the Turn.
|
|
@@ -19289,7 +19313,12 @@ var clientThreadSnapshotSchema = external_exports.object({
|
|
|
19289
19313
|
/** Current interruptible Host Turn, including command Turns omitted from client history. */
|
|
19290
19314
|
activeTurnId: external_exports.string().min(1).nullable().optional(),
|
|
19291
19315
|
/** Most recent explicit command in this Host process; not native conversation history. */
|
|
19292
|
-
command: external_exports.object({
|
|
19316
|
+
command: external_exports.object({
|
|
19317
|
+
name: external_exports.string().min(1),
|
|
19318
|
+
turn: clientTurnSchema,
|
|
19319
|
+
/** First ordinary Turn started after this command; its retained result is not a new event. */
|
|
19320
|
+
subsequentTurnId: external_exports.string().min(1).optional()
|
|
19321
|
+
}).optional(),
|
|
19293
19322
|
thread: external_exports.object({
|
|
19294
19323
|
id: external_exports.string().min(1),
|
|
19295
19324
|
cwd: external_exports.string(),
|
|
@@ -19497,7 +19526,6 @@ var webAccessStateSchema = external_exports.object({
|
|
|
19497
19526
|
quotaUntil: external_exports.string().optional()
|
|
19498
19527
|
}).strict().optional()
|
|
19499
19528
|
}).strict();
|
|
19500
|
-
var webLocalAccessRequiredDetailsSchema = external_exports.object({ url: external_exports.string() }).strict();
|
|
19501
19529
|
|
|
19502
19530
|
// ../../shared-contracts/dist/delegation-read.js
|
|
19503
19531
|
var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
@@ -20463,6 +20491,7 @@ var THREAD_WATCH_NOTICE_OUTCOMES = [
|
|
|
20463
20491
|
"completed",
|
|
20464
20492
|
"failed",
|
|
20465
20493
|
"interrupted",
|
|
20494
|
+
"needsInput",
|
|
20466
20495
|
"timedOut",
|
|
20467
20496
|
"unreadable",
|
|
20468
20497
|
"notFound"
|
|
@@ -20509,13 +20538,25 @@ var target = { hostId: identity.regex(/^remote-(?:ssh(?:-|:)|control:)/u) };
|
|
|
20509
20538
|
var thread = { ...target, threadId: identity };
|
|
20510
20539
|
var remoteSessionOperationSchema = external_exports.discriminatedUnion("kind", [
|
|
20511
20540
|
external_exports.strictObject({ kind: external_exports.literal("hosts") }),
|
|
20541
|
+
external_exports.strictObject({ kind: external_exports.literal("status"), ...thread }),
|
|
20512
20542
|
external_exports.strictObject({
|
|
20513
20543
|
kind: external_exports.literal("list"),
|
|
20514
20544
|
...target,
|
|
20515
20545
|
cursor: external_exports.string().nullable(),
|
|
20516
20546
|
archived: external_exports.boolean()
|
|
20517
20547
|
}),
|
|
20518
|
-
external_exports.strictObject({
|
|
20548
|
+
external_exports.strictObject({
|
|
20549
|
+
kind: external_exports.literal("read"),
|
|
20550
|
+
...thread,
|
|
20551
|
+
page: external_exports.strictObject({
|
|
20552
|
+
cursor: external_exports.string().min(1).max(8192).nullable(),
|
|
20553
|
+
epoch: identity.optional(),
|
|
20554
|
+
sortDirection: external_exports.enum(["asc", "desc"]).optional(),
|
|
20555
|
+
limit: external_exports.number().int().min(1).max(20).optional()
|
|
20556
|
+
}).refine((page) => page.cursor === null || page.epoch !== void 0, {
|
|
20557
|
+
message: "A history continuation requires its connection epoch"
|
|
20558
|
+
}).optional()
|
|
20559
|
+
}),
|
|
20519
20560
|
external_exports.strictObject({
|
|
20520
20561
|
kind: external_exports.literal("configure"),
|
|
20521
20562
|
...thread,
|
|
@@ -32781,6 +32822,7 @@ var usageFields = /* @__PURE__ */ new Set([
|
|
|
32781
32822
|
"totalCredits",
|
|
32782
32823
|
"contextUsagePercent",
|
|
32783
32824
|
"outputTokensPerSecond",
|
|
32825
|
+
"sessionOutputTokensPerSecond",
|
|
32784
32826
|
"apiOutputTokensPerSecond",
|
|
32785
32827
|
"costSource",
|
|
32786
32828
|
"unpricedModels"
|
|
@@ -32803,6 +32845,7 @@ function parseHostUsage(value) {
|
|
|
32803
32845
|
for (const field2 of [
|
|
32804
32846
|
"totalCredits",
|
|
32805
32847
|
"contextUsagePercent",
|
|
32848
|
+
"sessionOutputTokensPerSecond",
|
|
32806
32849
|
"apiOutputTokensPerSecond"
|
|
32807
32850
|
]) {
|
|
32808
32851
|
const candidate = value[field2];
|
|
@@ -32881,6 +32924,7 @@ var requestTokenFields = [
|
|
|
32881
32924
|
"cacheWrite1hInputTokens",
|
|
32882
32925
|
"outputTokens",
|
|
32883
32926
|
"reasoningOutputTokens",
|
|
32927
|
+
"timedOutputTokens",
|
|
32884
32928
|
"startedAtMs",
|
|
32885
32929
|
"completedAtMs"
|
|
32886
32930
|
];
|