@liberseek/boft-cli-win32-arm64 0.8.4 → 0.8.6
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 +2 -2
- package/THIRD_PARTY_NOTICES.txt +6 -2
- package/app/codexhost-distribution.json +1 -1
- package/app/console-server.mjs +129 -28
- package/app/console-web.js +336 -78
- package/app/desktop-controller.mjs +1741 -60
- package/app/host-runtime.mjs +4983 -2002
- package/app/plugins/antigravity/plugin.mjs +423 -63
- package/app/plugins/claude-code/plugin.mjs +417 -264
- package/app/plugins/codebuddy/plugin.mjs +256 -134
- package/app/plugins/codex-usage/plugin.mjs +97 -32
- package/app/plugins/copilot/plugin.mjs +122 -57
- package/app/plugins/cursor-cli/plugin.mjs +236 -139
- package/app/plugins/deepseek-harness/plugin.mjs +584 -86
- package/app/plugins/devin/assets/icon.svg +1 -0
- package/app/plugins/devin/manifest.json +30 -0
- package/app/plugins/devin/plugin.mjs +23425 -0
- package/app/plugins/enabled.json +2 -0
- package/app/plugins/grok/plugin.mjs +839 -500
- package/app/plugins/hermes/plugin.mjs +522 -200
- package/app/plugins/kimi-code/plugin.mjs +134 -22
- package/app/plugins/kiro-cli/plugin.mjs +84 -19
- package/app/plugins/muse/plugin.mjs +74 -9
- package/app/plugins/omp/plugin.mjs +104 -39
- package/app/plugins/opencode/plugin.mjs +126 -61
- package/app/plugins/pi/plugin.mjs +1769 -468
- package/app/plugins/qoder/plugin.mjs +9617 -8682
- package/app/plugins/qoder-cn/plugin.mjs +9617 -8682
- package/app/plugins/qwen-code/assets/icon.svg +1 -0
- package/app/plugins/qwen-code/manifest.json +29 -0
- package/app/plugins/qwen-code/plugin.mjs +29366 -0
- package/app/plugins/workbuddy/plugin.mjs +256 -134
- package/app/plugins/zcode/plugin.mjs +265 -42
- package/app/renderer-extension.js +3286 -528
- package/bin/boft.exe +0 -0
- package/libexec/boft-node-repl.exe +0 -0
- package/libexec/boft-shim.exe +0 -0
- package/libexec/boft-updater.exe +0 -0
- package/licenses/Qwen-Code-SDK-LICENSE.txt +203 -0
- package/package.json +2 -2
|
@@ -3583,10 +3583,10 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
3583
3583
|
const shape = def.shape;
|
|
3584
3584
|
const propValues = {};
|
|
3585
3585
|
for (const key in shape) {
|
|
3586
|
-
const
|
|
3587
|
-
if (
|
|
3586
|
+
const field2 = shape[key]._zod;
|
|
3587
|
+
if (field2.values) {
|
|
3588
3588
|
propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
|
|
3589
|
-
for (const v of
|
|
3589
|
+
for (const v of field2.values)
|
|
3590
3590
|
propValues[key].add(v);
|
|
3591
3591
|
}
|
|
3592
3592
|
}
|
|
@@ -15226,6 +15226,8 @@ var usageStatisticsTotalsSchema = external_exports.strictObject({
|
|
|
15226
15226
|
cachedInputTokens: count,
|
|
15227
15227
|
cacheWriteInputTokens: count,
|
|
15228
15228
|
cacheKnownInputTokens: count,
|
|
15229
|
+
cacheHitCachedInputTokens: count,
|
|
15230
|
+
cacheHitInputTokens: count,
|
|
15229
15231
|
outputTokens: count,
|
|
15230
15232
|
reasoningOutputTokens: count,
|
|
15231
15233
|
/** USD at the public price, summed over the priced requests only. */
|
|
@@ -15333,6 +15335,51 @@ var hostInteractionIdSchema = opaqueIdSchema.brand();
|
|
|
15333
15335
|
var threadPrewarmDiscardParamsSchema = external_exports.object({ threadId: hostThreadIdSchema });
|
|
15334
15336
|
var threadPrewarmDiscardResultSchema = external_exports.object({ discarded: external_exports.boolean() });
|
|
15335
15337
|
|
|
15338
|
+
// ../../shared-contracts/dist/thread-questions.js
|
|
15339
|
+
var field = external_exports.discriminatedUnion("type", [
|
|
15340
|
+
external_exports.object({
|
|
15341
|
+
id: external_exports.string().min(1),
|
|
15342
|
+
type: external_exports.literal("choice"),
|
|
15343
|
+
prompt: external_exports.string(),
|
|
15344
|
+
options: external_exports.array(external_exports.object({
|
|
15345
|
+
value: external_exports.string().min(1),
|
|
15346
|
+
label: external_exports.string(),
|
|
15347
|
+
description: external_exports.string().optional()
|
|
15348
|
+
})).min(1),
|
|
15349
|
+
multiple: external_exports.boolean(),
|
|
15350
|
+
allowOther: external_exports.boolean(),
|
|
15351
|
+
optional: external_exports.boolean()
|
|
15352
|
+
}),
|
|
15353
|
+
external_exports.object({
|
|
15354
|
+
id: external_exports.string().min(1),
|
|
15355
|
+
type: external_exports.literal("text"),
|
|
15356
|
+
prompt: external_exports.string(),
|
|
15357
|
+
multiline: external_exports.boolean(),
|
|
15358
|
+
secret: external_exports.literal(false),
|
|
15359
|
+
optional: external_exports.boolean(),
|
|
15360
|
+
placeholder: external_exports.string().optional(),
|
|
15361
|
+
prefill: external_exports.string().optional()
|
|
15362
|
+
})
|
|
15363
|
+
]);
|
|
15364
|
+
var threadQuestionSchema = external_exports.object({
|
|
15365
|
+
interactionId: external_exports.string().min(1),
|
|
15366
|
+
turnId: external_exports.string().min(1),
|
|
15367
|
+
title: external_exports.string().optional(),
|
|
15368
|
+
questions: external_exports.array(field).min(1)
|
|
15369
|
+
}).refine(({ questions }) => questions.some((q) => q.type === "choice" && q.multiple), {
|
|
15370
|
+
message: "Shared cards require at least one multi-select question"
|
|
15371
|
+
});
|
|
15372
|
+
var threadQuestionsListParamsSchema = external_exports.strictObject({ threadId: external_exports.string().min(1) });
|
|
15373
|
+
var threadQuestionsResultSchema = external_exports.object({ questions: external_exports.array(threadQuestionSchema) });
|
|
15374
|
+
var threadQuestionRespondParamsSchema = external_exports.strictObject({
|
|
15375
|
+
threadId: external_exports.string().min(1),
|
|
15376
|
+
turnId: external_exports.string().min(1),
|
|
15377
|
+
interactionId: external_exports.string().min(1),
|
|
15378
|
+
answers: external_exports.record(external_exports.string(), external_exports.array(external_exports.string())),
|
|
15379
|
+
cancelled: external_exports.boolean().default(false)
|
|
15380
|
+
});
|
|
15381
|
+
var threadQuestionRespondResultSchema = external_exports.object({ accepted: external_exports.literal(true) });
|
|
15382
|
+
|
|
15336
15383
|
// ../../shared-contracts/dist/harness-plugins.js
|
|
15337
15384
|
var HARNESS_PLUGIN_MANIFEST_MAX_BYTES = 32 * 1024;
|
|
15338
15385
|
var HARNESS_PLUGIN_ICON_MAX_BYTES = 128 * 1024;
|
|
@@ -16092,6 +16139,21 @@ var threadSteeringInspectParamsSchema = external_exports.object({
|
|
|
16092
16139
|
/** The text about to be steered; a Harness command always stops and restarts. */
|
|
16093
16140
|
text: external_exports.string().optional()
|
|
16094
16141
|
}).strict();
|
|
16142
|
+
var threadSteeringContextSchema = external_exports.object({
|
|
16143
|
+
kind: external_exports.literal("application"),
|
|
16144
|
+
value: external_exports.string().transform((text, context) => {
|
|
16145
|
+
try {
|
|
16146
|
+
return JSON.parse(text);
|
|
16147
|
+
} catch {
|
|
16148
|
+
context.addIssue({ code: "custom", message: "Invalid steering context JSON" });
|
|
16149
|
+
return external_exports.NEVER;
|
|
16150
|
+
}
|
|
16151
|
+
}).pipe(external_exports.object({
|
|
16152
|
+
expectedTurnId: hostTurnIdSchema,
|
|
16153
|
+
clientUserMessageId: external_exports.string().min(1),
|
|
16154
|
+
delivery: external_exports.enum(["newTurn", "activeTurn"])
|
|
16155
|
+
}).strict())
|
|
16156
|
+
}).strict().transform((context) => context.value);
|
|
16095
16157
|
var threadSteerDeliverySchema = external_exports.enum(["activeTurn", "newTurn"]);
|
|
16096
16158
|
var threadSteeringInspectResultSchema = external_exports.object({
|
|
16097
16159
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
@@ -16102,7 +16164,10 @@ var harnessPluginRouteSchema = external_exports.object({
|
|
|
16102
16164
|
harnessId: harnessPluginIdSchema,
|
|
16103
16165
|
model: harnessModelRefSchema.optional(),
|
|
16104
16166
|
thinkingOptionId: harnessThinkingOptionIdSchema.optional(),
|
|
16105
|
-
permissionModeId: harnessPermissionModeIdSchema.optional()
|
|
16167
|
+
permissionModeId: harnessPermissionModeIdSchema.optional(),
|
|
16168
|
+
/** A draft prewarm create: stays unsubmitted until the user's first Turn.
|
|
16169
|
+
* Desktop forwards only the Model of a main-process prewarm to thread/start. */
|
|
16170
|
+
prewarm: external_exports.literal(true).optional()
|
|
16106
16171
|
}).strict();
|
|
16107
16172
|
|
|
16108
16173
|
// ../../shared-contracts/dist/harness-launch-settings.js
|
|
@@ -17029,26 +17094,26 @@ function parseHostUsage(value) {
|
|
|
17029
17094
|
}
|
|
17030
17095
|
}
|
|
17031
17096
|
const indicators = value.composerIndicators === void 0 ? {} : { composerIndicators: composerIndicatorsSchema.parse(value.composerIndicators) };
|
|
17032
|
-
for (const
|
|
17097
|
+
for (const field2 of [
|
|
17033
17098
|
"totalCredits",
|
|
17034
17099
|
"contextUsagePercent",
|
|
17035
17100
|
"apiOutputTokensPerSecond"
|
|
17036
17101
|
]) {
|
|
17037
|
-
const candidate = value[
|
|
17102
|
+
const candidate = value[field2];
|
|
17038
17103
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
|
|
17039
|
-
throw new Error(`Harness Usage '${
|
|
17104
|
+
throw new Error(`Harness Usage '${field2}' must be a finite non-negative number`);
|
|
17040
17105
|
}
|
|
17041
17106
|
}
|
|
17042
|
-
for (const
|
|
17043
|
-
const candidate = value[
|
|
17107
|
+
for (const field2 of tokenFields) {
|
|
17108
|
+
const candidate = value[field2];
|
|
17044
17109
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
|
|
17045
|
-
throw new Error(`Harness Usage '${
|
|
17110
|
+
throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
|
|
17046
17111
|
}
|
|
17047
17112
|
}
|
|
17048
|
-
for (const
|
|
17049
|
-
const candidate = value[
|
|
17113
|
+
for (const field2 of safeIntegerFields) {
|
|
17114
|
+
const candidate = value[field2];
|
|
17050
17115
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
|
|
17051
|
-
throw new Error(`Harness Usage '${
|
|
17116
|
+
throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
|
|
17052
17117
|
}
|
|
17053
17118
|
}
|
|
17054
17119
|
if (value.outputTokensPerSecond !== void 0 && (typeof value.outputTokensPerSecond !== "number" || !Number.isFinite(value.outputTokensPerSecond) || value.outputTokensPerSecond < 0)) {
|
|
@@ -17057,16 +17122,16 @@ function parseHostUsage(value) {
|
|
|
17057
17122
|
if (value.totalCostUsd !== void 0 && (typeof value.totalCostUsd !== "number" || !Number.isFinite(value.totalCostUsd) || value.totalCostUsd < 0)) {
|
|
17058
17123
|
throw new Error("Harness Usage 'totalCostUsd' must be a finite non-negative number");
|
|
17059
17124
|
}
|
|
17060
|
-
for (const
|
|
17061
|
-
const candidate = value[
|
|
17125
|
+
for (const field2 of ["totalCredits", "contextUsagePercent"]) {
|
|
17126
|
+
const candidate = value[field2];
|
|
17062
17127
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
|
|
17063
|
-
throw new Error(`Harness Usage '${
|
|
17128
|
+
throw new Error(`Harness Usage '${field2}' must be a finite non-negative number`);
|
|
17064
17129
|
}
|
|
17065
17130
|
}
|
|
17066
|
-
for (const
|
|
17067
|
-
const candidate = value[
|
|
17131
|
+
for (const field2 of percentFields) {
|
|
17132
|
+
const candidate = value[field2];
|
|
17068
17133
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0 || candidate > 100)) {
|
|
17069
|
-
throw new Error(`Harness Usage '${
|
|
17134
|
+
throw new Error(`Harness Usage '${field2}' must be between 0 and 100`);
|
|
17070
17135
|
}
|
|
17071
17136
|
}
|
|
17072
17137
|
if (value.sessionCacheUsage !== void 0) {
|
|
@@ -17137,19 +17202,19 @@ function parseHostUsageRequest(value) {
|
|
|
17137
17202
|
if (typeof value.requestId !== "string" || value.requestId.length === 0) {
|
|
17138
17203
|
throw new Error("Harness Usage request 'requestId' must be a non-empty string");
|
|
17139
17204
|
}
|
|
17140
|
-
for (const
|
|
17141
|
-
const candidate = value[
|
|
17205
|
+
for (const field2 of ["model", "provider"]) {
|
|
17206
|
+
const candidate = value[field2];
|
|
17142
17207
|
if (candidate !== void 0 && (typeof candidate !== "string" || candidate.length === 0)) {
|
|
17143
|
-
throw new Error(`Harness Usage request '${
|
|
17208
|
+
throw new Error(`Harness Usage request '${field2}' must be a non-empty string`);
|
|
17144
17209
|
}
|
|
17145
17210
|
}
|
|
17146
17211
|
if (value.historical !== void 0 && typeof value.historical !== "boolean") {
|
|
17147
17212
|
throw new Error("Harness Usage request 'historical' must be a boolean");
|
|
17148
17213
|
}
|
|
17149
|
-
for (const
|
|
17150
|
-
const candidate = value[
|
|
17214
|
+
for (const field2 of requestTokenFields) {
|
|
17215
|
+
const candidate = value[field2];
|
|
17151
17216
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
|
|
17152
|
-
throw new Error(`Harness Usage request '${
|
|
17217
|
+
throw new Error(`Harness Usage request '${field2}' must be a non-negative safe integer`);
|
|
17153
17218
|
}
|
|
17154
17219
|
}
|
|
17155
17220
|
if (value.inputTokens === void 0 || value.outputTokens === void 0) {
|
|
@@ -20527,9 +20592,9 @@ function outputText(output) {
|
|
|
20527
20592
|
function stringField2(value, key) {
|
|
20528
20593
|
if (!isRecord10(value))
|
|
20529
20594
|
return void 0;
|
|
20530
|
-
const
|
|
20531
|
-
if (typeof
|
|
20532
|
-
return
|
|
20595
|
+
const field2 = value[key];
|
|
20596
|
+
if (typeof field2 === "string" && field2.length > 0)
|
|
20597
|
+
return field2;
|
|
20533
20598
|
if (isRecord10(value.input)) {
|
|
20534
20599
|
const nested = value.input[key];
|
|
20535
20600
|
if (typeof nested === "string" && nested.length > 0)
|
|
@@ -20545,8 +20610,8 @@ function stringField2(value, key) {
|
|
|
20545
20610
|
function numberField(value, key) {
|
|
20546
20611
|
if (!isRecord10(value))
|
|
20547
20612
|
return void 0;
|
|
20548
|
-
const
|
|
20549
|
-
return typeof
|
|
20613
|
+
const field2 = value[key];
|
|
20614
|
+
return typeof field2 === "number" || field2 === null ? field2 : void 0;
|
|
20550
20615
|
}
|
|
20551
20616
|
function stripDiffPrefix(pathString) {
|
|
20552
20617
|
if (typeof pathString !== "string" || pathString.length === 0)
|
|
@@ -20585,9 +20650,9 @@ function nestedToolString(value, keys) {
|
|
|
20585
20650
|
if (!isRecord10(value))
|
|
20586
20651
|
return void 0;
|
|
20587
20652
|
for (const key of keys) {
|
|
20588
|
-
const
|
|
20589
|
-
if (typeof
|
|
20590
|
-
return
|
|
20653
|
+
const field2 = value[key];
|
|
20654
|
+
if (typeof field2 === "string" && field2.length > 0)
|
|
20655
|
+
return field2;
|
|
20591
20656
|
}
|
|
20592
20657
|
for (const wrapper of ["input", "arguments", "params", "details"]) {
|
|
20593
20658
|
const nested = nestedToolString(value[wrapper], keys);
|
|
@@ -20600,15 +20665,15 @@ function patchFromResult(result) {
|
|
|
20600
20665
|
if (!isRecord10(result))
|
|
20601
20666
|
return void 0;
|
|
20602
20667
|
for (const key of ["patch", "diff", "unifiedDiff"]) {
|
|
20603
|
-
const
|
|
20604
|
-
if (typeof
|
|
20605
|
-
return
|
|
20668
|
+
const field2 = result[key];
|
|
20669
|
+
if (typeof field2 === "string" && field2.length > 0)
|
|
20670
|
+
return field2;
|
|
20606
20671
|
}
|
|
20607
20672
|
if (isRecord10(result.details)) {
|
|
20608
20673
|
for (const key of ["patch", "diff", "unifiedDiff"]) {
|
|
20609
|
-
const
|
|
20610
|
-
if (typeof
|
|
20611
|
-
return
|
|
20674
|
+
const field2 = result.details[key];
|
|
20675
|
+
if (typeof field2 === "string" && field2.length > 0)
|
|
20676
|
+
return field2;
|
|
20612
20677
|
}
|
|
20613
20678
|
}
|
|
20614
20679
|
return void 0;
|
|
@@ -3580,10 +3580,10 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
3580
3580
|
const shape = def.shape;
|
|
3581
3581
|
const propValues = {};
|
|
3582
3582
|
for (const key in shape) {
|
|
3583
|
-
const
|
|
3584
|
-
if (
|
|
3583
|
+
const field2 = shape[key]._zod;
|
|
3584
|
+
if (field2.values) {
|
|
3585
3585
|
propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
|
|
3586
|
-
for (const v of
|
|
3586
|
+
for (const v of field2.values)
|
|
3587
3587
|
propValues[key].add(v);
|
|
3588
3588
|
}
|
|
3589
3589
|
}
|
|
@@ -15223,6 +15223,8 @@ var usageStatisticsTotalsSchema = external_exports.strictObject({
|
|
|
15223
15223
|
cachedInputTokens: count,
|
|
15224
15224
|
cacheWriteInputTokens: count,
|
|
15225
15225
|
cacheKnownInputTokens: count,
|
|
15226
|
+
cacheHitCachedInputTokens: count,
|
|
15227
|
+
cacheHitInputTokens: count,
|
|
15226
15228
|
outputTokens: count,
|
|
15227
15229
|
reasoningOutputTokens: count,
|
|
15228
15230
|
/** USD at the public price, summed over the priced requests only. */
|
|
@@ -15330,6 +15332,51 @@ var hostInteractionIdSchema = opaqueIdSchema.brand();
|
|
|
15330
15332
|
var threadPrewarmDiscardParamsSchema = external_exports.object({ threadId: hostThreadIdSchema });
|
|
15331
15333
|
var threadPrewarmDiscardResultSchema = external_exports.object({ discarded: external_exports.boolean() });
|
|
15332
15334
|
|
|
15335
|
+
// ../../shared-contracts/dist/thread-questions.js
|
|
15336
|
+
var field = external_exports.discriminatedUnion("type", [
|
|
15337
|
+
external_exports.object({
|
|
15338
|
+
id: external_exports.string().min(1),
|
|
15339
|
+
type: external_exports.literal("choice"),
|
|
15340
|
+
prompt: external_exports.string(),
|
|
15341
|
+
options: external_exports.array(external_exports.object({
|
|
15342
|
+
value: external_exports.string().min(1),
|
|
15343
|
+
label: external_exports.string(),
|
|
15344
|
+
description: external_exports.string().optional()
|
|
15345
|
+
})).min(1),
|
|
15346
|
+
multiple: external_exports.boolean(),
|
|
15347
|
+
allowOther: external_exports.boolean(),
|
|
15348
|
+
optional: external_exports.boolean()
|
|
15349
|
+
}),
|
|
15350
|
+
external_exports.object({
|
|
15351
|
+
id: external_exports.string().min(1),
|
|
15352
|
+
type: external_exports.literal("text"),
|
|
15353
|
+
prompt: external_exports.string(),
|
|
15354
|
+
multiline: external_exports.boolean(),
|
|
15355
|
+
secret: external_exports.literal(false),
|
|
15356
|
+
optional: external_exports.boolean(),
|
|
15357
|
+
placeholder: external_exports.string().optional(),
|
|
15358
|
+
prefill: external_exports.string().optional()
|
|
15359
|
+
})
|
|
15360
|
+
]);
|
|
15361
|
+
var threadQuestionSchema = external_exports.object({
|
|
15362
|
+
interactionId: external_exports.string().min(1),
|
|
15363
|
+
turnId: external_exports.string().min(1),
|
|
15364
|
+
title: external_exports.string().optional(),
|
|
15365
|
+
questions: external_exports.array(field).min(1)
|
|
15366
|
+
}).refine(({ questions }) => questions.some((q) => q.type === "choice" && q.multiple), {
|
|
15367
|
+
message: "Shared cards require at least one multi-select question"
|
|
15368
|
+
});
|
|
15369
|
+
var threadQuestionsListParamsSchema = external_exports.strictObject({ threadId: external_exports.string().min(1) });
|
|
15370
|
+
var threadQuestionsResultSchema = external_exports.object({ questions: external_exports.array(threadQuestionSchema) });
|
|
15371
|
+
var threadQuestionRespondParamsSchema = external_exports.strictObject({
|
|
15372
|
+
threadId: external_exports.string().min(1),
|
|
15373
|
+
turnId: external_exports.string().min(1),
|
|
15374
|
+
interactionId: external_exports.string().min(1),
|
|
15375
|
+
answers: external_exports.record(external_exports.string(), external_exports.array(external_exports.string())),
|
|
15376
|
+
cancelled: external_exports.boolean().default(false)
|
|
15377
|
+
});
|
|
15378
|
+
var threadQuestionRespondResultSchema = external_exports.object({ accepted: external_exports.literal(true) });
|
|
15379
|
+
|
|
15333
15380
|
// ../../shared-contracts/dist/harness-plugins.js
|
|
15334
15381
|
var HARNESS_PLUGIN_MANIFEST_MAX_BYTES = 32 * 1024;
|
|
15335
15382
|
var HARNESS_PLUGIN_ICON_MAX_BYTES = 128 * 1024;
|
|
@@ -16089,6 +16136,21 @@ var threadSteeringInspectParamsSchema = external_exports.object({
|
|
|
16089
16136
|
/** The text about to be steered; a Harness command always stops and restarts. */
|
|
16090
16137
|
text: external_exports.string().optional()
|
|
16091
16138
|
}).strict();
|
|
16139
|
+
var threadSteeringContextSchema = external_exports.object({
|
|
16140
|
+
kind: external_exports.literal("application"),
|
|
16141
|
+
value: external_exports.string().transform((text, context) => {
|
|
16142
|
+
try {
|
|
16143
|
+
return JSON.parse(text);
|
|
16144
|
+
} catch {
|
|
16145
|
+
context.addIssue({ code: "custom", message: "Invalid steering context JSON" });
|
|
16146
|
+
return external_exports.NEVER;
|
|
16147
|
+
}
|
|
16148
|
+
}).pipe(external_exports.object({
|
|
16149
|
+
expectedTurnId: hostTurnIdSchema,
|
|
16150
|
+
clientUserMessageId: external_exports.string().min(1),
|
|
16151
|
+
delivery: external_exports.enum(["newTurn", "activeTurn"])
|
|
16152
|
+
}).strict())
|
|
16153
|
+
}).strict().transform((context) => context.value);
|
|
16092
16154
|
var threadSteerDeliverySchema = external_exports.enum(["activeTurn", "newTurn"]);
|
|
16093
16155
|
var threadSteeringInspectResultSchema = external_exports.object({
|
|
16094
16156
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
@@ -16099,7 +16161,10 @@ var harnessPluginRouteSchema = external_exports.object({
|
|
|
16099
16161
|
harnessId: harnessPluginIdSchema,
|
|
16100
16162
|
model: harnessModelRefSchema.optional(),
|
|
16101
16163
|
thinkingOptionId: harnessThinkingOptionIdSchema.optional(),
|
|
16102
|
-
permissionModeId: harnessPermissionModeIdSchema.optional()
|
|
16164
|
+
permissionModeId: harnessPermissionModeIdSchema.optional(),
|
|
16165
|
+
/** A draft prewarm create: stays unsubmitted until the user's first Turn.
|
|
16166
|
+
* Desktop forwards only the Model of a main-process prewarm to thread/start. */
|
|
16167
|
+
prewarm: external_exports.literal(true).optional()
|
|
16103
16168
|
}).strict();
|
|
16104
16169
|
|
|
16105
16170
|
// ../../shared-contracts/dist/harness-launch-settings.js
|
|
@@ -16710,26 +16775,26 @@ function parseHostUsage(value) {
|
|
|
16710
16775
|
}
|
|
16711
16776
|
}
|
|
16712
16777
|
const indicators = value.composerIndicators === void 0 ? {} : { composerIndicators: composerIndicatorsSchema.parse(value.composerIndicators) };
|
|
16713
|
-
for (const
|
|
16778
|
+
for (const field2 of [
|
|
16714
16779
|
"totalCredits",
|
|
16715
16780
|
"contextUsagePercent",
|
|
16716
16781
|
"apiOutputTokensPerSecond"
|
|
16717
16782
|
]) {
|
|
16718
|
-
const candidate2 = value[
|
|
16783
|
+
const candidate2 = value[field2];
|
|
16719
16784
|
if (candidate2 !== void 0 && (typeof candidate2 !== "number" || !Number.isFinite(candidate2) || candidate2 < 0)) {
|
|
16720
|
-
throw new Error(`Harness Usage '${
|
|
16785
|
+
throw new Error(`Harness Usage '${field2}' must be a finite non-negative number`);
|
|
16721
16786
|
}
|
|
16722
16787
|
}
|
|
16723
|
-
for (const
|
|
16724
|
-
const candidate2 = value[
|
|
16788
|
+
for (const field2 of tokenFields) {
|
|
16789
|
+
const candidate2 = value[field2];
|
|
16725
16790
|
if (candidate2 !== void 0 && (typeof candidate2 !== "number" || !Number.isSafeInteger(candidate2) || candidate2 < 0)) {
|
|
16726
|
-
throw new Error(`Harness Usage '${
|
|
16791
|
+
throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
|
|
16727
16792
|
}
|
|
16728
16793
|
}
|
|
16729
|
-
for (const
|
|
16730
|
-
const candidate2 = value[
|
|
16794
|
+
for (const field2 of safeIntegerFields) {
|
|
16795
|
+
const candidate2 = value[field2];
|
|
16731
16796
|
if (candidate2 !== void 0 && (typeof candidate2 !== "number" || !Number.isSafeInteger(candidate2) || candidate2 < 0)) {
|
|
16732
|
-
throw new Error(`Harness Usage '${
|
|
16797
|
+
throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
|
|
16733
16798
|
}
|
|
16734
16799
|
}
|
|
16735
16800
|
if (value.outputTokensPerSecond !== void 0 && (typeof value.outputTokensPerSecond !== "number" || !Number.isFinite(value.outputTokensPerSecond) || value.outputTokensPerSecond < 0)) {
|
|
@@ -16738,16 +16803,16 @@ function parseHostUsage(value) {
|
|
|
16738
16803
|
if (value.totalCostUsd !== void 0 && (typeof value.totalCostUsd !== "number" || !Number.isFinite(value.totalCostUsd) || value.totalCostUsd < 0)) {
|
|
16739
16804
|
throw new Error("Harness Usage 'totalCostUsd' must be a finite non-negative number");
|
|
16740
16805
|
}
|
|
16741
|
-
for (const
|
|
16742
|
-
const candidate2 = value[
|
|
16806
|
+
for (const field2 of ["totalCredits", "contextUsagePercent"]) {
|
|
16807
|
+
const candidate2 = value[field2];
|
|
16743
16808
|
if (candidate2 !== void 0 && (typeof candidate2 !== "number" || !Number.isFinite(candidate2) || candidate2 < 0)) {
|
|
16744
|
-
throw new Error(`Harness Usage '${
|
|
16809
|
+
throw new Error(`Harness Usage '${field2}' must be a finite non-negative number`);
|
|
16745
16810
|
}
|
|
16746
16811
|
}
|
|
16747
|
-
for (const
|
|
16748
|
-
const candidate2 = value[
|
|
16812
|
+
for (const field2 of percentFields) {
|
|
16813
|
+
const candidate2 = value[field2];
|
|
16749
16814
|
if (candidate2 !== void 0 && (typeof candidate2 !== "number" || !Number.isFinite(candidate2) || candidate2 < 0 || candidate2 > 100)) {
|
|
16750
|
-
throw new Error(`Harness Usage '${
|
|
16815
|
+
throw new Error(`Harness Usage '${field2}' must be between 0 and 100`);
|
|
16751
16816
|
}
|
|
16752
16817
|
}
|
|
16753
16818
|
if (value.sessionCacheUsage !== void 0) {
|
|
@@ -16818,19 +16883,19 @@ function parseHostUsageRequest(value) {
|
|
|
16818
16883
|
if (typeof value.requestId !== "string" || value.requestId.length === 0) {
|
|
16819
16884
|
throw new Error("Harness Usage request 'requestId' must be a non-empty string");
|
|
16820
16885
|
}
|
|
16821
|
-
for (const
|
|
16822
|
-
const candidate2 = value[
|
|
16886
|
+
for (const field2 of ["model", "provider"]) {
|
|
16887
|
+
const candidate2 = value[field2];
|
|
16823
16888
|
if (candidate2 !== void 0 && (typeof candidate2 !== "string" || candidate2.length === 0)) {
|
|
16824
|
-
throw new Error(`Harness Usage request '${
|
|
16889
|
+
throw new Error(`Harness Usage request '${field2}' must be a non-empty string`);
|
|
16825
16890
|
}
|
|
16826
16891
|
}
|
|
16827
16892
|
if (value.historical !== void 0 && typeof value.historical !== "boolean") {
|
|
16828
16893
|
throw new Error("Harness Usage request 'historical' must be a boolean");
|
|
16829
16894
|
}
|
|
16830
|
-
for (const
|
|
16831
|
-
const candidate2 = value[
|
|
16895
|
+
for (const field2 of requestTokenFields) {
|
|
16896
|
+
const candidate2 = value[field2];
|
|
16832
16897
|
if (candidate2 !== void 0 && (typeof candidate2 !== "number" || !Number.isSafeInteger(candidate2) || candidate2 < 0)) {
|
|
16833
|
-
throw new Error(`Harness Usage request '${
|
|
16898
|
+
throw new Error(`Harness Usage request '${field2}' must be a non-negative safe integer`);
|
|
16834
16899
|
}
|
|
16835
16900
|
}
|
|
16836
16901
|
if (value.inputTokens === void 0 || value.outputTokens === void 0) {
|
|
@@ -18224,24 +18289,24 @@ var buildClientParams = (args, fields) => {
|
|
|
18224
18289
|
}
|
|
18225
18290
|
if ("in" in config2) {
|
|
18226
18291
|
if (config2.key) {
|
|
18227
|
-
const
|
|
18228
|
-
const name =
|
|
18229
|
-
if (
|
|
18292
|
+
const field2 = map2.get(config2.key);
|
|
18293
|
+
const name = field2.map || config2.key;
|
|
18294
|
+
if (field2.in) {
|
|
18230
18295
|
;
|
|
18231
|
-
params[
|
|
18296
|
+
params[field2.in][name] = arg;
|
|
18232
18297
|
}
|
|
18233
18298
|
} else {
|
|
18234
18299
|
params.body = arg;
|
|
18235
18300
|
}
|
|
18236
18301
|
} else {
|
|
18237
18302
|
for (const [key, value] of Object.entries(arg ?? {})) {
|
|
18238
|
-
const
|
|
18239
|
-
if (
|
|
18240
|
-
if (
|
|
18241
|
-
const name =
|
|
18242
|
-
params[
|
|
18303
|
+
const field2 = map2.get(key);
|
|
18304
|
+
if (field2) {
|
|
18305
|
+
if (field2.in) {
|
|
18306
|
+
const name = field2.map || key;
|
|
18307
|
+
params[field2.in][name] = value;
|
|
18243
18308
|
} else {
|
|
18244
|
-
params[
|
|
18309
|
+
params[field2.map] = value;
|
|
18245
18310
|
}
|
|
18246
18311
|
} else {
|
|
18247
18312
|
const extra = extraPrefixes.find(([prefix]) => key.startsWith(prefix));
|
|
@@ -24378,8 +24443,8 @@ var OpenCodeHarnessSession = class {
|
|
|
24378
24443
|
this.#event({ type: "item.started", turnId: active.turnId, item });
|
|
24379
24444
|
}
|
|
24380
24445
|
}
|
|
24381
|
-
#appendPartDelta(active, partID,
|
|
24382
|
-
if (
|
|
24446
|
+
#appendPartDelta(active, partID, field2, delta) {
|
|
24447
|
+
if (field2 !== "text" || !delta)
|
|
24383
24448
|
return;
|
|
24384
24449
|
const existing = active.items.get(partID);
|
|
24385
24450
|
if (!existing)
|
|
@@ -27374,16 +27439,16 @@ function permissionInteraction(request, turnId) {
|
|
|
27374
27439
|
};
|
|
27375
27440
|
}
|
|
27376
27441
|
function formInteraction(form, turnId) {
|
|
27377
|
-
const questions = form.fields.map((
|
|
27378
|
-
if (
|
|
27442
|
+
const questions = form.fields.map((field2) => {
|
|
27443
|
+
if (field2.type === "external" || field2.hidden || field2.when?.length) {
|
|
27379
27444
|
throw new Error("OpenCode v2 external, hidden or conditional form fields require its native UI");
|
|
27380
27445
|
}
|
|
27381
27446
|
const base = {
|
|
27382
|
-
id:
|
|
27383
|
-
prompt: [
|
|
27384
|
-
optional: !
|
|
27447
|
+
id: field2.key,
|
|
27448
|
+
prompt: [field2.title, field2.description].filter(Boolean).join("\n") || field2.key,
|
|
27449
|
+
optional: !field2.required
|
|
27385
27450
|
};
|
|
27386
|
-
if (
|
|
27451
|
+
if (field2.type === "boolean")
|
|
27387
27452
|
return {
|
|
27388
27453
|
...base,
|
|
27389
27454
|
type: "choice",
|
|
@@ -27394,22 +27459,22 @@ function formInteraction(form, turnId) {
|
|
|
27394
27459
|
{ value: "false", label: "No" }
|
|
27395
27460
|
]
|
|
27396
27461
|
};
|
|
27397
|
-
if (
|
|
27462
|
+
if (field2.type === "multiselect" || field2.type === "string" && field2.options?.length) {
|
|
27398
27463
|
return {
|
|
27399
27464
|
...base,
|
|
27400
27465
|
type: "choice",
|
|
27401
|
-
multiple:
|
|
27402
|
-
allowOther:
|
|
27403
|
-
options:
|
|
27466
|
+
multiple: field2.type === "multiselect",
|
|
27467
|
+
allowOther: field2.custom ?? false,
|
|
27468
|
+
options: field2.options ?? []
|
|
27404
27469
|
};
|
|
27405
27470
|
}
|
|
27406
27471
|
return {
|
|
27407
27472
|
...base,
|
|
27408
27473
|
type: "text",
|
|
27409
|
-
multiline:
|
|
27474
|
+
multiline: field2.type === "string",
|
|
27410
27475
|
secret: false,
|
|
27411
|
-
...
|
|
27412
|
-
...
|
|
27476
|
+
...field2.type === "string" && field2.placeholder ? { placeholder: field2.placeholder } : {},
|
|
27477
|
+
...field2.default !== void 0 ? { prefill: String(field2.default) } : {}
|
|
27413
27478
|
};
|
|
27414
27479
|
});
|
|
27415
27480
|
return {
|
|
@@ -27452,24 +27517,24 @@ async function replyInteraction(client2, pending, command) {
|
|
|
27452
27517
|
return;
|
|
27453
27518
|
}
|
|
27454
27519
|
const answer = {};
|
|
27455
|
-
for (const
|
|
27456
|
-
const values = command.response.answers[
|
|
27520
|
+
for (const field2 of form.fields) {
|
|
27521
|
+
const values = command.response.answers[field2.key] ?? [];
|
|
27457
27522
|
if (!values.length)
|
|
27458
27523
|
continue;
|
|
27459
27524
|
const value = values[0];
|
|
27460
27525
|
if (value === void 0)
|
|
27461
27526
|
continue;
|
|
27462
|
-
if (
|
|
27463
|
-
answer[
|
|
27464
|
-
else if (
|
|
27465
|
-
answer[
|
|
27466
|
-
else if (
|
|
27527
|
+
if (field2.type === "multiselect")
|
|
27528
|
+
answer[field2.key] = values;
|
|
27529
|
+
else if (field2.type === "boolean")
|
|
27530
|
+
answer[field2.key] = value === "true";
|
|
27531
|
+
else if (field2.type === "number" || field2.type === "integer") {
|
|
27467
27532
|
const number4 = Number(value);
|
|
27468
|
-
if (!value.trim() || !Number.isFinite(number4) ||
|
|
27469
|
-
throw new Error(`Invalid number for ${
|
|
27470
|
-
answer[
|
|
27533
|
+
if (!value.trim() || !Number.isFinite(number4) || field2.type === "integer" && !Number.isInteger(number4))
|
|
27534
|
+
throw new Error(`Invalid number for ${field2.key}`);
|
|
27535
|
+
answer[field2.key] = number4;
|
|
27471
27536
|
} else
|
|
27472
|
-
answer[
|
|
27537
|
+
answer[field2.key] = value;
|
|
27473
27538
|
}
|
|
27474
27539
|
await client2.session.form.reply({ sessionID: form.sessionID, formID: form.id, answer });
|
|
27475
27540
|
}
|