@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
|
@@ -5190,8 +5190,8 @@ function az_default() {
|
|
|
5190
5190
|
}
|
|
5191
5191
|
|
|
5192
5192
|
// ../../../node_modules/zod/v4/locales/be.js
|
|
5193
|
-
function getBelarusianPlural(
|
|
5194
|
-
const absCount = Math.abs(
|
|
5193
|
+
function getBelarusianPlural(count3, one, few, many) {
|
|
5194
|
+
const absCount = Math.abs(count3);
|
|
5195
5195
|
const lastDigit = absCount % 10;
|
|
5196
5196
|
const lastTwoDigits = absCount % 100;
|
|
5197
5197
|
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
@@ -7269,8 +7269,8 @@ function hu_default() {
|
|
|
7269
7269
|
}
|
|
7270
7270
|
|
|
7271
7271
|
// ../../../node_modules/zod/v4/locales/hy.js
|
|
7272
|
-
function getArmenianPlural(
|
|
7273
|
-
return Math.abs(
|
|
7272
|
+
function getArmenianPlural(count3, one, many) {
|
|
7273
|
+
return Math.abs(count3) === 1 ? one : many;
|
|
7274
7274
|
}
|
|
7275
7275
|
function withDefiniteArticle(word) {
|
|
7276
7276
|
if (!word)
|
|
@@ -9398,8 +9398,8 @@ function ro_default() {
|
|
|
9398
9398
|
}
|
|
9399
9399
|
|
|
9400
9400
|
// ../../../node_modules/zod/v4/locales/ru.js
|
|
9401
|
-
function getRussianPlural(
|
|
9402
|
-
const absCount = Math.abs(
|
|
9401
|
+
function getRussianPlural(count3, one, few, many) {
|
|
9402
|
+
const absCount = Math.abs(count3);
|
|
9403
9403
|
const lastDigit = absCount % 10;
|
|
9404
9404
|
const lastTwoDigits = absCount % 100;
|
|
9405
9405
|
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
@@ -15068,6 +15068,33 @@ function date4(params) {
|
|
|
15068
15068
|
// ../../../node_modules/zod/v4/classic/external.js
|
|
15069
15069
|
config(en_default());
|
|
15070
15070
|
|
|
15071
|
+
// ../../shared-contracts/dist/goals.js
|
|
15072
|
+
var harnessGoalStatusSchema = external_exports.enum([
|
|
15073
|
+
"active",
|
|
15074
|
+
"paused",
|
|
15075
|
+
"blocked",
|
|
15076
|
+
"usageLimited",
|
|
15077
|
+
"budgetLimited",
|
|
15078
|
+
"complete"
|
|
15079
|
+
]);
|
|
15080
|
+
var count = external_exports.number().int().nonnegative().safe();
|
|
15081
|
+
var harnessGoalSchema = external_exports.object({
|
|
15082
|
+
objective: external_exports.string().min(1),
|
|
15083
|
+
status: harnessGoalStatusSchema,
|
|
15084
|
+
tokenBudget: count.positive().nullable(),
|
|
15085
|
+
tokensUsed: count,
|
|
15086
|
+
timeUsedSeconds: count,
|
|
15087
|
+
createdAt: count,
|
|
15088
|
+
updatedAt: count
|
|
15089
|
+
});
|
|
15090
|
+
var goalOriginSchema = external_exports.enum(["user", "automatic"]).nullable();
|
|
15091
|
+
var harnessGoalSetSchema = external_exports.object({
|
|
15092
|
+
objective: external_exports.string().min(1).optional(),
|
|
15093
|
+
status: external_exports.enum(["active", "paused"]).optional(),
|
|
15094
|
+
tokenBudget: count.positive().nullable().optional(),
|
|
15095
|
+
origin: goalOriginSchema
|
|
15096
|
+
});
|
|
15097
|
+
|
|
15071
15098
|
// ../../shared-contracts/dist/delegation-read.js
|
|
15072
15099
|
var REMOTE_THREAD_REPLY_MAX_BYTES = 16 * 1024 * 1024;
|
|
15073
15100
|
var delegationReadParamsSchema = external_exports.strictObject({
|
|
@@ -15198,7 +15225,7 @@ var modelPriceDefaultResultSchema = external_exports.strictObject({
|
|
|
15198
15225
|
|
|
15199
15226
|
// ../../shared-contracts/dist/usage-statistics.js
|
|
15200
15227
|
var USAGE_STATISTICS_RANGES = ["today", "7d", "30d", "90d", "all"];
|
|
15201
|
-
var
|
|
15228
|
+
var count2 = external_exports.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
|
|
15202
15229
|
var localDate = external_exports.string().regex(/^\d{4}-\d{2}-\d{2}$/u);
|
|
15203
15230
|
var harness = external_exports.string().min(1).max(128);
|
|
15204
15231
|
var model = external_exports.string().min(1).max(512);
|
|
@@ -15221,22 +15248,24 @@ var usageStatisticsParamsSchema = external_exports.strictObject({
|
|
|
15221
15248
|
date: localDate.optional()
|
|
15222
15249
|
});
|
|
15223
15250
|
var usageStatisticsTotalsSchema = external_exports.strictObject({
|
|
15224
|
-
requests:
|
|
15225
|
-
inputTokens:
|
|
15226
|
-
cachedInputTokens:
|
|
15227
|
-
cacheWriteInputTokens:
|
|
15228
|
-
cacheKnownInputTokens:
|
|
15229
|
-
|
|
15230
|
-
|
|
15251
|
+
requests: count2,
|
|
15252
|
+
inputTokens: count2,
|
|
15253
|
+
cachedInputTokens: count2,
|
|
15254
|
+
cacheWriteInputTokens: count2,
|
|
15255
|
+
cacheKnownInputTokens: count2,
|
|
15256
|
+
cacheHitCachedInputTokens: count2,
|
|
15257
|
+
cacheHitInputTokens: count2,
|
|
15258
|
+
outputTokens: count2,
|
|
15259
|
+
reasoningOutputTokens: count2,
|
|
15231
15260
|
/** USD at the public price, summed over the priced requests only. */
|
|
15232
15261
|
costUsd: external_exports.number().finite().min(0),
|
|
15233
15262
|
/** Requests without a price (or the cache data the price needs); not in `costUsd`. */
|
|
15234
|
-
unpricedRequests:
|
|
15263
|
+
unpricedRequests: count2,
|
|
15235
15264
|
/**
|
|
15236
15265
|
* Requests whose storage gave no token counts: counted as requests, with neither tokens nor
|
|
15237
15266
|
* cost, and not as unpriced.
|
|
15238
15267
|
*/
|
|
15239
|
-
unmeteredRequests:
|
|
15268
|
+
unmeteredRequests: count2
|
|
15240
15269
|
});
|
|
15241
15270
|
var totals = usageStatisticsTotalsSchema.shape;
|
|
15242
15271
|
var usageStatisticsSessionSchema = external_exports.strictObject({
|
|
@@ -15247,8 +15276,8 @@ var usageStatisticsSessionSchema = external_exports.strictObject({
|
|
|
15247
15276
|
title: external_exports.string().min(1).max(200).optional(),
|
|
15248
15277
|
/** Models the session used, most requests first. */
|
|
15249
15278
|
models: external_exports.array(model).max(16),
|
|
15250
|
-
firstAtMs:
|
|
15251
|
-
lastAtMs:
|
|
15279
|
+
firstAtMs: count2,
|
|
15280
|
+
lastAtMs: count2,
|
|
15252
15281
|
...totals
|
|
15253
15282
|
});
|
|
15254
15283
|
var usageStatisticsResultSchema = external_exports.strictObject({
|
|
@@ -15266,7 +15295,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
15266
15295
|
date: localDate.nullable()
|
|
15267
15296
|
}),
|
|
15268
15297
|
/** Reading of native storage: incomplete while the first read, or a refresh, is under way. */
|
|
15269
|
-
reading: external_exports.strictObject({ complete: external_exports.boolean(), sources:
|
|
15298
|
+
reading: external_exports.strictObject({ complete: external_exports.boolean(), sources: count2, read: count2 }),
|
|
15270
15299
|
/** Harnesses whose storage could not be read; their part is missing, the rest is complete. */
|
|
15271
15300
|
failures: external_exports.array(external_exports.strictObject({ harness, message: external_exports.string().max(2048) })).max(256),
|
|
15272
15301
|
/** Every value seen in the range, ignoring the filters, to choose filters from. */
|
|
@@ -15286,8 +15315,8 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
15286
15315
|
harness,
|
|
15287
15316
|
model: model.nullable(),
|
|
15288
15317
|
credits: external_exports.number().finite().min(0),
|
|
15289
|
-
reportedRequests:
|
|
15290
|
-
requests:
|
|
15318
|
+
reportedRequests: count2,
|
|
15319
|
+
requests: count2
|
|
15291
15320
|
})).max(4096).optional(),
|
|
15292
15321
|
/** All filters applied. */
|
|
15293
15322
|
totals: usageStatisticsTotalsSchema,
|
|
@@ -15304,7 +15333,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
15304
15333
|
model: model.nullable(),
|
|
15305
15334
|
...totals,
|
|
15306
15335
|
/** Requests priced by what the Harness recorded they cost, not by a price list. */
|
|
15307
|
-
harnessPricedRequests:
|
|
15336
|
+
harnessPricedRequests: count2
|
|
15308
15337
|
})).max(4096),
|
|
15309
15338
|
byProject: external_exports.array(external_exports.strictObject({ project: project.nullable(), ...totals })).max(4096),
|
|
15310
15339
|
/**
|
|
@@ -15918,7 +15947,9 @@ var harnessModelCatalogSchema = external_exports.object({
|
|
|
15918
15947
|
var harnessHistoryCapabilitiesSchema = external_exports.object({
|
|
15919
15948
|
fork: external_exports.boolean(),
|
|
15920
15949
|
forkAcrossCwd: external_exports.boolean(),
|
|
15921
|
-
rollbackLastTurn: external_exports.boolean()
|
|
15950
|
+
rollbackLastTurn: external_exports.boolean(),
|
|
15951
|
+
/** Remove the selected checkpoint's Turn and every later Turn, without restoring files. */
|
|
15952
|
+
rollbackToCheckpoint: external_exports.boolean().optional()
|
|
15922
15953
|
}).strict().refine((history) => history.fork || !history.forkAcrossCwd, {
|
|
15923
15954
|
path: ["forkAcrossCwd"],
|
|
15924
15955
|
message: "Cross-cwd Fork requires exact history Fork support"
|
|
@@ -16156,7 +16187,10 @@ var harnessPluginRouteSchema = external_exports.object({
|
|
|
16156
16187
|
harnessId: harnessPluginIdSchema,
|
|
16157
16188
|
model: harnessModelRefSchema.optional(),
|
|
16158
16189
|
thinkingOptionId: harnessThinkingOptionIdSchema.optional(),
|
|
16159
|
-
permissionModeId: harnessPermissionModeIdSchema.optional()
|
|
16190
|
+
permissionModeId: harnessPermissionModeIdSchema.optional(),
|
|
16191
|
+
/** A draft prewarm create: stays unsubmitted until the user's first Turn.
|
|
16192
|
+
* Desktop forwards only the Model of a main-process prewarm to thread/start. */
|
|
16193
|
+
prewarm: external_exports.literal(true).optional()
|
|
16160
16194
|
}).strict();
|
|
16161
16195
|
|
|
16162
16196
|
// ../../shared-contracts/dist/harness-launch-settings.js
|
|
@@ -18123,10 +18157,10 @@ var OmpFrameDecoder = class {
|
|
|
18123
18157
|
}
|
|
18124
18158
|
const chunkId = value.chunkId;
|
|
18125
18159
|
const index = value.index;
|
|
18126
|
-
const
|
|
18160
|
+
const count3 = value.count;
|
|
18127
18161
|
const byteLength = value.byteLength;
|
|
18128
18162
|
const data = value.data;
|
|
18129
|
-
if (typeof chunkId !== "string" || chunkId.length === 0 || chunkId.length > 128 || !Number.isInteger(index) || !Number.isInteger(
|
|
18163
|
+
if (typeof chunkId !== "string" || chunkId.length === 0 || chunkId.length > 128 || !Number.isInteger(index) || !Number.isInteger(count3) || !Number.isInteger(byteLength) || index < 0 || count3 < 2 || index >= count3 || byteLength < MAX_FRAME_BYTES || byteLength > MAX_REASSEMBLED_BYTES || typeof data !== "string" || data.length === 0)
|
|
18130
18164
|
throw new Error("Invalid OMP RPC chunk metadata");
|
|
18131
18165
|
let bytes;
|
|
18132
18166
|
try {
|
|
@@ -18138,7 +18172,7 @@ var OmpFrameDecoder = class {
|
|
|
18138
18172
|
throw new Error("Invalid OMP RPC chunk data");
|
|
18139
18173
|
}
|
|
18140
18174
|
const chunkIndex = index;
|
|
18141
|
-
const chunkCount =
|
|
18175
|
+
const chunkCount = count3;
|
|
18142
18176
|
const declaredByteLength = byteLength;
|
|
18143
18177
|
if (!this.#pending) {
|
|
18144
18178
|
if (chunkIndex !== 0)
|
|
@@ -22357,6 +22391,16 @@ var OmpAdapter = class {
|
|
|
22357
22391
|
}
|
|
22358
22392
|
}
|
|
22359
22393
|
async open(input) {
|
|
22394
|
+
if (input.kind === "rollbackToCheckpoint") {
|
|
22395
|
+
return {
|
|
22396
|
+
ok: false,
|
|
22397
|
+
error: {
|
|
22398
|
+
code: "unsupported",
|
|
22399
|
+
message: "Checkpoint rollback is not supported by this Adapter",
|
|
22400
|
+
retryable: false
|
|
22401
|
+
}
|
|
22402
|
+
};
|
|
22403
|
+
}
|
|
22360
22404
|
if (this.#closePromise) {
|
|
22361
22405
|
return { ok: false, error: invalidState("Omp Adapter is closed") };
|
|
22362
22406
|
}
|
|
@@ -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
|
|
@@ -25060,6 +25094,16 @@ var OpenCodeAdapter = class {
|
|
|
25060
25094
|
}
|
|
25061
25095
|
}
|
|
25062
25096
|
async open(input) {
|
|
25097
|
+
if (input.kind === "rollbackToCheckpoint") {
|
|
25098
|
+
return {
|
|
25099
|
+
ok: false,
|
|
25100
|
+
error: {
|
|
25101
|
+
code: "unsupported",
|
|
25102
|
+
message: "Checkpoint rollback is not supported by this Adapter",
|
|
25103
|
+
retryable: false
|
|
25104
|
+
}
|
|
25105
|
+
};
|
|
25106
|
+
}
|
|
25063
25107
|
if (this.#closePromise) {
|
|
25064
25108
|
return { ok: false, error: invalidState("OpenCode Adapter is closed") };
|
|
25065
25109
|
}
|
|
@@ -28190,6 +28234,16 @@ var V2Adapter = class {
|
|
|
28190
28234
|
}
|
|
28191
28235
|
}
|
|
28192
28236
|
async open(input) {
|
|
28237
|
+
if (input.kind === "rollbackToCheckpoint") {
|
|
28238
|
+
return {
|
|
28239
|
+
ok: false,
|
|
28240
|
+
error: {
|
|
28241
|
+
code: "unsupported",
|
|
28242
|
+
message: "Checkpoint rollback is not supported by this Adapter",
|
|
28243
|
+
retryable: false
|
|
28244
|
+
}
|
|
28245
|
+
};
|
|
28246
|
+
}
|
|
28193
28247
|
try {
|
|
28194
28248
|
input = { ...input, cwd: fs7.realpathSync(input.cwd) };
|
|
28195
28249
|
} catch (error51) {
|
|
@@ -28238,19 +28292,19 @@ var V2Adapter = class {
|
|
|
28238
28292
|
if (input.kind !== "resume") {
|
|
28239
28293
|
const parent = info;
|
|
28240
28294
|
const turns = source.snapshot.turns;
|
|
28241
|
-
let
|
|
28295
|
+
let count3;
|
|
28242
28296
|
if (input.kind === "rollbackLastTurn") {
|
|
28243
28297
|
if (!turns.length)
|
|
28244
28298
|
throw new Error("OpenCode history is empty");
|
|
28245
|
-
|
|
28299
|
+
count3 = turns.length - 1;
|
|
28246
28300
|
} else {
|
|
28247
28301
|
if (input.checkpoint.harnessId !== harnessId || input.checkpoint.nativeSessionId !== info.id)
|
|
28248
28302
|
throw new Error("Checkpoint belongs to another Session");
|
|
28249
|
-
|
|
28250
|
-
if (!
|
|
28303
|
+
count3 = turns.findIndex((turn) => turn.checkpoint?.checkpointId === input.checkpoint.checkpointId) + 1;
|
|
28304
|
+
if (!count3 || JSON.stringify(turns[count3 - 1]?.checkpoint) !== JSON.stringify(input.checkpoint))
|
|
28251
28305
|
throw new Error("OpenCode checkpoint does not match native history");
|
|
28252
28306
|
}
|
|
28253
|
-
const before = turns[
|
|
28307
|
+
const before = turns[count3]?.nativeTurnRef.nativeTurnKey;
|
|
28254
28308
|
info = await client2.session.fork({ sessionID: parent.id, ...before ? { before } : {} });
|
|
28255
28309
|
if (info.id === parent.id)
|
|
28256
28310
|
throw new Error("OpenCode fork returned its source Session");
|
|
@@ -28265,7 +28319,7 @@ var V2Adapter = class {
|
|
|
28265
28319
|
await client2.session.switchModel({ sessionID: info.id, model: parent.model });
|
|
28266
28320
|
info = await client2.session.get({ sessionID: info.id });
|
|
28267
28321
|
const derived = await readHistory(client2, info, this.options.toolOutputLimit ?? 64e3);
|
|
28268
|
-
if (historyContent(derived.snapshot, false) !== historyContent({ turns: turns.slice(0,
|
|
28322
|
+
if (historyContent(derived.snapshot, false) !== historyContent({ turns: turns.slice(0, count3) }, false))
|
|
28269
28323
|
throw new Error("OpenCode fork did not preserve the exact history prefix");
|
|
28270
28324
|
if (!isDeepStrictEqual2(info.permissions ?? [], parent.permissions ?? []) || !isDeepStrictEqual2(info.model, parent.model))
|
|
28271
28325
|
throw new Error("OpenCode fork did not preserve the current configuration");
|