@karlorz/codexhost-cli-win32-x64 0.15.0-1 → 0.16.1-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 +60 -25
- package/app/console-web.js +143 -57
- package/app/cpa-live-voice-hook.js +58 -24
- package/app/desktop-controller.mjs +649 -53
- package/app/host-runtime.mjs +10959 -10075
- package/app/plugins/antigravity/plugin.mjs +73 -29
- package/app/plugins/claude-code/plugin.mjs +104 -72
- package/app/plugins/codebuddy/plugin.mjs +113 -34
- package/app/plugins/codex-usage/plugin.mjs +65 -31
- package/app/plugins/copilot/plugin.mjs +73 -29
- package/app/plugins/cursor-cli/plugin.mjs +70 -26
- package/app/plugins/deepseek-harness/plugin.mjs +88 -34
- package/app/plugins/grok/plugin.mjs +1505 -502
- package/app/plugins/hermes/plugin.mjs +68 -24
- package/app/plugins/kimi-code/plugin.mjs +70 -26
- package/app/plugins/kiro-cli/plugin.mjs +70 -26
- package/app/plugins/omp/plugin.mjs +71 -27
- package/app/plugins/opencode/plugin.mjs +84 -30
- package/app/plugins/pi/plugin.mjs +87 -31
- package/app/plugins/qoder/plugin.mjs +96 -52
- package/app/plugins/qoder-cn/plugin.mjs +96 -52
- package/app/plugins/workbuddy/plugin.mjs +113 -34
- package/app/plugins/zcode/plugin.mjs +144 -47
- package/app/renderer-extension.js +1843 -213
- package/bin/codexhost.exe +0 -0
- package/libexec/codexhost-node-repl.exe +0 -0
- package/libexec/codexhost-shim.exe +0 -0
- package/libexec/codexhost-updater.exe +0 -0
- package/package.json +1 -1
|
@@ -5123,8 +5123,8 @@ function az_default() {
|
|
|
5123
5123
|
}
|
|
5124
5124
|
|
|
5125
5125
|
// ../../../node_modules/zod/v4/locales/be.js
|
|
5126
|
-
function getBelarusianPlural(
|
|
5127
|
-
const absCount = Math.abs(
|
|
5126
|
+
function getBelarusianPlural(count3, one, few, many) {
|
|
5127
|
+
const absCount = Math.abs(count3);
|
|
5128
5128
|
const lastDigit = absCount % 10;
|
|
5129
5129
|
const lastTwoDigits = absCount % 100;
|
|
5130
5130
|
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
@@ -7202,8 +7202,8 @@ function hu_default() {
|
|
|
7202
7202
|
}
|
|
7203
7203
|
|
|
7204
7204
|
// ../../../node_modules/zod/v4/locales/hy.js
|
|
7205
|
-
function getArmenianPlural(
|
|
7206
|
-
return Math.abs(
|
|
7205
|
+
function getArmenianPlural(count3, one, many) {
|
|
7206
|
+
return Math.abs(count3) === 1 ? one : many;
|
|
7207
7207
|
}
|
|
7208
7208
|
function withDefiniteArticle(word) {
|
|
7209
7209
|
if (!word)
|
|
@@ -9331,8 +9331,8 @@ function ro_default() {
|
|
|
9331
9331
|
}
|
|
9332
9332
|
|
|
9333
9333
|
// ../../../node_modules/zod/v4/locales/ru.js
|
|
9334
|
-
function getRussianPlural(
|
|
9335
|
-
const absCount = Math.abs(
|
|
9334
|
+
function getRussianPlural(count3, one, few, many) {
|
|
9335
|
+
const absCount = Math.abs(count3);
|
|
9336
9336
|
const lastDigit = absCount % 10;
|
|
9337
9337
|
const lastTwoDigits = absCount % 100;
|
|
9338
9338
|
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
@@ -15001,6 +15001,33 @@ function date4(params) {
|
|
|
15001
15001
|
// ../../../node_modules/zod/v4/classic/external.js
|
|
15002
15002
|
config(en_default());
|
|
15003
15003
|
|
|
15004
|
+
// ../../shared-contracts/dist/goals.js
|
|
15005
|
+
var harnessGoalStatusSchema = external_exports.enum([
|
|
15006
|
+
"active",
|
|
15007
|
+
"paused",
|
|
15008
|
+
"blocked",
|
|
15009
|
+
"usageLimited",
|
|
15010
|
+
"budgetLimited",
|
|
15011
|
+
"complete"
|
|
15012
|
+
]);
|
|
15013
|
+
var count = external_exports.number().int().nonnegative().safe();
|
|
15014
|
+
var harnessGoalSchema = external_exports.object({
|
|
15015
|
+
objective: external_exports.string().min(1),
|
|
15016
|
+
status: harnessGoalStatusSchema,
|
|
15017
|
+
tokenBudget: count.positive().nullable(),
|
|
15018
|
+
tokensUsed: count,
|
|
15019
|
+
timeUsedSeconds: count,
|
|
15020
|
+
createdAt: count,
|
|
15021
|
+
updatedAt: count
|
|
15022
|
+
});
|
|
15023
|
+
var goalOriginSchema = external_exports.enum(["user", "automatic"]).nullable();
|
|
15024
|
+
var harnessGoalSetSchema = external_exports.object({
|
|
15025
|
+
objective: external_exports.string().min(1).optional(),
|
|
15026
|
+
status: external_exports.enum(["active", "paused"]).optional(),
|
|
15027
|
+
tokenBudget: count.positive().nullable().optional(),
|
|
15028
|
+
origin: goalOriginSchema
|
|
15029
|
+
});
|
|
15030
|
+
|
|
15004
15031
|
// ../../shared-contracts/dist/delegation-read.js
|
|
15005
15032
|
var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
15006
15033
|
var delegationReadParamsSchema = external_exports.strictObject({
|
|
@@ -15131,7 +15158,7 @@ var modelPriceDefaultResultSchema = external_exports.strictObject({
|
|
|
15131
15158
|
|
|
15132
15159
|
// ../../shared-contracts/dist/usage-statistics.js
|
|
15133
15160
|
var USAGE_STATISTICS_RANGES = ["today", "7d", "30d", "90d", "all"];
|
|
15134
|
-
var
|
|
15161
|
+
var count2 = external_exports.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
|
|
15135
15162
|
var localDate = external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/u);
|
|
15136
15163
|
var harness = external_exports.string().min(1).max(128);
|
|
15137
15164
|
var model = external_exports.string().min(1).max(512);
|
|
@@ -15154,22 +15181,24 @@ var usageStatisticsParamsSchema = external_exports.strictObject({
|
|
|
15154
15181
|
date: localDate.optional()
|
|
15155
15182
|
});
|
|
15156
15183
|
var usageStatisticsTotalsSchema = external_exports.strictObject({
|
|
15157
|
-
requests:
|
|
15158
|
-
inputTokens:
|
|
15159
|
-
cachedInputTokens:
|
|
15160
|
-
cacheWriteInputTokens:
|
|
15161
|
-
cacheKnownInputTokens:
|
|
15162
|
-
|
|
15163
|
-
|
|
15184
|
+
requests: count2,
|
|
15185
|
+
inputTokens: count2,
|
|
15186
|
+
cachedInputTokens: count2,
|
|
15187
|
+
cacheWriteInputTokens: count2,
|
|
15188
|
+
cacheKnownInputTokens: count2,
|
|
15189
|
+
cacheHitCachedInputTokens: count2,
|
|
15190
|
+
cacheHitInputTokens: count2,
|
|
15191
|
+
outputTokens: count2,
|
|
15192
|
+
reasoningOutputTokens: count2,
|
|
15164
15193
|
/** USD at the public price, summed over the priced requests only. */
|
|
15165
15194
|
costUsd: external_exports.number().finite().min(0),
|
|
15166
15195
|
/** Requests without a price (or the cache data the price needs); not in `costUsd`. */
|
|
15167
|
-
unpricedRequests:
|
|
15196
|
+
unpricedRequests: count2,
|
|
15168
15197
|
/**
|
|
15169
15198
|
* Requests whose storage gave no token counts: counted as requests, with neither tokens nor
|
|
15170
15199
|
* cost, and not as unpriced.
|
|
15171
15200
|
*/
|
|
15172
|
-
unmeteredRequests:
|
|
15201
|
+
unmeteredRequests: count2
|
|
15173
15202
|
});
|
|
15174
15203
|
var totals = usageStatisticsTotalsSchema.shape;
|
|
15175
15204
|
var usageStatisticsSessionSchema = external_exports.strictObject({
|
|
@@ -15180,8 +15209,8 @@ var usageStatisticsSessionSchema = external_exports.strictObject({
|
|
|
15180
15209
|
title: external_exports.string().min(1).max(200).optional(),
|
|
15181
15210
|
/** Models the session used, most requests first. */
|
|
15182
15211
|
models: external_exports.array(model).max(16),
|
|
15183
|
-
firstAtMs:
|
|
15184
|
-
lastAtMs:
|
|
15212
|
+
firstAtMs: count2,
|
|
15213
|
+
lastAtMs: count2,
|
|
15185
15214
|
...totals
|
|
15186
15215
|
});
|
|
15187
15216
|
var usageStatisticsResultSchema = external_exports.strictObject({
|
|
@@ -15199,7 +15228,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
15199
15228
|
date: localDate.nullable()
|
|
15200
15229
|
}),
|
|
15201
15230
|
/** Reading of native storage: incomplete while the first read, or a refresh, is under way. */
|
|
15202
|
-
reading: external_exports.strictObject({ complete: external_exports.boolean(), sources:
|
|
15231
|
+
reading: external_exports.strictObject({ complete: external_exports.boolean(), sources: count2, read: count2 }),
|
|
15203
15232
|
/** Harnesses whose storage could not be read; their part is missing, the rest is complete. */
|
|
15204
15233
|
failures: external_exports.array(external_exports.strictObject({ harness, message: external_exports.string().max(2048) })).max(256),
|
|
15205
15234
|
/** Every value seen in the range, ignoring the filters, to choose filters from. */
|
|
@@ -15219,8 +15248,8 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
15219
15248
|
harness,
|
|
15220
15249
|
model: model.nullable(),
|
|
15221
15250
|
credits: external_exports.number().finite().min(0),
|
|
15222
|
-
reportedRequests:
|
|
15223
|
-
requests:
|
|
15251
|
+
reportedRequests: count2,
|
|
15252
|
+
requests: count2
|
|
15224
15253
|
})).max(4096).optional(),
|
|
15225
15254
|
/** All filters applied. */
|
|
15226
15255
|
totals: usageStatisticsTotalsSchema,
|
|
@@ -15237,7 +15266,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
15237
15266
|
model: model.nullable(),
|
|
15238
15267
|
...totals,
|
|
15239
15268
|
/** Requests priced by what the Harness recorded they cost, not by a price list. */
|
|
15240
|
-
harnessPricedRequests:
|
|
15269
|
+
harnessPricedRequests: count2
|
|
15241
15270
|
})).max(4096),
|
|
15242
15271
|
byProject: external_exports.array(external_exports.strictObject({ project: project.nullable(), ...totals })).max(4096),
|
|
15243
15272
|
/**
|
|
@@ -15851,7 +15880,9 @@ var harnessModelCatalogSchema = external_exports.object({
|
|
|
15851
15880
|
var harnessHistoryCapabilitiesSchema = external_exports.object({
|
|
15852
15881
|
fork: external_exports.boolean(),
|
|
15853
15882
|
forkAcrossCwd: external_exports.boolean(),
|
|
15854
|
-
rollbackLastTurn: external_exports.boolean()
|
|
15883
|
+
rollbackLastTurn: external_exports.boolean(),
|
|
15884
|
+
/** Remove the selected checkpoint's Turn and every later Turn, without restoring files. */
|
|
15885
|
+
rollbackToCheckpoint: external_exports.boolean().optional()
|
|
15855
15886
|
}).strict().refine((history) => history.fork || !history.forkAcrossCwd, {
|
|
15856
15887
|
path: ["forkAcrossCwd"],
|
|
15857
15888
|
message: "Cross-cwd Fork requires exact history Fork support"
|
|
@@ -16089,7 +16120,10 @@ var harnessPluginRouteSchema = external_exports.object({
|
|
|
16089
16120
|
harnessId: harnessPluginIdSchema,
|
|
16090
16121
|
model: harnessModelRefSchema.optional(),
|
|
16091
16122
|
thinkingOptionId: harnessThinkingOptionIdSchema.optional(),
|
|
16092
|
-
permissionModeId: harnessPermissionModeIdSchema.optional()
|
|
16123
|
+
permissionModeId: harnessPermissionModeIdSchema.optional(),
|
|
16124
|
+
/** A draft prewarm create: stays unsubmitted until the user's first Turn.
|
|
16125
|
+
* Desktop forwards only the Model of a main-process prewarm to thread/start. */
|
|
16126
|
+
prewarm: external_exports.literal(true).optional()
|
|
16093
16127
|
}).strict();
|
|
16094
16128
|
|
|
16095
16129
|
// ../../shared-contracts/dist/harness-launch-settings.js
|
|
@@ -18353,7 +18387,17 @@ function pendingNativeHistoryRewind(contents) {
|
|
|
18353
18387
|
const last = parseRows(contents).findLast((row) => row.type === "resend-fork-notice" || NATIVE_MESSAGE_TYPES.has(text(row.type)));
|
|
18354
18388
|
return last?.type === "resend-fork-notice" ? { forkPointId: text(last.parentId) || null } : void 0;
|
|
18355
18389
|
}
|
|
18390
|
+
function isNativeCompactionSummary(row) {
|
|
18391
|
+
const data = record2(row.providerData);
|
|
18392
|
+
return row.type === "message" && row.role === "user" && data.isCompactInternal === true;
|
|
18393
|
+
}
|
|
18356
18394
|
function nativeHistoryRows(contents) {
|
|
18395
|
+
return collectNativeHistoryRows(contents, false);
|
|
18396
|
+
}
|
|
18397
|
+
function nativeDisplayHistoryRows(contents) {
|
|
18398
|
+
return collectNativeHistoryRows(contents, true);
|
|
18399
|
+
}
|
|
18400
|
+
function collectNativeHistoryRows(contents, followCompactionParent) {
|
|
18357
18401
|
const entries = /* @__PURE__ */ new Map();
|
|
18358
18402
|
let leaf = "";
|
|
18359
18403
|
for (const row of parseRows(contents)) {
|
|
@@ -18378,10 +18422,16 @@ function nativeHistoryRows(contents) {
|
|
|
18378
18422
|
throw new CodeBuddyError("protocolError", "Native history parent is missing");
|
|
18379
18423
|
chain.push(row);
|
|
18380
18424
|
leaf = text(row.parentId);
|
|
18425
|
+
if (!leaf && followCompactionParent && isNativeCompactionSummary(row)) {
|
|
18426
|
+
const logicalParent = text(row.logicalParentId);
|
|
18427
|
+
if (logicalParent && !entries.has(logicalParent))
|
|
18428
|
+
throw new CodeBuddyError("protocolError", "Native compaction parent is missing");
|
|
18429
|
+
leaf = logicalParent;
|
|
18430
|
+
}
|
|
18381
18431
|
}
|
|
18382
18432
|
return chain.reverse();
|
|
18383
18433
|
}
|
|
18384
|
-
function snapshotFromHistory(contents, ref, cwd, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
18434
|
+
function snapshotFromHistory(contents, ref, cwd, profile = CODEBUDDY_RUNTIME_PROFILE, options = {}) {
|
|
18385
18435
|
const supportsNativeCommands = nativeCommandsEnabled(profile);
|
|
18386
18436
|
const supportsFork = capabilitiesForProfile(profile).history.fork;
|
|
18387
18437
|
const turns = [];
|
|
@@ -18407,7 +18457,8 @@ function snapshotFromHistory(contents, ref, cwd, profile = CODEBUDDY_RUNTIME_PRO
|
|
|
18407
18457
|
snapshot.item.outputTruncated = Boolean(output.truncated);
|
|
18408
18458
|
}
|
|
18409
18459
|
};
|
|
18410
|
-
const
|
|
18460
|
+
const includeCompactionHistory = options.includeCompactionHistory !== false;
|
|
18461
|
+
const history = includeCompactionHistory ? nativeDisplayHistoryRows(contents) : nativeHistoryRows(contents);
|
|
18411
18462
|
const manualCompactions = /* @__PURE__ */ new Set();
|
|
18412
18463
|
let compactUser;
|
|
18413
18464
|
if (supportsNativeCommands)
|
|
@@ -18441,6 +18492,22 @@ function snapshotFromHistory(contents, ref, cwd, profile = CODEBUDDY_RUNTIME_PRO
|
|
|
18441
18492
|
continue;
|
|
18442
18493
|
if (supportsNativeCommands && row.type === "message" && row.role === "user" && data.agent === "compact" && !manualCompactions.has(text(row.id)))
|
|
18443
18494
|
continue;
|
|
18495
|
+
if (includeCompactionHistory && isNativeCompactionSummary(row)) {
|
|
18496
|
+
if (supportsNativeCommands && current) {
|
|
18497
|
+
const outcome = data.isCompacted === true ? { status: "succeeded" } : {
|
|
18498
|
+
status: "failed",
|
|
18499
|
+
error: nativeError(new CodeBuddyError("nativeFailure", "Native compaction did not complete"), profile)
|
|
18500
|
+
};
|
|
18501
|
+
current.items.push({
|
|
18502
|
+
item: {
|
|
18503
|
+
type: "contextCompaction",
|
|
18504
|
+
itemId: hostItemIdSchema.parse(`compact-${text(row.id)}`)
|
|
18505
|
+
},
|
|
18506
|
+
outcome
|
|
18507
|
+
});
|
|
18508
|
+
}
|
|
18509
|
+
continue;
|
|
18510
|
+
}
|
|
18444
18511
|
if (row.type === "message" && row.role === "user") {
|
|
18445
18512
|
current = {
|
|
18446
18513
|
nativeTurnRef: nativeTurnRefSchema.parse({
|
|
@@ -20980,9 +21047,9 @@ var Connection = class {
|
|
|
20980
21047
|
return;
|
|
20981
21048
|
}
|
|
20982
21049
|
const responseBatch = isResponseBatch(batch);
|
|
20983
|
-
const responseCount = responseBatch ? 0 : batch.reduce((
|
|
21050
|
+
const responseCount = responseBatch ? 0 : batch.reduce((count3, message) => count3 + (isNotificationMessage(message) ? 0 : 1), 0);
|
|
20984
21051
|
let remaining = responseCount;
|
|
20985
|
-
let remainingNotifications = batch.reduce((
|
|
21052
|
+
let remainingNotifications = batch.reduce((count3, message) => count3 + (isNotificationMessage(message) ? 1 : 0), 0);
|
|
20986
21053
|
let responseSent = false;
|
|
20987
21054
|
const responses = [];
|
|
20988
21055
|
const sendResponsesIfReady = async () => {
|
|
@@ -23422,7 +23489,9 @@ function commandCaveat(row) {
|
|
|
23422
23489
|
}
|
|
23423
23490
|
function retainedRowCount(input, contents, sourceCwd = input.cwd, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
23424
23491
|
const rows2 = nativeHistoryRows(contents);
|
|
23425
|
-
const turns = snapshotFromHistory(contents, input.sourceRef, sourceCwd, profile
|
|
23492
|
+
const turns = snapshotFromHistory(contents, input.sourceRef, sourceCwd, profile, {
|
|
23493
|
+
includeCompactionHistory: false
|
|
23494
|
+
}).turns;
|
|
23426
23495
|
let excluded2;
|
|
23427
23496
|
if (input.kind === "rollbackLastTurn") {
|
|
23428
23497
|
if (!turns.length)
|
|
@@ -23435,13 +23504,13 @@ function retainedRowCount(input, contents, sourceCwd = input.cwd, profile = CODE
|
|
|
23435
23504
|
throw new CodeBuddyError("checkpointNotFound", "Native Fork checkpoint was not found");
|
|
23436
23505
|
excluded2 = turns[index + 1]?.nativeTurnRef.nativeTurnKey;
|
|
23437
23506
|
}
|
|
23438
|
-
let
|
|
23439
|
-
if (
|
|
23507
|
+
let count3 = excluded2 ? rows2.findIndex((row) => row.id === excluded2) : rows2.length;
|
|
23508
|
+
if (count3 < 0)
|
|
23440
23509
|
throw new CodeBuddyError("protocolError", "Native Turn boundary is missing");
|
|
23441
23510
|
if (excluded2)
|
|
23442
|
-
while (
|
|
23443
|
-
|
|
23444
|
-
return
|
|
23511
|
+
while (count3 > 0 && commandCaveat(rows2[count3 - 1]))
|
|
23512
|
+
count3--;
|
|
23513
|
+
return count3;
|
|
23445
23514
|
}
|
|
23446
23515
|
function sameResolvedPath(left, right) {
|
|
23447
23516
|
const a = codeBuddyCanonicalCwd(left), b = codeBuddyCanonicalCwd(right);
|
|
@@ -25295,6 +25364,16 @@ var CodeBuddyAdapter = class {
|
|
|
25295
25364
|
}
|
|
25296
25365
|
}
|
|
25297
25366
|
async open(input) {
|
|
25367
|
+
if (input.kind === "rollbackToCheckpoint") {
|
|
25368
|
+
return {
|
|
25369
|
+
ok: false,
|
|
25370
|
+
error: {
|
|
25371
|
+
code: "unsupported",
|
|
25372
|
+
message: "Checkpoint rollback is not supported by this Adapter",
|
|
25373
|
+
retryable: false
|
|
25374
|
+
}
|
|
25375
|
+
};
|
|
25376
|
+
}
|
|
25298
25377
|
if (this.#closed)
|
|
25299
25378
|
return failure("invalidState", "Adapter is closed", this.#profile);
|
|
25300
25379
|
if (input.kind === "create" && input.executionPolicy === "unattended-full-access" && input.permissionModeId && input.permissionModeId !== "fullAccess")
|
|
@@ -4641,8 +4641,8 @@ function az_default() {
|
|
|
4641
4641
|
}
|
|
4642
4642
|
|
|
4643
4643
|
// ../../../node_modules/zod/v4/locales/be.js
|
|
4644
|
-
function getBelarusianPlural(
|
|
4645
|
-
const absCount = Math.abs(
|
|
4644
|
+
function getBelarusianPlural(count3, one, few, many) {
|
|
4645
|
+
const absCount = Math.abs(count3);
|
|
4646
4646
|
const lastDigit = absCount % 10;
|
|
4647
4647
|
const lastTwoDigits = absCount % 100;
|
|
4648
4648
|
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
@@ -6720,8 +6720,8 @@ function hu_default() {
|
|
|
6720
6720
|
}
|
|
6721
6721
|
|
|
6722
6722
|
// ../../../node_modules/zod/v4/locales/hy.js
|
|
6723
|
-
function getArmenianPlural(
|
|
6724
|
-
return Math.abs(
|
|
6723
|
+
function getArmenianPlural(count3, one, many) {
|
|
6724
|
+
return Math.abs(count3) === 1 ? one : many;
|
|
6725
6725
|
}
|
|
6726
6726
|
function withDefiniteArticle(word) {
|
|
6727
6727
|
if (!word)
|
|
@@ -8849,8 +8849,8 @@ function ro_default() {
|
|
|
8849
8849
|
}
|
|
8850
8850
|
|
|
8851
8851
|
// ../../../node_modules/zod/v4/locales/ru.js
|
|
8852
|
-
function getRussianPlural(
|
|
8853
|
-
const absCount = Math.abs(
|
|
8852
|
+
function getRussianPlural(count3, one, few, many) {
|
|
8853
|
+
const absCount = Math.abs(count3);
|
|
8854
8854
|
const lastDigit = absCount % 10;
|
|
8855
8855
|
const lastTwoDigits = absCount % 100;
|
|
8856
8856
|
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
@@ -14519,6 +14519,33 @@ function date4(params) {
|
|
|
14519
14519
|
// ../../../node_modules/zod/v4/classic/external.js
|
|
14520
14520
|
config(en_default());
|
|
14521
14521
|
|
|
14522
|
+
// ../../shared-contracts/dist/goals.js
|
|
14523
|
+
var harnessGoalStatusSchema = external_exports.enum([
|
|
14524
|
+
"active",
|
|
14525
|
+
"paused",
|
|
14526
|
+
"blocked",
|
|
14527
|
+
"usageLimited",
|
|
14528
|
+
"budgetLimited",
|
|
14529
|
+
"complete"
|
|
14530
|
+
]);
|
|
14531
|
+
var count = external_exports.number().int().nonnegative().safe();
|
|
14532
|
+
var harnessGoalSchema = external_exports.object({
|
|
14533
|
+
objective: external_exports.string().min(1),
|
|
14534
|
+
status: harnessGoalStatusSchema,
|
|
14535
|
+
tokenBudget: count.positive().nullable(),
|
|
14536
|
+
tokensUsed: count,
|
|
14537
|
+
timeUsedSeconds: count,
|
|
14538
|
+
createdAt: count,
|
|
14539
|
+
updatedAt: count
|
|
14540
|
+
});
|
|
14541
|
+
var goalOriginSchema = external_exports.enum(["user", "automatic"]).nullable();
|
|
14542
|
+
var harnessGoalSetSchema = external_exports.object({
|
|
14543
|
+
objective: external_exports.string().min(1).optional(),
|
|
14544
|
+
status: external_exports.enum(["active", "paused"]).optional(),
|
|
14545
|
+
tokenBudget: count.positive().nullable().optional(),
|
|
14546
|
+
origin: goalOriginSchema
|
|
14547
|
+
});
|
|
14548
|
+
|
|
14522
14549
|
// ../../shared-contracts/dist/delegation-read.js
|
|
14523
14550
|
var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
14524
14551
|
var delegationReadParamsSchema = external_exports.strictObject({
|
|
@@ -14649,7 +14676,7 @@ var modelPriceDefaultResultSchema = external_exports.strictObject({
|
|
|
14649
14676
|
|
|
14650
14677
|
// ../../shared-contracts/dist/usage-statistics.js
|
|
14651
14678
|
var USAGE_STATISTICS_RANGES = ["today", "7d", "30d", "90d", "all"];
|
|
14652
|
-
var
|
|
14679
|
+
var count2 = external_exports.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
|
|
14653
14680
|
var localDate = external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/u);
|
|
14654
14681
|
var harness = external_exports.string().min(1).max(128);
|
|
14655
14682
|
var model = external_exports.string().min(1).max(512);
|
|
@@ -14672,22 +14699,24 @@ var usageStatisticsParamsSchema = external_exports.strictObject({
|
|
|
14672
14699
|
date: localDate.optional()
|
|
14673
14700
|
});
|
|
14674
14701
|
var usageStatisticsTotalsSchema = external_exports.strictObject({
|
|
14675
|
-
requests:
|
|
14676
|
-
inputTokens:
|
|
14677
|
-
cachedInputTokens:
|
|
14678
|
-
cacheWriteInputTokens:
|
|
14679
|
-
cacheKnownInputTokens:
|
|
14680
|
-
|
|
14681
|
-
|
|
14702
|
+
requests: count2,
|
|
14703
|
+
inputTokens: count2,
|
|
14704
|
+
cachedInputTokens: count2,
|
|
14705
|
+
cacheWriteInputTokens: count2,
|
|
14706
|
+
cacheKnownInputTokens: count2,
|
|
14707
|
+
cacheHitCachedInputTokens: count2,
|
|
14708
|
+
cacheHitInputTokens: count2,
|
|
14709
|
+
outputTokens: count2,
|
|
14710
|
+
reasoningOutputTokens: count2,
|
|
14682
14711
|
/** USD at the public price, summed over the priced requests only. */
|
|
14683
14712
|
costUsd: external_exports.number().finite().min(0),
|
|
14684
14713
|
/** Requests without a price (or the cache data the price needs); not in `costUsd`. */
|
|
14685
|
-
unpricedRequests:
|
|
14714
|
+
unpricedRequests: count2,
|
|
14686
14715
|
/**
|
|
14687
14716
|
* Requests whose storage gave no token counts: counted as requests, with neither tokens nor
|
|
14688
14717
|
* cost, and not as unpriced.
|
|
14689
14718
|
*/
|
|
14690
|
-
unmeteredRequests:
|
|
14719
|
+
unmeteredRequests: count2
|
|
14691
14720
|
});
|
|
14692
14721
|
var totals = usageStatisticsTotalsSchema.shape;
|
|
14693
14722
|
var usageStatisticsSessionSchema = external_exports.strictObject({
|
|
@@ -14698,8 +14727,8 @@ var usageStatisticsSessionSchema = external_exports.strictObject({
|
|
|
14698
14727
|
title: external_exports.string().min(1).max(200).optional(),
|
|
14699
14728
|
/** Models the session used, most requests first. */
|
|
14700
14729
|
models: external_exports.array(model).max(16),
|
|
14701
|
-
firstAtMs:
|
|
14702
|
-
lastAtMs:
|
|
14730
|
+
firstAtMs: count2,
|
|
14731
|
+
lastAtMs: count2,
|
|
14703
14732
|
...totals
|
|
14704
14733
|
});
|
|
14705
14734
|
var usageStatisticsResultSchema = external_exports.strictObject({
|
|
@@ -14717,7 +14746,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
14717
14746
|
date: localDate.nullable()
|
|
14718
14747
|
}),
|
|
14719
14748
|
/** Reading of native storage: incomplete while the first read, or a refresh, is under way. */
|
|
14720
|
-
reading: external_exports.strictObject({ complete: external_exports.boolean(), sources:
|
|
14749
|
+
reading: external_exports.strictObject({ complete: external_exports.boolean(), sources: count2, read: count2 }),
|
|
14721
14750
|
/** Harnesses whose storage could not be read; their part is missing, the rest is complete. */
|
|
14722
14751
|
failures: external_exports.array(external_exports.strictObject({ harness, message: external_exports.string().max(2048) })).max(256),
|
|
14723
14752
|
/** Every value seen in the range, ignoring the filters, to choose filters from. */
|
|
@@ -14737,8 +14766,8 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
14737
14766
|
harness,
|
|
14738
14767
|
model: model.nullable(),
|
|
14739
14768
|
credits: external_exports.number().finite().min(0),
|
|
14740
|
-
reportedRequests:
|
|
14741
|
-
requests:
|
|
14769
|
+
reportedRequests: count2,
|
|
14770
|
+
requests: count2
|
|
14742
14771
|
})).max(4096).optional(),
|
|
14743
14772
|
/** All filters applied. */
|
|
14744
14773
|
totals: usageStatisticsTotalsSchema,
|
|
@@ -14755,7 +14784,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
14755
14784
|
model: model.nullable(),
|
|
14756
14785
|
...totals,
|
|
14757
14786
|
/** Requests priced by what the Harness recorded they cost, not by a price list. */
|
|
14758
|
-
harnessPricedRequests:
|
|
14787
|
+
harnessPricedRequests: count2
|
|
14759
14788
|
})).max(4096),
|
|
14760
14789
|
byProject: external_exports.array(external_exports.strictObject({ project: project.nullable(), ...totals })).max(4096),
|
|
14761
14790
|
/**
|
|
@@ -15369,7 +15398,9 @@ var harnessModelCatalogSchema = external_exports.object({
|
|
|
15369
15398
|
var harnessHistoryCapabilitiesSchema = external_exports.object({
|
|
15370
15399
|
fork: external_exports.boolean(),
|
|
15371
15400
|
forkAcrossCwd: external_exports.boolean(),
|
|
15372
|
-
rollbackLastTurn: external_exports.boolean()
|
|
15401
|
+
rollbackLastTurn: external_exports.boolean(),
|
|
15402
|
+
/** Remove the selected checkpoint's Turn and every later Turn, without restoring files. */
|
|
15403
|
+
rollbackToCheckpoint: external_exports.boolean().optional()
|
|
15373
15404
|
}).strict().refine((history) => history.fork || !history.forkAcrossCwd, {
|
|
15374
15405
|
path: ["forkAcrossCwd"],
|
|
15375
15406
|
message: "Cross-cwd Fork requires exact history Fork support"
|
|
@@ -15607,7 +15638,10 @@ var harnessPluginRouteSchema = external_exports.object({
|
|
|
15607
15638
|
harnessId: harnessPluginIdSchema,
|
|
15608
15639
|
model: harnessModelRefSchema.optional(),
|
|
15609
15640
|
thinkingOptionId: harnessThinkingOptionIdSchema.optional(),
|
|
15610
|
-
permissionModeId: harnessPermissionModeIdSchema.optional()
|
|
15641
|
+
permissionModeId: harnessPermissionModeIdSchema.optional(),
|
|
15642
|
+
/** A draft prewarm create: stays unsubmitted until the user's first Turn.
|
|
15643
|
+
* Desktop forwards only the Model of a main-process prewarm to thread/start. */
|
|
15644
|
+
prewarm: external_exports.literal(true).optional()
|
|
15611
15645
|
}).strict();
|
|
15612
15646
|
|
|
15613
15647
|
// ../../shared-contracts/dist/harness-launch-settings.js
|
|
@@ -16692,10 +16726,10 @@ async function* rolloutBytes(file2, signal) {
|
|
|
16692
16726
|
}
|
|
16693
16727
|
pending = next.value;
|
|
16694
16728
|
}
|
|
16695
|
-
const
|
|
16696
|
-
parts.push(pending.subarray(0,
|
|
16697
|
-
pending = pending.subarray(
|
|
16698
|
-
length +=
|
|
16729
|
+
const count3 = Math.min(size - length, pending.length);
|
|
16730
|
+
parts.push(pending.subarray(0, count3));
|
|
16731
|
+
pending = pending.subarray(count3);
|
|
16732
|
+
length += count3;
|
|
16699
16733
|
}
|
|
16700
16734
|
return Buffer.concat(parts, length);
|
|
16701
16735
|
}
|
|
@@ -16707,9 +16741,9 @@ async function* rolloutBytes(file2, signal) {
|
|
|
16707
16741
|
if ((magic & 4294967280) === 407710288) {
|
|
16708
16742
|
let size = (await readExact(4)).readUInt32LE(0);
|
|
16709
16743
|
while (size) {
|
|
16710
|
-
const
|
|
16711
|
-
await readExact(
|
|
16712
|
-
size -=
|
|
16744
|
+
const count3 = Math.min(size, 64 * 1024);
|
|
16745
|
+
await readExact(count3);
|
|
16746
|
+
size -= count3;
|
|
16713
16747
|
}
|
|
16714
16748
|
continue;
|
|
16715
16749
|
}
|