@karlorz/codexhost-cli-win32-x64 0.15.0-0 → 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 +60 -25
- 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 +1845 -214
- 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
|
@@ -2220,20 +2220,20 @@ var require_resolve = __commonJS({
|
|
|
2220
2220
|
return false;
|
|
2221
2221
|
}
|
|
2222
2222
|
function countKeys(schema) {
|
|
2223
|
-
let
|
|
2223
|
+
let count4 = 0;
|
|
2224
2224
|
for (const key in schema) {
|
|
2225
2225
|
if (key === "$ref")
|
|
2226
2226
|
return Infinity;
|
|
2227
|
-
|
|
2227
|
+
count4++;
|
|
2228
2228
|
if (SIMPLE_INLINED.has(key))
|
|
2229
2229
|
continue;
|
|
2230
2230
|
if (typeof schema[key] == "object") {
|
|
2231
|
-
(0, util_1.eachItem)(schema[key], (sch) =>
|
|
2231
|
+
(0, util_1.eachItem)(schema[key], (sch) => count4 += countKeys(sch));
|
|
2232
2232
|
}
|
|
2233
|
-
if (
|
|
2233
|
+
if (count4 === Infinity)
|
|
2234
2234
|
return Infinity;
|
|
2235
2235
|
}
|
|
2236
|
-
return
|
|
2236
|
+
return count4;
|
|
2237
2237
|
}
|
|
2238
2238
|
function getFullPath(resolver, id = "", normalize) {
|
|
2239
2239
|
if (normalize !== false)
|
|
@@ -5411,8 +5411,8 @@ var require_contains = __commonJS({
|
|
|
5411
5411
|
cxt.result(valid, () => cxt.reset());
|
|
5412
5412
|
function validateItemsWithCount() {
|
|
5413
5413
|
const schValid = gen.name("_valid");
|
|
5414
|
-
const
|
|
5415
|
-
validateItems(schValid, () => gen.if(schValid, () => checkLimits(
|
|
5414
|
+
const count4 = gen.let("count", 0);
|
|
5415
|
+
validateItems(schValid, () => gen.if(schValid, () => checkLimits(count4)));
|
|
5416
5416
|
}
|
|
5417
5417
|
function validateItems(_valid, block) {
|
|
5418
5418
|
gen.forRange("i", 0, len, (i) => {
|
|
@@ -5425,16 +5425,16 @@ var require_contains = __commonJS({
|
|
|
5425
5425
|
block();
|
|
5426
5426
|
});
|
|
5427
5427
|
}
|
|
5428
|
-
function checkLimits(
|
|
5429
|
-
gen.code((0, codegen_1._)`${
|
|
5428
|
+
function checkLimits(count4) {
|
|
5429
|
+
gen.code((0, codegen_1._)`${count4}++`);
|
|
5430
5430
|
if (max === void 0) {
|
|
5431
|
-
gen.if((0, codegen_1._)`${
|
|
5431
|
+
gen.if((0, codegen_1._)`${count4} >= ${min}`, () => gen.assign(valid, true).break());
|
|
5432
5432
|
} else {
|
|
5433
|
-
gen.if((0, codegen_1._)`${
|
|
5433
|
+
gen.if((0, codegen_1._)`${count4} > ${max}`, () => gen.assign(valid, false).break());
|
|
5434
5434
|
if (min === 1)
|
|
5435
5435
|
gen.assign(valid, true);
|
|
5436
5436
|
else
|
|
5437
|
-
gen.if((0, codegen_1._)`${
|
|
5437
|
+
gen.if((0, codegen_1._)`${count4} >= ${min}`, () => gen.assign(valid, true));
|
|
5438
5438
|
}
|
|
5439
5439
|
}
|
|
5440
5440
|
}
|
|
@@ -8933,20 +8933,20 @@ var require_resolve2 = __commonJS({
|
|
|
8933
8933
|
return false;
|
|
8934
8934
|
}
|
|
8935
8935
|
function countKeys(schema) {
|
|
8936
|
-
let
|
|
8936
|
+
let count4 = 0;
|
|
8937
8937
|
for (const key in schema) {
|
|
8938
8938
|
if (key === "$ref")
|
|
8939
8939
|
return Infinity;
|
|
8940
|
-
|
|
8940
|
+
count4++;
|
|
8941
8941
|
if (SIMPLE_INLINED.has(key))
|
|
8942
8942
|
continue;
|
|
8943
8943
|
if (typeof schema[key] == "object") {
|
|
8944
|
-
(0, util_1.eachItem)(schema[key], (sch) =>
|
|
8944
|
+
(0, util_1.eachItem)(schema[key], (sch) => count4 += countKeys(sch));
|
|
8945
8945
|
}
|
|
8946
|
-
if (
|
|
8946
|
+
if (count4 === Infinity)
|
|
8947
8947
|
return Infinity;
|
|
8948
8948
|
}
|
|
8949
|
-
return
|
|
8949
|
+
return count4;
|
|
8950
8950
|
}
|
|
8951
8951
|
function getFullPath(resolver, id = "", normalize) {
|
|
8952
8952
|
if (normalize !== false)
|
|
@@ -11309,8 +11309,8 @@ var require_contains2 = __commonJS({
|
|
|
11309
11309
|
cxt.result(valid, () => cxt.reset());
|
|
11310
11310
|
function validateItemsWithCount() {
|
|
11311
11311
|
const schValid = gen.name("_valid");
|
|
11312
|
-
const
|
|
11313
|
-
validateItems(schValid, () => gen.if(schValid, () => checkLimits(
|
|
11312
|
+
const count4 = gen.let("count", 0);
|
|
11313
|
+
validateItems(schValid, () => gen.if(schValid, () => checkLimits(count4)));
|
|
11314
11314
|
}
|
|
11315
11315
|
function validateItems(_valid, block) {
|
|
11316
11316
|
gen.forRange("i", 0, len, (i) => {
|
|
@@ -11323,16 +11323,16 @@ var require_contains2 = __commonJS({
|
|
|
11323
11323
|
block();
|
|
11324
11324
|
});
|
|
11325
11325
|
}
|
|
11326
|
-
function checkLimits(
|
|
11327
|
-
gen.code((0, codegen_1._)`${
|
|
11326
|
+
function checkLimits(count4) {
|
|
11327
|
+
gen.code((0, codegen_1._)`${count4}++`);
|
|
11328
11328
|
if (max === void 0) {
|
|
11329
|
-
gen.if((0, codegen_1._)`${
|
|
11329
|
+
gen.if((0, codegen_1._)`${count4} >= ${min}`, () => gen.assign(valid, true).break());
|
|
11330
11330
|
} else {
|
|
11331
|
-
gen.if((0, codegen_1._)`${
|
|
11331
|
+
gen.if((0, codegen_1._)`${count4} > ${max}`, () => gen.assign(valid, false).break());
|
|
11332
11332
|
if (min === 1)
|
|
11333
11333
|
gen.assign(valid, true);
|
|
11334
11334
|
else
|
|
11335
|
-
gen.if((0, codegen_1._)`${
|
|
11335
|
+
gen.if((0, codegen_1._)`${count4} >= ${min}`, () => gen.assign(valid, true));
|
|
11336
11336
|
}
|
|
11337
11337
|
}
|
|
11338
11338
|
}
|
|
@@ -17230,8 +17230,8 @@ function az_default() {
|
|
|
17230
17230
|
}
|
|
17231
17231
|
|
|
17232
17232
|
// ../../../node_modules/zod/v4/locales/be.js
|
|
17233
|
-
function getBelarusianPlural(
|
|
17234
|
-
const absCount = Math.abs(
|
|
17233
|
+
function getBelarusianPlural(count4, one, few, many) {
|
|
17234
|
+
const absCount = Math.abs(count4);
|
|
17235
17235
|
const lastDigit = absCount % 10;
|
|
17236
17236
|
const lastTwoDigits = absCount % 100;
|
|
17237
17237
|
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
@@ -19309,8 +19309,8 @@ function hu_default() {
|
|
|
19309
19309
|
}
|
|
19310
19310
|
|
|
19311
19311
|
// ../../../node_modules/zod/v4/locales/hy.js
|
|
19312
|
-
function getArmenianPlural(
|
|
19313
|
-
return Math.abs(
|
|
19312
|
+
function getArmenianPlural(count4, one, many) {
|
|
19313
|
+
return Math.abs(count4) === 1 ? one : many;
|
|
19314
19314
|
}
|
|
19315
19315
|
function withDefiniteArticle(word) {
|
|
19316
19316
|
if (!word)
|
|
@@ -21438,8 +21438,8 @@ function ro_default() {
|
|
|
21438
21438
|
}
|
|
21439
21439
|
|
|
21440
21440
|
// ../../../node_modules/zod/v4/locales/ru.js
|
|
21441
|
-
function getRussianPlural(
|
|
21442
|
-
const absCount = Math.abs(
|
|
21441
|
+
function getRussianPlural(count4, one, few, many) {
|
|
21442
|
+
const absCount = Math.abs(count4);
|
|
21443
21443
|
const lastDigit = absCount % 10;
|
|
21444
21444
|
const lastTwoDigits = absCount % 100;
|
|
21445
21445
|
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
@@ -27108,6 +27108,33 @@ function date4(params) {
|
|
|
27108
27108
|
// ../../../node_modules/zod/v4/classic/external.js
|
|
27109
27109
|
config(en_default());
|
|
27110
27110
|
|
|
27111
|
+
// ../../shared-contracts/dist/goals.js
|
|
27112
|
+
var harnessGoalStatusSchema = external_exports.enum([
|
|
27113
|
+
"active",
|
|
27114
|
+
"paused",
|
|
27115
|
+
"blocked",
|
|
27116
|
+
"usageLimited",
|
|
27117
|
+
"budgetLimited",
|
|
27118
|
+
"complete"
|
|
27119
|
+
]);
|
|
27120
|
+
var count = external_exports.number().int().nonnegative().safe();
|
|
27121
|
+
var harnessGoalSchema = external_exports.object({
|
|
27122
|
+
objective: external_exports.string().min(1),
|
|
27123
|
+
status: harnessGoalStatusSchema,
|
|
27124
|
+
tokenBudget: count.positive().nullable(),
|
|
27125
|
+
tokensUsed: count,
|
|
27126
|
+
timeUsedSeconds: count,
|
|
27127
|
+
createdAt: count,
|
|
27128
|
+
updatedAt: count
|
|
27129
|
+
});
|
|
27130
|
+
var goalOriginSchema = external_exports.enum(["user", "automatic"]).nullable();
|
|
27131
|
+
var harnessGoalSetSchema = external_exports.object({
|
|
27132
|
+
objective: external_exports.string().min(1).optional(),
|
|
27133
|
+
status: external_exports.enum(["active", "paused"]).optional(),
|
|
27134
|
+
tokenBudget: count.positive().nullable().optional(),
|
|
27135
|
+
origin: goalOriginSchema
|
|
27136
|
+
});
|
|
27137
|
+
|
|
27111
27138
|
// ../../shared-contracts/dist/delegation-read.js
|
|
27112
27139
|
var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
27113
27140
|
var delegationReadParamsSchema = external_exports.strictObject({
|
|
@@ -27238,7 +27265,7 @@ var modelPriceDefaultResultSchema = external_exports.strictObject({
|
|
|
27238
27265
|
|
|
27239
27266
|
// ../../shared-contracts/dist/usage-statistics.js
|
|
27240
27267
|
var USAGE_STATISTICS_RANGES = ["today", "7d", "30d", "90d", "all"];
|
|
27241
|
-
var
|
|
27268
|
+
var count2 = external_exports.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
|
|
27242
27269
|
var localDate = external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/u);
|
|
27243
27270
|
var harness = external_exports.string().min(1).max(128);
|
|
27244
27271
|
var model = external_exports.string().min(1).max(512);
|
|
@@ -27261,22 +27288,24 @@ var usageStatisticsParamsSchema = external_exports.strictObject({
|
|
|
27261
27288
|
date: localDate.optional()
|
|
27262
27289
|
});
|
|
27263
27290
|
var usageStatisticsTotalsSchema = external_exports.strictObject({
|
|
27264
|
-
requests:
|
|
27265
|
-
inputTokens:
|
|
27266
|
-
cachedInputTokens:
|
|
27267
|
-
cacheWriteInputTokens:
|
|
27268
|
-
cacheKnownInputTokens:
|
|
27269
|
-
|
|
27270
|
-
|
|
27291
|
+
requests: count2,
|
|
27292
|
+
inputTokens: count2,
|
|
27293
|
+
cachedInputTokens: count2,
|
|
27294
|
+
cacheWriteInputTokens: count2,
|
|
27295
|
+
cacheKnownInputTokens: count2,
|
|
27296
|
+
cacheHitCachedInputTokens: count2,
|
|
27297
|
+
cacheHitInputTokens: count2,
|
|
27298
|
+
outputTokens: count2,
|
|
27299
|
+
reasoningOutputTokens: count2,
|
|
27271
27300
|
/** USD at the public price, summed over the priced requests only. */
|
|
27272
27301
|
costUsd: external_exports.number().finite().min(0),
|
|
27273
27302
|
/** Requests without a price (or the cache data the price needs); not in `costUsd`. */
|
|
27274
|
-
unpricedRequests:
|
|
27303
|
+
unpricedRequests: count2,
|
|
27275
27304
|
/**
|
|
27276
27305
|
* Requests whose storage gave no token counts: counted as requests, with neither tokens nor
|
|
27277
27306
|
* cost, and not as unpriced.
|
|
27278
27307
|
*/
|
|
27279
|
-
unmeteredRequests:
|
|
27308
|
+
unmeteredRequests: count2
|
|
27280
27309
|
});
|
|
27281
27310
|
var totals = usageStatisticsTotalsSchema.shape;
|
|
27282
27311
|
var usageStatisticsSessionSchema = external_exports.strictObject({
|
|
@@ -27287,8 +27316,8 @@ var usageStatisticsSessionSchema = external_exports.strictObject({
|
|
|
27287
27316
|
title: external_exports.string().min(1).max(200).optional(),
|
|
27288
27317
|
/** Models the session used, most requests first. */
|
|
27289
27318
|
models: external_exports.array(model).max(16),
|
|
27290
|
-
firstAtMs:
|
|
27291
|
-
lastAtMs:
|
|
27319
|
+
firstAtMs: count2,
|
|
27320
|
+
lastAtMs: count2,
|
|
27292
27321
|
...totals
|
|
27293
27322
|
});
|
|
27294
27323
|
var usageStatisticsResultSchema = external_exports.strictObject({
|
|
@@ -27306,7 +27335,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
27306
27335
|
date: localDate.nullable()
|
|
27307
27336
|
}),
|
|
27308
27337
|
/** Reading of native storage: incomplete while the first read, or a refresh, is under way. */
|
|
27309
|
-
reading: external_exports.strictObject({ complete: external_exports.boolean(), sources:
|
|
27338
|
+
reading: external_exports.strictObject({ complete: external_exports.boolean(), sources: count2, read: count2 }),
|
|
27310
27339
|
/** Harnesses whose storage could not be read; their part is missing, the rest is complete. */
|
|
27311
27340
|
failures: external_exports.array(external_exports.strictObject({ harness, message: external_exports.string().max(2048) })).max(256),
|
|
27312
27341
|
/** Every value seen in the range, ignoring the filters, to choose filters from. */
|
|
@@ -27326,8 +27355,8 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
27326
27355
|
harness,
|
|
27327
27356
|
model: model.nullable(),
|
|
27328
27357
|
credits: external_exports.number().finite().min(0),
|
|
27329
|
-
reportedRequests:
|
|
27330
|
-
requests:
|
|
27358
|
+
reportedRequests: count2,
|
|
27359
|
+
requests: count2
|
|
27331
27360
|
})).max(4096).optional(),
|
|
27332
27361
|
/** All filters applied. */
|
|
27333
27362
|
totals: usageStatisticsTotalsSchema,
|
|
@@ -27344,7 +27373,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
27344
27373
|
model: model.nullable(),
|
|
27345
27374
|
...totals,
|
|
27346
27375
|
/** Requests priced by what the Harness recorded they cost, not by a price list. */
|
|
27347
|
-
harnessPricedRequests:
|
|
27376
|
+
harnessPricedRequests: count2
|
|
27348
27377
|
})).max(4096),
|
|
27349
27378
|
byProject: external_exports.array(external_exports.strictObject({ project: project.nullable(), ...totals })).max(4096),
|
|
27350
27379
|
/**
|
|
@@ -27958,7 +27987,9 @@ var harnessModelCatalogSchema = external_exports.object({
|
|
|
27958
27987
|
var harnessHistoryCapabilitiesSchema = external_exports.object({
|
|
27959
27988
|
fork: external_exports.boolean(),
|
|
27960
27989
|
forkAcrossCwd: external_exports.boolean(),
|
|
27961
|
-
rollbackLastTurn: external_exports.boolean()
|
|
27990
|
+
rollbackLastTurn: external_exports.boolean(),
|
|
27991
|
+
/** Remove the selected checkpoint's Turn and every later Turn, without restoring files. */
|
|
27992
|
+
rollbackToCheckpoint: external_exports.boolean().optional()
|
|
27962
27993
|
}).strict().refine((history) => history.fork || !history.forkAcrossCwd, {
|
|
27963
27994
|
path: ["forkAcrossCwd"],
|
|
27964
27995
|
message: "Cross-cwd Fork requires exact history Fork support"
|
|
@@ -28196,7 +28227,10 @@ var harnessPluginRouteSchema = external_exports.object({
|
|
|
28196
28227
|
harnessId: harnessPluginIdSchema,
|
|
28197
28228
|
model: harnessModelRefSchema.optional(),
|
|
28198
28229
|
thinkingOptionId: harnessThinkingOptionIdSchema.optional(),
|
|
28199
|
-
permissionModeId: harnessPermissionModeIdSchema.optional()
|
|
28230
|
+
permissionModeId: harnessPermissionModeIdSchema.optional(),
|
|
28231
|
+
/** A draft prewarm create: stays unsubmitted until the user's first Turn.
|
|
28232
|
+
* Desktop forwards only the Model of a main-process prewarm to thread/start. */
|
|
28233
|
+
prewarm: external_exports.literal(true).optional()
|
|
28200
28234
|
}).strict();
|
|
28201
28235
|
|
|
28202
28236
|
// ../../shared-contracts/dist/harness-launch-settings.js
|
|
@@ -53400,7 +53434,7 @@ function qoderUserText(message) {
|
|
|
53400
53434
|
return void 0;
|
|
53401
53435
|
return content.filter((block) => isRecord2(block) && block.type === "text" && typeof block.text === "string").map((block) => String(block.text)).join(" ");
|
|
53402
53436
|
}
|
|
53403
|
-
function
|
|
53437
|
+
function count3(value) {
|
|
53404
53438
|
return typeof value === "number" && Number.isSafeInteger(value) && value >= 0;
|
|
53405
53439
|
}
|
|
53406
53440
|
async function readQoderUsage(file2, signal) {
|
|
@@ -53437,7 +53471,7 @@ async function readQoderUsage(file2, signal) {
|
|
|
53437
53471
|
const output = usage.output_tokens;
|
|
53438
53472
|
const cached2 = usage.cache_read_input_tokens;
|
|
53439
53473
|
const written = usage.cache_creation_input_tokens;
|
|
53440
|
-
if (!
|
|
53474
|
+
if (!count3(input) || !count3(output) || !count3(cached2) || !count3(written))
|
|
53441
53475
|
continue;
|
|
53442
53476
|
const split = isRecord2(usage.cache_creation) ? usage.cache_creation : null;
|
|
53443
53477
|
const oneHour = split?.ephemeral_1h_input_tokens;
|
|
@@ -53451,10 +53485,10 @@ async function readQoderUsage(file2, signal) {
|
|
|
53451
53485
|
inputTokens: input + cached2 + written,
|
|
53452
53486
|
cachedInputTokens: cached2,
|
|
53453
53487
|
cacheWriteInputTokens: written,
|
|
53454
|
-
...
|
|
53488
|
+
...count3(oneHour) ? { cacheWrite1hInputTokens: oneHour } : {},
|
|
53455
53489
|
outputTokens: output,
|
|
53456
53490
|
...typeof usage.credits === "number" && Number.isFinite(usage.credits) && usage.credits >= 0 ? { credits: usage.credits } : {},
|
|
53457
|
-
...
|
|
53491
|
+
...count3(thinking) ? { reasoningOutputTokens: thinking } : {},
|
|
53458
53492
|
...unreported ? { tokensUnknown: true } : {}
|
|
53459
53493
|
});
|
|
53460
53494
|
if (entry)
|
|
@@ -53655,6 +53689,16 @@ var QoderAdapter = class {
|
|
|
53655
53689
|
return task;
|
|
53656
53690
|
}
|
|
53657
53691
|
async open(input) {
|
|
53692
|
+
if (input.kind === "rollbackToCheckpoint") {
|
|
53693
|
+
return {
|
|
53694
|
+
ok: false,
|
|
53695
|
+
error: {
|
|
53696
|
+
code: "unsupported",
|
|
53697
|
+
message: "Checkpoint rollback is not supported by this Adapter",
|
|
53698
|
+
retryable: false
|
|
53699
|
+
}
|
|
53700
|
+
};
|
|
53701
|
+
}
|
|
53658
53702
|
if ("model" in input && input.model && !decodeQoderModelRef(input.model)) {
|
|
53659
53703
|
return {
|
|
53660
53704
|
ok: false,
|
|
@@ -4647,8 +4647,8 @@ function az_default() {
|
|
|
4647
4647
|
}
|
|
4648
4648
|
|
|
4649
4649
|
// ../../../node_modules/zod/v4/locales/be.js
|
|
4650
|
-
function getBelarusianPlural(
|
|
4651
|
-
const absCount = Math.abs(
|
|
4650
|
+
function getBelarusianPlural(count3, one, few, many) {
|
|
4651
|
+
const absCount = Math.abs(count3);
|
|
4652
4652
|
const lastDigit = absCount % 10;
|
|
4653
4653
|
const lastTwoDigits = absCount % 100;
|
|
4654
4654
|
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
@@ -6726,8 +6726,8 @@ function hu_default() {
|
|
|
6726
6726
|
}
|
|
6727
6727
|
|
|
6728
6728
|
// ../../../node_modules/zod/v4/locales/hy.js
|
|
6729
|
-
function getArmenianPlural(
|
|
6730
|
-
return Math.abs(
|
|
6729
|
+
function getArmenianPlural(count3, one, many) {
|
|
6730
|
+
return Math.abs(count3) === 1 ? one : many;
|
|
6731
6731
|
}
|
|
6732
6732
|
function withDefiniteArticle(word) {
|
|
6733
6733
|
if (!word)
|
|
@@ -8855,8 +8855,8 @@ function ro_default() {
|
|
|
8855
8855
|
}
|
|
8856
8856
|
|
|
8857
8857
|
// ../../../node_modules/zod/v4/locales/ru.js
|
|
8858
|
-
function getRussianPlural(
|
|
8859
|
-
const absCount = Math.abs(
|
|
8858
|
+
function getRussianPlural(count3, one, few, many) {
|
|
8859
|
+
const absCount = Math.abs(count3);
|
|
8860
8860
|
const lastDigit = absCount % 10;
|
|
8861
8861
|
const lastTwoDigits = absCount % 100;
|
|
8862
8862
|
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
@@ -14525,6 +14525,33 @@ function date4(params) {
|
|
|
14525
14525
|
// ../../../node_modules/zod/v4/classic/external.js
|
|
14526
14526
|
config(en_default());
|
|
14527
14527
|
|
|
14528
|
+
// ../../shared-contracts/dist/goals.js
|
|
14529
|
+
var harnessGoalStatusSchema = external_exports.enum([
|
|
14530
|
+
"active",
|
|
14531
|
+
"paused",
|
|
14532
|
+
"blocked",
|
|
14533
|
+
"usageLimited",
|
|
14534
|
+
"budgetLimited",
|
|
14535
|
+
"complete"
|
|
14536
|
+
]);
|
|
14537
|
+
var count = external_exports.number().int().nonnegative().safe();
|
|
14538
|
+
var harnessGoalSchema = external_exports.object({
|
|
14539
|
+
objective: external_exports.string().min(1),
|
|
14540
|
+
status: harnessGoalStatusSchema,
|
|
14541
|
+
tokenBudget: count.positive().nullable(),
|
|
14542
|
+
tokensUsed: count,
|
|
14543
|
+
timeUsedSeconds: count,
|
|
14544
|
+
createdAt: count,
|
|
14545
|
+
updatedAt: count
|
|
14546
|
+
});
|
|
14547
|
+
var goalOriginSchema = external_exports.enum(["user", "automatic"]).nullable();
|
|
14548
|
+
var harnessGoalSetSchema = external_exports.object({
|
|
14549
|
+
objective: external_exports.string().min(1).optional(),
|
|
14550
|
+
status: external_exports.enum(["active", "paused"]).optional(),
|
|
14551
|
+
tokenBudget: count.positive().nullable().optional(),
|
|
14552
|
+
origin: goalOriginSchema
|
|
14553
|
+
});
|
|
14554
|
+
|
|
14528
14555
|
// ../../shared-contracts/dist/delegation-read.js
|
|
14529
14556
|
var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
14530
14557
|
var delegationReadParamsSchema = external_exports.strictObject({
|
|
@@ -14655,7 +14682,7 @@ var modelPriceDefaultResultSchema = external_exports.strictObject({
|
|
|
14655
14682
|
|
|
14656
14683
|
// ../../shared-contracts/dist/usage-statistics.js
|
|
14657
14684
|
var USAGE_STATISTICS_RANGES = ["today", "7d", "30d", "90d", "all"];
|
|
14658
|
-
var
|
|
14685
|
+
var count2 = external_exports.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
|
|
14659
14686
|
var localDate = external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/u);
|
|
14660
14687
|
var harness = external_exports.string().min(1).max(128);
|
|
14661
14688
|
var model = external_exports.string().min(1).max(512);
|
|
@@ -14678,22 +14705,24 @@ var usageStatisticsParamsSchema = external_exports.strictObject({
|
|
|
14678
14705
|
date: localDate.optional()
|
|
14679
14706
|
});
|
|
14680
14707
|
var usageStatisticsTotalsSchema = external_exports.strictObject({
|
|
14681
|
-
requests:
|
|
14682
|
-
inputTokens:
|
|
14683
|
-
cachedInputTokens:
|
|
14684
|
-
cacheWriteInputTokens:
|
|
14685
|
-
cacheKnownInputTokens:
|
|
14686
|
-
|
|
14687
|
-
|
|
14708
|
+
requests: count2,
|
|
14709
|
+
inputTokens: count2,
|
|
14710
|
+
cachedInputTokens: count2,
|
|
14711
|
+
cacheWriteInputTokens: count2,
|
|
14712
|
+
cacheKnownInputTokens: count2,
|
|
14713
|
+
cacheHitCachedInputTokens: count2,
|
|
14714
|
+
cacheHitInputTokens: count2,
|
|
14715
|
+
outputTokens: count2,
|
|
14716
|
+
reasoningOutputTokens: count2,
|
|
14688
14717
|
/** USD at the public price, summed over the priced requests only. */
|
|
14689
14718
|
costUsd: external_exports.number().finite().min(0),
|
|
14690
14719
|
/** Requests without a price (or the cache data the price needs); not in `costUsd`. */
|
|
14691
|
-
unpricedRequests:
|
|
14720
|
+
unpricedRequests: count2,
|
|
14692
14721
|
/**
|
|
14693
14722
|
* Requests whose storage gave no token counts: counted as requests, with neither tokens nor
|
|
14694
14723
|
* cost, and not as unpriced.
|
|
14695
14724
|
*/
|
|
14696
|
-
unmeteredRequests:
|
|
14725
|
+
unmeteredRequests: count2
|
|
14697
14726
|
});
|
|
14698
14727
|
var totals = usageStatisticsTotalsSchema.shape;
|
|
14699
14728
|
var usageStatisticsSessionSchema = external_exports.strictObject({
|
|
@@ -14704,8 +14733,8 @@ var usageStatisticsSessionSchema = external_exports.strictObject({
|
|
|
14704
14733
|
title: external_exports.string().min(1).max(200).optional(),
|
|
14705
14734
|
/** Models the session used, most requests first. */
|
|
14706
14735
|
models: external_exports.array(model).max(16),
|
|
14707
|
-
firstAtMs:
|
|
14708
|
-
lastAtMs:
|
|
14736
|
+
firstAtMs: count2,
|
|
14737
|
+
lastAtMs: count2,
|
|
14709
14738
|
...totals
|
|
14710
14739
|
});
|
|
14711
14740
|
var usageStatisticsResultSchema = external_exports.strictObject({
|
|
@@ -14723,7 +14752,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
14723
14752
|
date: localDate.nullable()
|
|
14724
14753
|
}),
|
|
14725
14754
|
/** Reading of native storage: incomplete while the first read, or a refresh, is under way. */
|
|
14726
|
-
reading: external_exports.strictObject({ complete: external_exports.boolean(), sources:
|
|
14755
|
+
reading: external_exports.strictObject({ complete: external_exports.boolean(), sources: count2, read: count2 }),
|
|
14727
14756
|
/** Harnesses whose storage could not be read; their part is missing, the rest is complete. */
|
|
14728
14757
|
failures: external_exports.array(external_exports.strictObject({ harness, message: external_exports.string().max(2048) })).max(256),
|
|
14729
14758
|
/** Every value seen in the range, ignoring the filters, to choose filters from. */
|
|
@@ -14743,8 +14772,8 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
14743
14772
|
harness,
|
|
14744
14773
|
model: model.nullable(),
|
|
14745
14774
|
credits: external_exports.number().finite().min(0),
|
|
14746
|
-
reportedRequests:
|
|
14747
|
-
requests:
|
|
14775
|
+
reportedRequests: count2,
|
|
14776
|
+
requests: count2
|
|
14748
14777
|
})).max(4096).optional(),
|
|
14749
14778
|
/** All filters applied. */
|
|
14750
14779
|
totals: usageStatisticsTotalsSchema,
|
|
@@ -14761,7 +14790,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
14761
14790
|
model: model.nullable(),
|
|
14762
14791
|
...totals,
|
|
14763
14792
|
/** Requests priced by what the Harness recorded they cost, not by a price list. */
|
|
14764
|
-
harnessPricedRequests:
|
|
14793
|
+
harnessPricedRequests: count2
|
|
14765
14794
|
})).max(4096),
|
|
14766
14795
|
byProject: external_exports.array(external_exports.strictObject({ project: project.nullable(), ...totals })).max(4096),
|
|
14767
14796
|
/**
|
|
@@ -15375,7 +15404,9 @@ var harnessModelCatalogSchema = external_exports.object({
|
|
|
15375
15404
|
var harnessHistoryCapabilitiesSchema = external_exports.object({
|
|
15376
15405
|
fork: external_exports.boolean(),
|
|
15377
15406
|
forkAcrossCwd: external_exports.boolean(),
|
|
15378
|
-
rollbackLastTurn: external_exports.boolean()
|
|
15407
|
+
rollbackLastTurn: external_exports.boolean(),
|
|
15408
|
+
/** Remove the selected checkpoint's Turn and every later Turn, without restoring files. */
|
|
15409
|
+
rollbackToCheckpoint: external_exports.boolean().optional()
|
|
15379
15410
|
}).strict().refine((history) => history.fork || !history.forkAcrossCwd, {
|
|
15380
15411
|
path: ["forkAcrossCwd"],
|
|
15381
15412
|
message: "Cross-cwd Fork requires exact history Fork support"
|
|
@@ -15613,7 +15644,10 @@ var harnessPluginRouteSchema = external_exports.object({
|
|
|
15613
15644
|
harnessId: harnessPluginIdSchema,
|
|
15614
15645
|
model: harnessModelRefSchema.optional(),
|
|
15615
15646
|
thinkingOptionId: harnessThinkingOptionIdSchema.optional(),
|
|
15616
|
-
permissionModeId: harnessPermissionModeIdSchema.optional()
|
|
15647
|
+
permissionModeId: harnessPermissionModeIdSchema.optional(),
|
|
15648
|
+
/** A draft prewarm create: stays unsubmitted until the user's first Turn.
|
|
15649
|
+
* Desktop forwards only the Model of a main-process prewarm to thread/start. */
|
|
15650
|
+
prewarm: external_exports.literal(true).optional()
|
|
15617
15651
|
}).strict();
|
|
15618
15652
|
|
|
15619
15653
|
// ../../shared-contracts/dist/harness-launch-settings.js
|
|
@@ -19051,7 +19085,17 @@ function pendingNativeHistoryRewind(contents) {
|
|
|
19051
19085
|
const last = parseRows(contents).findLast((row) => row.type === "resend-fork-notice" || NATIVE_MESSAGE_TYPES.has(text(row.type)));
|
|
19052
19086
|
return last?.type === "resend-fork-notice" ? { forkPointId: text(last.parentId) || null } : void 0;
|
|
19053
19087
|
}
|
|
19088
|
+
function isNativeCompactionSummary(row) {
|
|
19089
|
+
const data = record2(row.providerData);
|
|
19090
|
+
return row.type === "message" && row.role === "user" && data.isCompactInternal === true;
|
|
19091
|
+
}
|
|
19054
19092
|
function nativeHistoryRows(contents) {
|
|
19093
|
+
return collectNativeHistoryRows(contents, false);
|
|
19094
|
+
}
|
|
19095
|
+
function nativeDisplayHistoryRows(contents) {
|
|
19096
|
+
return collectNativeHistoryRows(contents, true);
|
|
19097
|
+
}
|
|
19098
|
+
function collectNativeHistoryRows(contents, followCompactionParent) {
|
|
19055
19099
|
const entries = /* @__PURE__ */ new Map();
|
|
19056
19100
|
let leaf = "";
|
|
19057
19101
|
for (const row of parseRows(contents)) {
|
|
@@ -19076,10 +19120,16 @@ function nativeHistoryRows(contents) {
|
|
|
19076
19120
|
throw new CodeBuddyError("protocolError", "Native history parent is missing");
|
|
19077
19121
|
chain.push(row);
|
|
19078
19122
|
leaf = text(row.parentId);
|
|
19123
|
+
if (!leaf && followCompactionParent && isNativeCompactionSummary(row)) {
|
|
19124
|
+
const logicalParent = text(row.logicalParentId);
|
|
19125
|
+
if (logicalParent && !entries.has(logicalParent))
|
|
19126
|
+
throw new CodeBuddyError("protocolError", "Native compaction parent is missing");
|
|
19127
|
+
leaf = logicalParent;
|
|
19128
|
+
}
|
|
19079
19129
|
}
|
|
19080
19130
|
return chain.reverse();
|
|
19081
19131
|
}
|
|
19082
|
-
function snapshotFromHistory(contents, ref, cwd, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
19132
|
+
function snapshotFromHistory(contents, ref, cwd, profile = CODEBUDDY_RUNTIME_PROFILE, options = {}) {
|
|
19083
19133
|
const supportsNativeCommands = nativeCommandsEnabled(profile);
|
|
19084
19134
|
const supportsFork = capabilitiesForProfile(profile).history.fork;
|
|
19085
19135
|
const turns = [];
|
|
@@ -19105,7 +19155,8 @@ function snapshotFromHistory(contents, ref, cwd, profile = CODEBUDDY_RUNTIME_PRO
|
|
|
19105
19155
|
snapshot.item.outputTruncated = Boolean(output.truncated);
|
|
19106
19156
|
}
|
|
19107
19157
|
};
|
|
19108
|
-
const
|
|
19158
|
+
const includeCompactionHistory = options.includeCompactionHistory !== false;
|
|
19159
|
+
const history = includeCompactionHistory ? nativeDisplayHistoryRows(contents) : nativeHistoryRows(contents);
|
|
19109
19160
|
const manualCompactions = /* @__PURE__ */ new Set();
|
|
19110
19161
|
let compactUser;
|
|
19111
19162
|
if (supportsNativeCommands)
|
|
@@ -19139,6 +19190,22 @@ function snapshotFromHistory(contents, ref, cwd, profile = CODEBUDDY_RUNTIME_PRO
|
|
|
19139
19190
|
continue;
|
|
19140
19191
|
if (supportsNativeCommands && row.type === "message" && row.role === "user" && data.agent === "compact" && !manualCompactions.has(text(row.id)))
|
|
19141
19192
|
continue;
|
|
19193
|
+
if (includeCompactionHistory && isNativeCompactionSummary(row)) {
|
|
19194
|
+
if (supportsNativeCommands && current) {
|
|
19195
|
+
const outcome = data.isCompacted === true ? { status: "succeeded" } : {
|
|
19196
|
+
status: "failed",
|
|
19197
|
+
error: nativeError(new CodeBuddyError("nativeFailure", "Native compaction did not complete"), profile)
|
|
19198
|
+
};
|
|
19199
|
+
current.items.push({
|
|
19200
|
+
item: {
|
|
19201
|
+
type: "contextCompaction",
|
|
19202
|
+
itemId: hostItemIdSchema.parse(`compact-${text(row.id)}`)
|
|
19203
|
+
},
|
|
19204
|
+
outcome
|
|
19205
|
+
});
|
|
19206
|
+
}
|
|
19207
|
+
continue;
|
|
19208
|
+
}
|
|
19142
19209
|
if (row.type === "message" && row.role === "user") {
|
|
19143
19210
|
current = {
|
|
19144
19211
|
nativeTurnRef: nativeTurnRefSchema.parse({
|
|
@@ -21678,9 +21745,9 @@ var Connection = class {
|
|
|
21678
21745
|
return;
|
|
21679
21746
|
}
|
|
21680
21747
|
const responseBatch = isResponseBatch(batch);
|
|
21681
|
-
const responseCount = responseBatch ? 0 : batch.reduce((
|
|
21748
|
+
const responseCount = responseBatch ? 0 : batch.reduce((count3, message) => count3 + (isNotificationMessage(message) ? 0 : 1), 0);
|
|
21682
21749
|
let remaining = responseCount;
|
|
21683
|
-
let remainingNotifications = batch.reduce((
|
|
21750
|
+
let remainingNotifications = batch.reduce((count3, message) => count3 + (isNotificationMessage(message) ? 1 : 0), 0);
|
|
21684
21751
|
let responseSent = false;
|
|
21685
21752
|
const responses = [];
|
|
21686
21753
|
const sendResponsesIfReady = async () => {
|
|
@@ -24486,7 +24553,9 @@ function commandCaveat(row) {
|
|
|
24486
24553
|
}
|
|
24487
24554
|
function retainedRowCount(input, contents, sourceCwd = input.cwd, profile = CODEBUDDY_RUNTIME_PROFILE) {
|
|
24488
24555
|
const rows2 = nativeHistoryRows(contents);
|
|
24489
|
-
const turns = snapshotFromHistory(contents, input.sourceRef, sourceCwd, profile
|
|
24556
|
+
const turns = snapshotFromHistory(contents, input.sourceRef, sourceCwd, profile, {
|
|
24557
|
+
includeCompactionHistory: false
|
|
24558
|
+
}).turns;
|
|
24490
24559
|
let excluded2;
|
|
24491
24560
|
if (input.kind === "rollbackLastTurn") {
|
|
24492
24561
|
if (!turns.length)
|
|
@@ -24499,13 +24568,13 @@ function retainedRowCount(input, contents, sourceCwd = input.cwd, profile = CODE
|
|
|
24499
24568
|
throw new CodeBuddyError("checkpointNotFound", "Native Fork checkpoint was not found");
|
|
24500
24569
|
excluded2 = turns[index + 1]?.nativeTurnRef.nativeTurnKey;
|
|
24501
24570
|
}
|
|
24502
|
-
let
|
|
24503
|
-
if (
|
|
24571
|
+
let count3 = excluded2 ? rows2.findIndex((row) => row.id === excluded2) : rows2.length;
|
|
24572
|
+
if (count3 < 0)
|
|
24504
24573
|
throw new CodeBuddyError("protocolError", "Native Turn boundary is missing");
|
|
24505
24574
|
if (excluded2)
|
|
24506
|
-
while (
|
|
24507
|
-
|
|
24508
|
-
return
|
|
24575
|
+
while (count3 > 0 && commandCaveat(rows2[count3 - 1]))
|
|
24576
|
+
count3--;
|
|
24577
|
+
return count3;
|
|
24509
24578
|
}
|
|
24510
24579
|
function sameResolvedPath(left, right) {
|
|
24511
24580
|
const a = codeBuddyCanonicalCwd(left), b = codeBuddyCanonicalCwd(right);
|
|
@@ -26359,6 +26428,16 @@ var CodeBuddyAdapter = class {
|
|
|
26359
26428
|
}
|
|
26360
26429
|
}
|
|
26361
26430
|
async open(input) {
|
|
26431
|
+
if (input.kind === "rollbackToCheckpoint") {
|
|
26432
|
+
return {
|
|
26433
|
+
ok: false,
|
|
26434
|
+
error: {
|
|
26435
|
+
code: "unsupported",
|
|
26436
|
+
message: "Checkpoint rollback is not supported by this Adapter",
|
|
26437
|
+
retryable: false
|
|
26438
|
+
}
|
|
26439
|
+
};
|
|
26440
|
+
}
|
|
26362
26441
|
if (this.#closed)
|
|
26363
26442
|
return failure("invalidState", "Adapter is closed", this.#profile);
|
|
26364
26443
|
if (input.kind === "create" && input.executionPolicy === "unattended-full-access" && input.permissionModeId && input.permissionModeId !== "fullAccess")
|