@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
|
@@ -5187,8 +5187,8 @@ function az_default() {
|
|
|
5187
5187
|
}
|
|
5188
5188
|
|
|
5189
5189
|
// ../../../node_modules/zod/v4/locales/be.js
|
|
5190
|
-
function getBelarusianPlural(
|
|
5191
|
-
const absCount = Math.abs(
|
|
5190
|
+
function getBelarusianPlural(count3, one, few, many) {
|
|
5191
|
+
const absCount = Math.abs(count3);
|
|
5192
5192
|
const lastDigit = absCount % 10;
|
|
5193
5193
|
const lastTwoDigits = absCount % 100;
|
|
5194
5194
|
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
@@ -7266,8 +7266,8 @@ function hu_default() {
|
|
|
7266
7266
|
}
|
|
7267
7267
|
|
|
7268
7268
|
// ../../../node_modules/zod/v4/locales/hy.js
|
|
7269
|
-
function getArmenianPlural(
|
|
7270
|
-
return Math.abs(
|
|
7269
|
+
function getArmenianPlural(count3, one, many) {
|
|
7270
|
+
return Math.abs(count3) === 1 ? one : many;
|
|
7271
7271
|
}
|
|
7272
7272
|
function withDefiniteArticle(word) {
|
|
7273
7273
|
if (!word)
|
|
@@ -9395,8 +9395,8 @@ function ro_default() {
|
|
|
9395
9395
|
}
|
|
9396
9396
|
|
|
9397
9397
|
// ../../../node_modules/zod/v4/locales/ru.js
|
|
9398
|
-
function getRussianPlural(
|
|
9399
|
-
const absCount = Math.abs(
|
|
9398
|
+
function getRussianPlural(count3, one, few, many) {
|
|
9399
|
+
const absCount = Math.abs(count3);
|
|
9400
9400
|
const lastDigit = absCount % 10;
|
|
9401
9401
|
const lastTwoDigits = absCount % 100;
|
|
9402
9402
|
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
@@ -15065,6 +15065,33 @@ function date4(params) {
|
|
|
15065
15065
|
// ../../../node_modules/zod/v4/classic/external.js
|
|
15066
15066
|
config(en_default());
|
|
15067
15067
|
|
|
15068
|
+
// ../../shared-contracts/dist/goals.js
|
|
15069
|
+
var harnessGoalStatusSchema = external_exports.enum([
|
|
15070
|
+
"active",
|
|
15071
|
+
"paused",
|
|
15072
|
+
"blocked",
|
|
15073
|
+
"usageLimited",
|
|
15074
|
+
"budgetLimited",
|
|
15075
|
+
"complete"
|
|
15076
|
+
]);
|
|
15077
|
+
var count = external_exports.number().int().nonnegative().safe();
|
|
15078
|
+
var harnessGoalSchema = external_exports.object({
|
|
15079
|
+
objective: external_exports.string().min(1),
|
|
15080
|
+
status: harnessGoalStatusSchema,
|
|
15081
|
+
tokenBudget: count.positive().nullable(),
|
|
15082
|
+
tokensUsed: count,
|
|
15083
|
+
timeUsedSeconds: count,
|
|
15084
|
+
createdAt: count,
|
|
15085
|
+
updatedAt: count
|
|
15086
|
+
});
|
|
15087
|
+
var goalOriginSchema = external_exports.enum(["user", "automatic"]).nullable();
|
|
15088
|
+
var harnessGoalSetSchema = external_exports.object({
|
|
15089
|
+
objective: external_exports.string().min(1).optional(),
|
|
15090
|
+
status: external_exports.enum(["active", "paused"]).optional(),
|
|
15091
|
+
tokenBudget: count.positive().nullable().optional(),
|
|
15092
|
+
origin: goalOriginSchema
|
|
15093
|
+
});
|
|
15094
|
+
|
|
15068
15095
|
// ../../shared-contracts/dist/delegation-read.js
|
|
15069
15096
|
var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
15070
15097
|
var delegationReadParamsSchema = external_exports.strictObject({
|
|
@@ -15195,7 +15222,7 @@ var modelPriceDefaultResultSchema = external_exports.strictObject({
|
|
|
15195
15222
|
|
|
15196
15223
|
// ../../shared-contracts/dist/usage-statistics.js
|
|
15197
15224
|
var USAGE_STATISTICS_RANGES = ["today", "7d", "30d", "90d", "all"];
|
|
15198
|
-
var
|
|
15225
|
+
var count2 = external_exports.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
|
|
15199
15226
|
var localDate = external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/u);
|
|
15200
15227
|
var harness = external_exports.string().min(1).max(128);
|
|
15201
15228
|
var model = external_exports.string().min(1).max(512);
|
|
@@ -15218,22 +15245,24 @@ var usageStatisticsParamsSchema = external_exports.strictObject({
|
|
|
15218
15245
|
date: localDate.optional()
|
|
15219
15246
|
});
|
|
15220
15247
|
var usageStatisticsTotalsSchema = external_exports.strictObject({
|
|
15221
|
-
requests:
|
|
15222
|
-
inputTokens:
|
|
15223
|
-
cachedInputTokens:
|
|
15224
|
-
cacheWriteInputTokens:
|
|
15225
|
-
cacheKnownInputTokens:
|
|
15226
|
-
|
|
15227
|
-
|
|
15248
|
+
requests: count2,
|
|
15249
|
+
inputTokens: count2,
|
|
15250
|
+
cachedInputTokens: count2,
|
|
15251
|
+
cacheWriteInputTokens: count2,
|
|
15252
|
+
cacheKnownInputTokens: count2,
|
|
15253
|
+
cacheHitCachedInputTokens: count2,
|
|
15254
|
+
cacheHitInputTokens: count2,
|
|
15255
|
+
outputTokens: count2,
|
|
15256
|
+
reasoningOutputTokens: count2,
|
|
15228
15257
|
/** USD at the public price, summed over the priced requests only. */
|
|
15229
15258
|
costUsd: external_exports.number().finite().min(0),
|
|
15230
15259
|
/** Requests without a price (or the cache data the price needs); not in `costUsd`. */
|
|
15231
|
-
unpricedRequests:
|
|
15260
|
+
unpricedRequests: count2,
|
|
15232
15261
|
/**
|
|
15233
15262
|
* Requests whose storage gave no token counts: counted as requests, with neither tokens nor
|
|
15234
15263
|
* cost, and not as unpriced.
|
|
15235
15264
|
*/
|
|
15236
|
-
unmeteredRequests:
|
|
15265
|
+
unmeteredRequests: count2
|
|
15237
15266
|
});
|
|
15238
15267
|
var totals = usageStatisticsTotalsSchema.shape;
|
|
15239
15268
|
var usageStatisticsSessionSchema = external_exports.strictObject({
|
|
@@ -15244,8 +15273,8 @@ var usageStatisticsSessionSchema = external_exports.strictObject({
|
|
|
15244
15273
|
title: external_exports.string().min(1).max(200).optional(),
|
|
15245
15274
|
/** Models the session used, most requests first. */
|
|
15246
15275
|
models: external_exports.array(model).max(16),
|
|
15247
|
-
firstAtMs:
|
|
15248
|
-
lastAtMs:
|
|
15276
|
+
firstAtMs: count2,
|
|
15277
|
+
lastAtMs: count2,
|
|
15249
15278
|
...totals
|
|
15250
15279
|
});
|
|
15251
15280
|
var usageStatisticsResultSchema = external_exports.strictObject({
|
|
@@ -15263,7 +15292,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
15263
15292
|
date: localDate.nullable()
|
|
15264
15293
|
}),
|
|
15265
15294
|
/** Reading of native storage: incomplete while the first read, or a refresh, is under way. */
|
|
15266
|
-
reading: external_exports.strictObject({ complete: external_exports.boolean(), sources:
|
|
15295
|
+
reading: external_exports.strictObject({ complete: external_exports.boolean(), sources: count2, read: count2 }),
|
|
15267
15296
|
/** Harnesses whose storage could not be read; their part is missing, the rest is complete. */
|
|
15268
15297
|
failures: external_exports.array(external_exports.strictObject({ harness, message: external_exports.string().max(2048) })).max(256),
|
|
15269
15298
|
/** Every value seen in the range, ignoring the filters, to choose filters from. */
|
|
@@ -15283,8 +15312,8 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
15283
15312
|
harness,
|
|
15284
15313
|
model: model.nullable(),
|
|
15285
15314
|
credits: external_exports.number().finite().min(0),
|
|
15286
|
-
reportedRequests:
|
|
15287
|
-
requests:
|
|
15315
|
+
reportedRequests: count2,
|
|
15316
|
+
requests: count2
|
|
15288
15317
|
})).max(4096).optional(),
|
|
15289
15318
|
/** All filters applied. */
|
|
15290
15319
|
totals: usageStatisticsTotalsSchema,
|
|
@@ -15301,7 +15330,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
15301
15330
|
model: model.nullable(),
|
|
15302
15331
|
...totals,
|
|
15303
15332
|
/** Requests priced by what the Harness recorded they cost, not by a price list. */
|
|
15304
|
-
harnessPricedRequests:
|
|
15333
|
+
harnessPricedRequests: count2
|
|
15305
15334
|
})).max(4096),
|
|
15306
15335
|
byProject: external_exports.array(external_exports.strictObject({ project: project.nullable(), ...totals })).max(4096),
|
|
15307
15336
|
/**
|
|
@@ -15915,7 +15944,9 @@ var harnessModelCatalogSchema = external_exports.object({
|
|
|
15915
15944
|
var harnessHistoryCapabilitiesSchema = external_exports.object({
|
|
15916
15945
|
fork: external_exports.boolean(),
|
|
15917
15946
|
forkAcrossCwd: external_exports.boolean(),
|
|
15918
|
-
rollbackLastTurn: external_exports.boolean()
|
|
15947
|
+
rollbackLastTurn: external_exports.boolean(),
|
|
15948
|
+
/** Remove the selected checkpoint's Turn and every later Turn, without restoring files. */
|
|
15949
|
+
rollbackToCheckpoint: external_exports.boolean().optional()
|
|
15919
15950
|
}).strict().refine((history) => history.fork || !history.forkAcrossCwd, {
|
|
15920
15951
|
path: ["forkAcrossCwd"],
|
|
15921
15952
|
message: "Cross-cwd Fork requires exact history Fork support"
|
|
@@ -16153,7 +16184,10 @@ var harnessPluginRouteSchema = external_exports.object({
|
|
|
16153
16184
|
harnessId: harnessPluginIdSchema,
|
|
16154
16185
|
model: harnessModelRefSchema.optional(),
|
|
16155
16186
|
thinkingOptionId: harnessThinkingOptionIdSchema.optional(),
|
|
16156
|
-
permissionModeId: harnessPermissionModeIdSchema.optional()
|
|
16187
|
+
permissionModeId: harnessPermissionModeIdSchema.optional(),
|
|
16188
|
+
/** A draft prewarm create: stays unsubmitted until the user's first Turn.
|
|
16189
|
+
* Desktop forwards only the Model of a main-process prewarm to thread/start. */
|
|
16190
|
+
prewarm: external_exports.literal(true).optional()
|
|
16157
16191
|
}).strict();
|
|
16158
16192
|
|
|
16159
16193
|
// ../../shared-contracts/dist/harness-launch-settings.js
|
|
@@ -18605,7 +18639,7 @@ function normalizePiThinkingOptions(levels) {
|
|
|
18605
18639
|
label: PI_THINKING_LABELS[id] ?? fallbackThinkingLabel(id)
|
|
18606
18640
|
}));
|
|
18607
18641
|
}
|
|
18608
|
-
function normalizePiModelCatalog(nativeModels, effectiveModel, thinkingLevels, effectiveThinkingOptionId) {
|
|
18642
|
+
function normalizePiModelCatalog(nativeModels, effectiveModel, thinkingLevels, effectiveThinkingOptionId, effectiveModelReasoning = null) {
|
|
18609
18643
|
const byRef = /* @__PURE__ */ new Map();
|
|
18610
18644
|
for (const native of nativeModels) {
|
|
18611
18645
|
const ref = encodePiModelRef(native);
|
|
@@ -18621,12 +18655,21 @@ function normalizePiModelCatalog(nativeModels, effectiveModel, thinkingLevels, e
|
|
|
18621
18655
|
ref,
|
|
18622
18656
|
label: `${native.provider} / ${native.id}`
|
|
18623
18657
|
},
|
|
18624
|
-
reasoning: native.reasoning
|
|
18658
|
+
reasoning: native.reasoning,
|
|
18659
|
+
synthesized: false
|
|
18625
18660
|
});
|
|
18626
18661
|
}
|
|
18627
18662
|
const defaultModel = effectiveModel ? encodePiModelRef(effectiveModel) : void 0;
|
|
18628
|
-
if (defaultModel && !byRef.has(defaultModel.id)) {
|
|
18629
|
-
|
|
18663
|
+
if (effectiveModel && defaultModel && !byRef.has(defaultModel.id)) {
|
|
18664
|
+
const reasoning = effectiveThinkingOptionId && effectiveThinkingOptionId !== "off" || (effectiveModelReasoning ?? Boolean(thinkingLevels && thinkingLevels.some((level) => level !== "off")));
|
|
18665
|
+
byRef.set(defaultModel.id, {
|
|
18666
|
+
model: {
|
|
18667
|
+
ref: defaultModel,
|
|
18668
|
+
label: `${effectiveModel.provider} / ${effectiveModel.id}`
|
|
18669
|
+
},
|
|
18670
|
+
reasoning,
|
|
18671
|
+
synthesized: true
|
|
18672
|
+
});
|
|
18630
18673
|
}
|
|
18631
18674
|
if (thinkingLevels && effectiveThinkingOptionId && !thinkingLevels.includes(effectiveThinkingOptionId)) {
|
|
18632
18675
|
throw new Error("Pi effective Thinking option is absent from the available option catalog");
|
|
@@ -18637,9 +18680,10 @@ function normalizePiModelCatalog(nativeModels, effectiveModel, thinkingLevels, e
|
|
|
18637
18680
|
const thinkingOptions = thinkingLevels ? normalizePiThinkingOptions(PI_DRAFT_THINKING_OPTION_IDS) : [];
|
|
18638
18681
|
const allThinkingOptionIds = thinkingOptions.map(({ id }) => id);
|
|
18639
18682
|
const offThinkingOptionId = thinkingOptions.find(({ id }) => id === "off")?.id;
|
|
18640
|
-
const
|
|
18683
|
+
const effectiveThinkingOptionIds = thinkingLevels ? allThinkingOptionIds.filter((id) => thinkingLevels.includes(id)) : allThinkingOptionIds;
|
|
18684
|
+
const models = [...byRef.values()].map(({ model: model2, reasoning, synthesized }) => ({
|
|
18641
18685
|
...model2,
|
|
18642
|
-
supportedThinkingOptionIds: reasoning ? allThinkingOptionIds : offThinkingOptionId ? [offThinkingOptionId] : []
|
|
18686
|
+
supportedThinkingOptionIds: reasoning ? synthesized ? effectiveThinkingOptionIds : allThinkingOptionIds : offThinkingOptionId ? [offThinkingOptionId] : []
|
|
18643
18687
|
})).sort((left, right) => compareText(left.label, right.label) || compareText(left.ref.id, right.ref.id));
|
|
18644
18688
|
const defaultThinkingOptionId = thinkingOptions.find(({ id }) => id === effectiveThinkingOptionId)?.id;
|
|
18645
18689
|
return harnessModelCatalogSchema.parse({
|
|
@@ -20347,6 +20391,7 @@ function sessionStateData(response) {
|
|
|
20347
20391
|
function parseSessionState(response) {
|
|
20348
20392
|
const data = sessionStateData(response);
|
|
20349
20393
|
const model2 = parseNativeModel(data.model, "state");
|
|
20394
|
+
const modelReasoning = isRecord8(data.model) && typeof data.model.reasoning === "boolean" ? data.model.reasoning : null;
|
|
20350
20395
|
if (!nonBlankString(data.sessionId)) {
|
|
20351
20396
|
throw new PiRpcFaultError("protocolError", "Pi RPC state has no stable Session identity");
|
|
20352
20397
|
}
|
|
@@ -20359,6 +20404,7 @@ function parseSessionState(response) {
|
|
|
20359
20404
|
sessionFile: typeof data.sessionFile === "string" ? data.sessionFile : null,
|
|
20360
20405
|
provider: model2?.provider ?? null,
|
|
20361
20406
|
modelId: model2?.id ?? null,
|
|
20407
|
+
...modelReasoning === null ? {} : { modelReasoning },
|
|
20362
20408
|
thinkingLevel: thinkingLevel?.data ?? null,
|
|
20363
20409
|
contextUsage: optionalPiStateContextUsage(data.contextUsage)
|
|
20364
20410
|
};
|
|
@@ -23140,7 +23186,7 @@ var PiAdapter = class {
|
|
|
23140
23186
|
stage = "capabilities";
|
|
23141
23187
|
const thinkingLevels = await transport.getAvailableThinkingLevels();
|
|
23142
23188
|
this.#thinkingSelectionSupported = thinkingLevels !== null;
|
|
23143
|
-
const normalized = normalizePiModelCatalog(models, nativeModelFromState(transport.state), thinkingLevels, transport.state.thinkingLevel);
|
|
23189
|
+
const normalized = normalizePiModelCatalog(models, nativeModelFromState(transport.state), thinkingLevels, transport.state.thinkingLevel, transport.state.modelReasoning ?? null);
|
|
23144
23190
|
const fastModels = await transport.supportsFastMode?.() ? piFastModelKeys(models) : /* @__PURE__ */ new Set();
|
|
23145
23191
|
const catalog = withPiFast(normalized, fastModels);
|
|
23146
23192
|
await transport.close();
|
|
@@ -23176,6 +23222,16 @@ var PiAdapter = class {
|
|
|
23176
23222
|
}
|
|
23177
23223
|
}
|
|
23178
23224
|
async open(input) {
|
|
23225
|
+
if (input.kind === "rollbackToCheckpoint") {
|
|
23226
|
+
return {
|
|
23227
|
+
ok: false,
|
|
23228
|
+
error: {
|
|
23229
|
+
code: "unsupported",
|
|
23230
|
+
message: "Checkpoint rollback is not supported by this Adapter",
|
|
23231
|
+
retryable: false
|
|
23232
|
+
}
|
|
23233
|
+
};
|
|
23234
|
+
}
|
|
23179
23235
|
if (this.#closePromise) {
|
|
23180
23236
|
return { ok: false, error: invalidState("Pi Adapter is closed") };
|
|
23181
23237
|
}
|
|
@@ -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
|
}
|
|
@@ -17633,8 +17633,8 @@ function az_default() {
|
|
|
17633
17633
|
}
|
|
17634
17634
|
|
|
17635
17635
|
// ../../../node_modules/zod/v4/locales/be.js
|
|
17636
|
-
function getBelarusianPlural(
|
|
17637
|
-
const absCount = Math.abs(
|
|
17636
|
+
function getBelarusianPlural(count4, one, few, many) {
|
|
17637
|
+
const absCount = Math.abs(count4);
|
|
17638
17638
|
const lastDigit = absCount % 10;
|
|
17639
17639
|
const lastTwoDigits = absCount % 100;
|
|
17640
17640
|
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
@@ -19712,8 +19712,8 @@ function hu_default() {
|
|
|
19712
19712
|
}
|
|
19713
19713
|
|
|
19714
19714
|
// ../../../node_modules/zod/v4/locales/hy.js
|
|
19715
|
-
function getArmenianPlural(
|
|
19716
|
-
return Math.abs(
|
|
19715
|
+
function getArmenianPlural(count4, one, many) {
|
|
19716
|
+
return Math.abs(count4) === 1 ? one : many;
|
|
19717
19717
|
}
|
|
19718
19718
|
function withDefiniteArticle(word) {
|
|
19719
19719
|
if (!word)
|
|
@@ -21841,8 +21841,8 @@ function ro_default() {
|
|
|
21841
21841
|
}
|
|
21842
21842
|
|
|
21843
21843
|
// ../../../node_modules/zod/v4/locales/ru.js
|
|
21844
|
-
function getRussianPlural(
|
|
21845
|
-
const absCount = Math.abs(
|
|
21844
|
+
function getRussianPlural(count4, one, few, many) {
|
|
21845
|
+
const absCount = Math.abs(count4);
|
|
21846
21846
|
const lastDigit = absCount % 10;
|
|
21847
21847
|
const lastTwoDigits = absCount % 100;
|
|
21848
21848
|
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
@@ -27511,6 +27511,33 @@ function date4(params) {
|
|
|
27511
27511
|
// ../../../node_modules/zod/v4/classic/external.js
|
|
27512
27512
|
config(en_default());
|
|
27513
27513
|
|
|
27514
|
+
// ../../shared-contracts/dist/goals.js
|
|
27515
|
+
var harnessGoalStatusSchema = external_exports.enum([
|
|
27516
|
+
"active",
|
|
27517
|
+
"paused",
|
|
27518
|
+
"blocked",
|
|
27519
|
+
"usageLimited",
|
|
27520
|
+
"budgetLimited",
|
|
27521
|
+
"complete"
|
|
27522
|
+
]);
|
|
27523
|
+
var count = external_exports.number().int().nonnegative().safe();
|
|
27524
|
+
var harnessGoalSchema = external_exports.object({
|
|
27525
|
+
objective: external_exports.string().min(1),
|
|
27526
|
+
status: harnessGoalStatusSchema,
|
|
27527
|
+
tokenBudget: count.positive().nullable(),
|
|
27528
|
+
tokensUsed: count,
|
|
27529
|
+
timeUsedSeconds: count,
|
|
27530
|
+
createdAt: count,
|
|
27531
|
+
updatedAt: count
|
|
27532
|
+
});
|
|
27533
|
+
var goalOriginSchema = external_exports.enum(["user", "automatic"]).nullable();
|
|
27534
|
+
var harnessGoalSetSchema = external_exports.object({
|
|
27535
|
+
objective: external_exports.string().min(1).optional(),
|
|
27536
|
+
status: external_exports.enum(["active", "paused"]).optional(),
|
|
27537
|
+
tokenBudget: count.positive().nullable().optional(),
|
|
27538
|
+
origin: goalOriginSchema
|
|
27539
|
+
});
|
|
27540
|
+
|
|
27514
27541
|
// ../../shared-contracts/dist/delegation-read.js
|
|
27515
27542
|
var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
27516
27543
|
var delegationReadParamsSchema = external_exports.strictObject({
|
|
@@ -27641,7 +27668,7 @@ var modelPriceDefaultResultSchema = external_exports.strictObject({
|
|
|
27641
27668
|
|
|
27642
27669
|
// ../../shared-contracts/dist/usage-statistics.js
|
|
27643
27670
|
var USAGE_STATISTICS_RANGES = ["today", "7d", "30d", "90d", "all"];
|
|
27644
|
-
var
|
|
27671
|
+
var count2 = external_exports.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
|
|
27645
27672
|
var localDate = external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/u);
|
|
27646
27673
|
var harness = external_exports.string().min(1).max(128);
|
|
27647
27674
|
var model = external_exports.string().min(1).max(512);
|
|
@@ -27664,22 +27691,24 @@ var usageStatisticsParamsSchema = external_exports.strictObject({
|
|
|
27664
27691
|
date: localDate.optional()
|
|
27665
27692
|
});
|
|
27666
27693
|
var usageStatisticsTotalsSchema = external_exports.strictObject({
|
|
27667
|
-
requests:
|
|
27668
|
-
inputTokens:
|
|
27669
|
-
cachedInputTokens:
|
|
27670
|
-
cacheWriteInputTokens:
|
|
27671
|
-
cacheKnownInputTokens:
|
|
27672
|
-
|
|
27673
|
-
|
|
27694
|
+
requests: count2,
|
|
27695
|
+
inputTokens: count2,
|
|
27696
|
+
cachedInputTokens: count2,
|
|
27697
|
+
cacheWriteInputTokens: count2,
|
|
27698
|
+
cacheKnownInputTokens: count2,
|
|
27699
|
+
cacheHitCachedInputTokens: count2,
|
|
27700
|
+
cacheHitInputTokens: count2,
|
|
27701
|
+
outputTokens: count2,
|
|
27702
|
+
reasoningOutputTokens: count2,
|
|
27674
27703
|
/** USD at the public price, summed over the priced requests only. */
|
|
27675
27704
|
costUsd: external_exports.number().finite().min(0),
|
|
27676
27705
|
/** Requests without a price (or the cache data the price needs); not in `costUsd`. */
|
|
27677
|
-
unpricedRequests:
|
|
27706
|
+
unpricedRequests: count2,
|
|
27678
27707
|
/**
|
|
27679
27708
|
* Requests whose storage gave no token counts: counted as requests, with neither tokens nor
|
|
27680
27709
|
* cost, and not as unpriced.
|
|
27681
27710
|
*/
|
|
27682
|
-
unmeteredRequests:
|
|
27711
|
+
unmeteredRequests: count2
|
|
27683
27712
|
});
|
|
27684
27713
|
var totals = usageStatisticsTotalsSchema.shape;
|
|
27685
27714
|
var usageStatisticsSessionSchema = external_exports.strictObject({
|
|
@@ -27690,8 +27719,8 @@ var usageStatisticsSessionSchema = external_exports.strictObject({
|
|
|
27690
27719
|
title: external_exports.string().min(1).max(200).optional(),
|
|
27691
27720
|
/** Models the session used, most requests first. */
|
|
27692
27721
|
models: external_exports.array(model).max(16),
|
|
27693
|
-
firstAtMs:
|
|
27694
|
-
lastAtMs:
|
|
27722
|
+
firstAtMs: count2,
|
|
27723
|
+
lastAtMs: count2,
|
|
27695
27724
|
...totals
|
|
27696
27725
|
});
|
|
27697
27726
|
var usageStatisticsResultSchema = external_exports.strictObject({
|
|
@@ -27709,7 +27738,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
27709
27738
|
date: localDate.nullable()
|
|
27710
27739
|
}),
|
|
27711
27740
|
/** Reading of native storage: incomplete while the first read, or a refresh, is under way. */
|
|
27712
|
-
reading: external_exports.strictObject({ complete: external_exports.boolean(), sources:
|
|
27741
|
+
reading: external_exports.strictObject({ complete: external_exports.boolean(), sources: count2, read: count2 }),
|
|
27713
27742
|
/** Harnesses whose storage could not be read; their part is missing, the rest is complete. */
|
|
27714
27743
|
failures: external_exports.array(external_exports.strictObject({ harness, message: external_exports.string().max(2048) })).max(256),
|
|
27715
27744
|
/** Every value seen in the range, ignoring the filters, to choose filters from. */
|
|
@@ -27729,8 +27758,8 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
27729
27758
|
harness,
|
|
27730
27759
|
model: model.nullable(),
|
|
27731
27760
|
credits: external_exports.number().finite().min(0),
|
|
27732
|
-
reportedRequests:
|
|
27733
|
-
requests:
|
|
27761
|
+
reportedRequests: count2,
|
|
27762
|
+
requests: count2
|
|
27734
27763
|
})).max(4096).optional(),
|
|
27735
27764
|
/** All filters applied. */
|
|
27736
27765
|
totals: usageStatisticsTotalsSchema,
|
|
@@ -27747,7 +27776,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
27747
27776
|
model: model.nullable(),
|
|
27748
27777
|
...totals,
|
|
27749
27778
|
/** Requests priced by what the Harness recorded they cost, not by a price list. */
|
|
27750
|
-
harnessPricedRequests:
|
|
27779
|
+
harnessPricedRequests: count2
|
|
27751
27780
|
})).max(4096),
|
|
27752
27781
|
byProject: external_exports.array(external_exports.strictObject({ project: project.nullable(), ...totals })).max(4096),
|
|
27753
27782
|
/**
|
|
@@ -28361,7 +28390,9 @@ var harnessModelCatalogSchema = external_exports.object({
|
|
|
28361
28390
|
var harnessHistoryCapabilitiesSchema = external_exports.object({
|
|
28362
28391
|
fork: external_exports.boolean(),
|
|
28363
28392
|
forkAcrossCwd: external_exports.boolean(),
|
|
28364
|
-
rollbackLastTurn: external_exports.boolean()
|
|
28393
|
+
rollbackLastTurn: external_exports.boolean(),
|
|
28394
|
+
/** Remove the selected checkpoint's Turn and every later Turn, without restoring files. */
|
|
28395
|
+
rollbackToCheckpoint: external_exports.boolean().optional()
|
|
28365
28396
|
}).strict().refine((history) => history.fork || !history.forkAcrossCwd, {
|
|
28366
28397
|
path: ["forkAcrossCwd"],
|
|
28367
28398
|
message: "Cross-cwd Fork requires exact history Fork support"
|
|
@@ -28599,7 +28630,10 @@ var harnessPluginRouteSchema = external_exports.object({
|
|
|
28599
28630
|
harnessId: harnessPluginIdSchema,
|
|
28600
28631
|
model: harnessModelRefSchema.optional(),
|
|
28601
28632
|
thinkingOptionId: harnessThinkingOptionIdSchema.optional(),
|
|
28602
|
-
permissionModeId: harnessPermissionModeIdSchema.optional()
|
|
28633
|
+
permissionModeId: harnessPermissionModeIdSchema.optional(),
|
|
28634
|
+
/** A draft prewarm create: stays unsubmitted until the user's first Turn.
|
|
28635
|
+
* Desktop forwards only the Model of a main-process prewarm to thread/start. */
|
|
28636
|
+
prewarm: external_exports.literal(true).optional()
|
|
28603
28637
|
}).strict();
|
|
28604
28638
|
|
|
28605
28639
|
// ../../shared-contracts/dist/harness-launch-settings.js
|
|
@@ -53398,7 +53432,7 @@ function qoderUserText(message) {
|
|
|
53398
53432
|
return void 0;
|
|
53399
53433
|
return content.filter((block) => isRecord2(block) && block.type === "text" && typeof block.text === "string").map((block) => String(block.text)).join(" ");
|
|
53400
53434
|
}
|
|
53401
|
-
function
|
|
53435
|
+
function count3(value) {
|
|
53402
53436
|
return typeof value === "number" && Number.isSafeInteger(value) && value >= 0;
|
|
53403
53437
|
}
|
|
53404
53438
|
async function readQoderUsage(file2, signal) {
|
|
@@ -53435,7 +53469,7 @@ async function readQoderUsage(file2, signal) {
|
|
|
53435
53469
|
const output = usage.output_tokens;
|
|
53436
53470
|
const cached2 = usage.cache_read_input_tokens;
|
|
53437
53471
|
const written = usage.cache_creation_input_tokens;
|
|
53438
|
-
if (!
|
|
53472
|
+
if (!count3(input) || !count3(output) || !count3(cached2) || !count3(written))
|
|
53439
53473
|
continue;
|
|
53440
53474
|
const split = isRecord2(usage.cache_creation) ? usage.cache_creation : null;
|
|
53441
53475
|
const oneHour = split?.ephemeral_1h_input_tokens;
|
|
@@ -53449,10 +53483,10 @@ async function readQoderUsage(file2, signal) {
|
|
|
53449
53483
|
inputTokens: input + cached2 + written,
|
|
53450
53484
|
cachedInputTokens: cached2,
|
|
53451
53485
|
cacheWriteInputTokens: written,
|
|
53452
|
-
...
|
|
53486
|
+
...count3(oneHour) ? { cacheWrite1hInputTokens: oneHour } : {},
|
|
53453
53487
|
outputTokens: output,
|
|
53454
53488
|
...typeof usage.credits === "number" && Number.isFinite(usage.credits) && usage.credits >= 0 ? { credits: usage.credits } : {},
|
|
53455
|
-
...
|
|
53489
|
+
...count3(thinking) ? { reasoningOutputTokens: thinking } : {},
|
|
53456
53490
|
...unreported ? { tokensUnknown: true } : {}
|
|
53457
53491
|
});
|
|
53458
53492
|
if (entry)
|
|
@@ -53653,6 +53687,16 @@ var QoderAdapter = class {
|
|
|
53653
53687
|
return task;
|
|
53654
53688
|
}
|
|
53655
53689
|
async open(input) {
|
|
53690
|
+
if (input.kind === "rollbackToCheckpoint") {
|
|
53691
|
+
return {
|
|
53692
|
+
ok: false,
|
|
53693
|
+
error: {
|
|
53694
|
+
code: "unsupported",
|
|
53695
|
+
message: "Checkpoint rollback is not supported by this Adapter",
|
|
53696
|
+
retryable: false
|
|
53697
|
+
}
|
|
53698
|
+
};
|
|
53699
|
+
}
|
|
53656
53700
|
if ("model" in input && input.model && !decodeQoderModelRef(input.model)) {
|
|
53657
53701
|
return {
|
|
53658
53702
|
ok: false,
|