@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
|
@@ -3521,10 +3521,10 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
3521
3521
|
const shape = def.shape;
|
|
3522
3522
|
const propValues = {};
|
|
3523
3523
|
for (const key in shape) {
|
|
3524
|
-
const
|
|
3525
|
-
if (
|
|
3524
|
+
const field2 = shape[key]._zod;
|
|
3525
|
+
if (field2.values) {
|
|
3526
3526
|
propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
|
|
3527
|
-
for (const v of
|
|
3527
|
+
for (const v of field2.values)
|
|
3528
3528
|
propValues[key].add(v);
|
|
3529
3529
|
}
|
|
3530
3530
|
}
|
|
@@ -15164,6 +15164,8 @@ var usageStatisticsTotalsSchema = external_exports.strictObject({
|
|
|
15164
15164
|
cachedInputTokens: count,
|
|
15165
15165
|
cacheWriteInputTokens: count,
|
|
15166
15166
|
cacheKnownInputTokens: count,
|
|
15167
|
+
cacheHitCachedInputTokens: count,
|
|
15168
|
+
cacheHitInputTokens: count,
|
|
15167
15169
|
outputTokens: count,
|
|
15168
15170
|
reasoningOutputTokens: count,
|
|
15169
15171
|
/** USD at the public price, summed over the priced requests only. */
|
|
@@ -15271,6 +15273,51 @@ var hostInteractionIdSchema = opaqueIdSchema.brand();
|
|
|
15271
15273
|
var threadPrewarmDiscardParamsSchema = external_exports.object({ threadId: hostThreadIdSchema });
|
|
15272
15274
|
var threadPrewarmDiscardResultSchema = external_exports.object({ discarded: external_exports.boolean() });
|
|
15273
15275
|
|
|
15276
|
+
// ../../shared-contracts/dist/thread-questions.js
|
|
15277
|
+
var field = external_exports.discriminatedUnion("type", [
|
|
15278
|
+
external_exports.object({
|
|
15279
|
+
id: external_exports.string().min(1),
|
|
15280
|
+
type: external_exports.literal("choice"),
|
|
15281
|
+
prompt: external_exports.string(),
|
|
15282
|
+
options: external_exports.array(external_exports.object({
|
|
15283
|
+
value: external_exports.string().min(1),
|
|
15284
|
+
label: external_exports.string(),
|
|
15285
|
+
description: external_exports.string().optional()
|
|
15286
|
+
})).min(1),
|
|
15287
|
+
multiple: external_exports.boolean(),
|
|
15288
|
+
allowOther: external_exports.boolean(),
|
|
15289
|
+
optional: external_exports.boolean()
|
|
15290
|
+
}),
|
|
15291
|
+
external_exports.object({
|
|
15292
|
+
id: external_exports.string().min(1),
|
|
15293
|
+
type: external_exports.literal("text"),
|
|
15294
|
+
prompt: external_exports.string(),
|
|
15295
|
+
multiline: external_exports.boolean(),
|
|
15296
|
+
secret: external_exports.literal(false),
|
|
15297
|
+
optional: external_exports.boolean(),
|
|
15298
|
+
placeholder: external_exports.string().optional(),
|
|
15299
|
+
prefill: external_exports.string().optional()
|
|
15300
|
+
})
|
|
15301
|
+
]);
|
|
15302
|
+
var threadQuestionSchema = external_exports.object({
|
|
15303
|
+
interactionId: external_exports.string().min(1),
|
|
15304
|
+
turnId: external_exports.string().min(1),
|
|
15305
|
+
title: external_exports.string().optional(),
|
|
15306
|
+
questions: external_exports.array(field).min(1)
|
|
15307
|
+
}).refine(({ questions }) => questions.some((q) => q.type === "choice" && q.multiple), {
|
|
15308
|
+
message: "Shared cards require at least one multi-select question"
|
|
15309
|
+
});
|
|
15310
|
+
var threadQuestionsListParamsSchema = external_exports.strictObject({ threadId: external_exports.string().min(1) });
|
|
15311
|
+
var threadQuestionsResultSchema = external_exports.object({ questions: external_exports.array(threadQuestionSchema) });
|
|
15312
|
+
var threadQuestionRespondParamsSchema = external_exports.strictObject({
|
|
15313
|
+
threadId: external_exports.string().min(1),
|
|
15314
|
+
turnId: external_exports.string().min(1),
|
|
15315
|
+
interactionId: external_exports.string().min(1),
|
|
15316
|
+
answers: external_exports.record(external_exports.string(), external_exports.array(external_exports.string())),
|
|
15317
|
+
cancelled: external_exports.boolean().default(false)
|
|
15318
|
+
});
|
|
15319
|
+
var threadQuestionRespondResultSchema = external_exports.object({ accepted: external_exports.literal(true) });
|
|
15320
|
+
|
|
15274
15321
|
// ../../shared-contracts/dist/harness-plugins.js
|
|
15275
15322
|
var HARNESS_PLUGIN_MANIFEST_MAX_BYTES = 32 * 1024;
|
|
15276
15323
|
var HARNESS_PLUGIN_ICON_MAX_BYTES = 128 * 1024;
|
|
@@ -16030,6 +16077,21 @@ var threadSteeringInspectParamsSchema = external_exports.object({
|
|
|
16030
16077
|
/** The text about to be steered; a Harness command always stops and restarts. */
|
|
16031
16078
|
text: external_exports.string().optional()
|
|
16032
16079
|
}).strict();
|
|
16080
|
+
var threadSteeringContextSchema = external_exports.object({
|
|
16081
|
+
kind: external_exports.literal("application"),
|
|
16082
|
+
value: external_exports.string().transform((text, context) => {
|
|
16083
|
+
try {
|
|
16084
|
+
return JSON.parse(text);
|
|
16085
|
+
} catch {
|
|
16086
|
+
context.addIssue({ code: "custom", message: "Invalid steering context JSON" });
|
|
16087
|
+
return external_exports.NEVER;
|
|
16088
|
+
}
|
|
16089
|
+
}).pipe(external_exports.object({
|
|
16090
|
+
expectedTurnId: hostTurnIdSchema,
|
|
16091
|
+
clientUserMessageId: external_exports.string().min(1),
|
|
16092
|
+
delivery: external_exports.enum(["newTurn", "activeTurn"])
|
|
16093
|
+
}).strict())
|
|
16094
|
+
}).strict().transform((context) => context.value);
|
|
16033
16095
|
var threadSteerDeliverySchema = external_exports.enum(["activeTurn", "newTurn"]);
|
|
16034
16096
|
var threadSteeringInspectResultSchema = external_exports.object({
|
|
16035
16097
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
@@ -16040,7 +16102,10 @@ var harnessPluginRouteSchema = external_exports.object({
|
|
|
16040
16102
|
harnessId: harnessPluginIdSchema,
|
|
16041
16103
|
model: harnessModelRefSchema.optional(),
|
|
16042
16104
|
thinkingOptionId: harnessThinkingOptionIdSchema.optional(),
|
|
16043
|
-
permissionModeId: harnessPermissionModeIdSchema.optional()
|
|
16105
|
+
permissionModeId: harnessPermissionModeIdSchema.optional(),
|
|
16106
|
+
/** A draft prewarm create: stays unsubmitted until the user's first Turn.
|
|
16107
|
+
* Desktop forwards only the Model of a main-process prewarm to thread/start. */
|
|
16108
|
+
prewarm: external_exports.literal(true).optional()
|
|
16044
16109
|
}).strict();
|
|
16045
16110
|
|
|
16046
16111
|
// ../../shared-contracts/dist/harness-launch-settings.js
|
|
@@ -16655,26 +16720,26 @@ function parseHostUsage(value) {
|
|
|
16655
16720
|
}
|
|
16656
16721
|
}
|
|
16657
16722
|
const indicators = value.composerIndicators === void 0 ? {} : { composerIndicators: composerIndicatorsSchema.parse(value.composerIndicators) };
|
|
16658
|
-
for (const
|
|
16723
|
+
for (const field2 of [
|
|
16659
16724
|
"totalCredits",
|
|
16660
16725
|
"contextUsagePercent",
|
|
16661
16726
|
"apiOutputTokensPerSecond"
|
|
16662
16727
|
]) {
|
|
16663
|
-
const candidate = value[
|
|
16728
|
+
const candidate = value[field2];
|
|
16664
16729
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
|
|
16665
|
-
throw new Error(`Harness Usage '${
|
|
16730
|
+
throw new Error(`Harness Usage '${field2}' must be a finite non-negative number`);
|
|
16666
16731
|
}
|
|
16667
16732
|
}
|
|
16668
|
-
for (const
|
|
16669
|
-
const candidate = value[
|
|
16733
|
+
for (const field2 of tokenFields) {
|
|
16734
|
+
const candidate = value[field2];
|
|
16670
16735
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
|
|
16671
|
-
throw new Error(`Harness Usage '${
|
|
16736
|
+
throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
|
|
16672
16737
|
}
|
|
16673
16738
|
}
|
|
16674
|
-
for (const
|
|
16675
|
-
const candidate = value[
|
|
16739
|
+
for (const field2 of safeIntegerFields) {
|
|
16740
|
+
const candidate = value[field2];
|
|
16676
16741
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
|
|
16677
|
-
throw new Error(`Harness Usage '${
|
|
16742
|
+
throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
|
|
16678
16743
|
}
|
|
16679
16744
|
}
|
|
16680
16745
|
if (value.outputTokensPerSecond !== void 0 && (typeof value.outputTokensPerSecond !== "number" || !Number.isFinite(value.outputTokensPerSecond) || value.outputTokensPerSecond < 0)) {
|
|
@@ -16683,16 +16748,16 @@ function parseHostUsage(value) {
|
|
|
16683
16748
|
if (value.totalCostUsd !== void 0 && (typeof value.totalCostUsd !== "number" || !Number.isFinite(value.totalCostUsd) || value.totalCostUsd < 0)) {
|
|
16684
16749
|
throw new Error("Harness Usage 'totalCostUsd' must be a finite non-negative number");
|
|
16685
16750
|
}
|
|
16686
|
-
for (const
|
|
16687
|
-
const candidate = value[
|
|
16751
|
+
for (const field2 of ["totalCredits", "contextUsagePercent"]) {
|
|
16752
|
+
const candidate = value[field2];
|
|
16688
16753
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
|
|
16689
|
-
throw new Error(`Harness Usage '${
|
|
16754
|
+
throw new Error(`Harness Usage '${field2}' must be a finite non-negative number`);
|
|
16690
16755
|
}
|
|
16691
16756
|
}
|
|
16692
|
-
for (const
|
|
16693
|
-
const candidate = value[
|
|
16757
|
+
for (const field2 of percentFields) {
|
|
16758
|
+
const candidate = value[field2];
|
|
16694
16759
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0 || candidate > 100)) {
|
|
16695
|
-
throw new Error(`Harness Usage '${
|
|
16760
|
+
throw new Error(`Harness Usage '${field2}' must be between 0 and 100`);
|
|
16696
16761
|
}
|
|
16697
16762
|
}
|
|
16698
16763
|
if (value.sessionCacheUsage !== void 0) {
|
|
@@ -24388,6 +24453,38 @@ function formatKimiCommandOutput(text) {
|
|
|
24388
24453
|
return cleaned;
|
|
24389
24454
|
}
|
|
24390
24455
|
|
|
24456
|
+
// dist/plan-approval.js
|
|
24457
|
+
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
24458
|
+
function projectKimiPlanApprovalRequest(turnId, request) {
|
|
24459
|
+
const { options } = request;
|
|
24460
|
+
if (request.toolCall.title !== "ExitPlanMode" || !options.some(({ optionId, kind }) => optionId === "plan_revise" && kind === "reject_once") || !options.some(({ optionId, kind }) => optionId === "plan_reject_and_exit" && kind === "reject_once") || !options.some(({ kind }) => kind === "allow_once") || new Set(options.map(({ optionId }) => optionId)).size !== options.length || new Set(options.map(({ name }) => name)).size !== options.length || !options.every(({ optionId, kind, name }) => name.trim().length > 0 && (kind === "allow_once" ? optionId === "plan_approve" || /^plan_opt_\d+$/.test(optionId) : kind === "reject_once" && (optionId === "plan_revise" || optionId === "plan_reject_and_exit"))))
|
|
24461
|
+
return null;
|
|
24462
|
+
return {
|
|
24463
|
+
interaction: {
|
|
24464
|
+
type: "question",
|
|
24465
|
+
interactionId: hostInteractionIdSchema.parse(randomUUID3()),
|
|
24466
|
+
turnId,
|
|
24467
|
+
title: "Kimi Code 计划审批",
|
|
24468
|
+
questions: [
|
|
24469
|
+
{
|
|
24470
|
+
id: "planApproval",
|
|
24471
|
+
type: "choice",
|
|
24472
|
+
prompt: readAcpToolContentText(request.toolCall.content) || "ExitPlanMode",
|
|
24473
|
+
options: options.map(({ optionId, name }) => ({ value: optionId, label: name })),
|
|
24474
|
+
multiple: false,
|
|
24475
|
+
allowOther: false,
|
|
24476
|
+
optional: false
|
|
24477
|
+
}
|
|
24478
|
+
]
|
|
24479
|
+
},
|
|
24480
|
+
schemaProperties: { planApproval: { type: "string" } },
|
|
24481
|
+
parseResponse(response) {
|
|
24482
|
+
const selected = response.action === "accept" ? response.content?.planApproval : void 0;
|
|
24483
|
+
return typeof selected === "string" && options.some(({ optionId }) => optionId === selected) ? { outcome: { outcome: "selected", optionId: selected } } : { outcome: { outcome: "cancelled" } };
|
|
24484
|
+
}
|
|
24485
|
+
};
|
|
24486
|
+
}
|
|
24487
|
+
|
|
24391
24488
|
// dist/kimi-session.js
|
|
24392
24489
|
var kimiHarnessId2 = harnessIdSchema.parse("kimi-code");
|
|
24393
24490
|
var defaultNativeTurnFlushTimeoutMs = 6e3;
|
|
@@ -24927,6 +25024,19 @@ var KimiSession = class {
|
|
|
24927
25024
|
if (currentAgentMessage) {
|
|
24928
25025
|
completeAgentMessage("commentary");
|
|
24929
25026
|
}
|
|
25027
|
+
const plan = projectKimiPlanApprovalRequest(turnId, request);
|
|
25028
|
+
if (plan) {
|
|
25029
|
+
return new Promise((resolve) => {
|
|
25030
|
+
this.#activeInteractions.set(plan.interaction.interactionId, {
|
|
25031
|
+
id: plan.interaction.interactionId,
|
|
25032
|
+
type: "question",
|
|
25033
|
+
interaction: plan.interaction,
|
|
25034
|
+
metadata: plan.schemaProperties,
|
|
25035
|
+
resolve: (value) => resolve(plan.parseResponse(value))
|
|
25036
|
+
});
|
|
25037
|
+
this.#channel.emit({ kind: "interaction", interaction: plan.interaction });
|
|
25038
|
+
});
|
|
25039
|
+
}
|
|
24930
25040
|
const projected = projectKimiApprovalRequest(turnId, request);
|
|
24931
25041
|
return new Promise((resolve) => {
|
|
24932
25042
|
this.#activeInteractions.set(projected.interaction.interactionId, {
|
|
@@ -25542,8 +25652,9 @@ var KimiAdapter = class {
|
|
|
25542
25652
|
if (this.#closed) {
|
|
25543
25653
|
return err2("invalidState", "Adapter is closed");
|
|
25544
25654
|
}
|
|
25545
|
-
|
|
25546
|
-
|
|
25655
|
+
const unattended = input.kind === "create" && input.executionPolicy === "unattended-full-access";
|
|
25656
|
+
if (unattended && input.permissionModeId && input.permissionModeId !== "yolo") {
|
|
25657
|
+
return err2("invalidRequest", "Kimi Code unattended execution requires the yolo Permission Mode");
|
|
25547
25658
|
}
|
|
25548
25659
|
if (input.kind === "resume" && input.nativeRef.harnessId !== this.harnessId || input.kind === "rollbackLastTurn" && input.sourceRef.harnessId !== this.harnessId) {
|
|
25549
25660
|
return err2("invalidRequest", "Native Session belongs to a different Harness");
|
|
@@ -25603,10 +25714,11 @@ var KimiAdapter = class {
|
|
|
25603
25714
|
if (input.permissionModeId && !isKimiModeId(input.permissionModeId)) {
|
|
25604
25715
|
throw new Error(`Unsupported permission mode: ${input.permissionModeId}`);
|
|
25605
25716
|
}
|
|
25717
|
+
const permissionModeId = input.permissionModeId ?? (unattended ? "yolo" : void 0);
|
|
25606
25718
|
const requested = [
|
|
25607
25719
|
...input.model ? [{ id: "model", value: decodeKimiModelRefId(input.model.id) }] : [],
|
|
25608
25720
|
...input.thinkingOptionId ? [{ id: "thinking", value: input.thinkingOptionId }] : [],
|
|
25609
|
-
...
|
|
25721
|
+
...permissionModeId ? [{ id: "mode", value: permissionModeId }] : []
|
|
25610
25722
|
];
|
|
25611
25723
|
const configOptions = await applyRequestedConfig(transport, sessionInfo.configOptions, requested);
|
|
25612
25724
|
const state = stateFromConfig(sessionInfo.sessionId, cwd, configOptions);
|
|
@@ -3380,10 +3380,10 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
3380
3380
|
const shape = def.shape;
|
|
3381
3381
|
const propValues = {};
|
|
3382
3382
|
for (const key in shape) {
|
|
3383
|
-
const
|
|
3384
|
-
if (
|
|
3383
|
+
const field2 = shape[key]._zod;
|
|
3384
|
+
if (field2.values) {
|
|
3385
3385
|
propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
|
|
3386
|
-
for (const v of
|
|
3386
|
+
for (const v of field2.values)
|
|
3387
3387
|
propValues[key].add(v);
|
|
3388
3388
|
}
|
|
3389
3389
|
}
|
|
@@ -15023,6 +15023,8 @@ var usageStatisticsTotalsSchema = external_exports.strictObject({
|
|
|
15023
15023
|
cachedInputTokens: count,
|
|
15024
15024
|
cacheWriteInputTokens: count,
|
|
15025
15025
|
cacheKnownInputTokens: count,
|
|
15026
|
+
cacheHitCachedInputTokens: count,
|
|
15027
|
+
cacheHitInputTokens: count,
|
|
15026
15028
|
outputTokens: count,
|
|
15027
15029
|
reasoningOutputTokens: count,
|
|
15028
15030
|
/** USD at the public price, summed over the priced requests only. */
|
|
@@ -15130,6 +15132,51 @@ var hostInteractionIdSchema = opaqueIdSchema.brand();
|
|
|
15130
15132
|
var threadPrewarmDiscardParamsSchema = external_exports.object({ threadId: hostThreadIdSchema });
|
|
15131
15133
|
var threadPrewarmDiscardResultSchema = external_exports.object({ discarded: external_exports.boolean() });
|
|
15132
15134
|
|
|
15135
|
+
// ../../shared-contracts/dist/thread-questions.js
|
|
15136
|
+
var field = external_exports.discriminatedUnion("type", [
|
|
15137
|
+
external_exports.object({
|
|
15138
|
+
id: external_exports.string().min(1),
|
|
15139
|
+
type: external_exports.literal("choice"),
|
|
15140
|
+
prompt: external_exports.string(),
|
|
15141
|
+
options: external_exports.array(external_exports.object({
|
|
15142
|
+
value: external_exports.string().min(1),
|
|
15143
|
+
label: external_exports.string(),
|
|
15144
|
+
description: external_exports.string().optional()
|
|
15145
|
+
})).min(1),
|
|
15146
|
+
multiple: external_exports.boolean(),
|
|
15147
|
+
allowOther: external_exports.boolean(),
|
|
15148
|
+
optional: external_exports.boolean()
|
|
15149
|
+
}),
|
|
15150
|
+
external_exports.object({
|
|
15151
|
+
id: external_exports.string().min(1),
|
|
15152
|
+
type: external_exports.literal("text"),
|
|
15153
|
+
prompt: external_exports.string(),
|
|
15154
|
+
multiline: external_exports.boolean(),
|
|
15155
|
+
secret: external_exports.literal(false),
|
|
15156
|
+
optional: external_exports.boolean(),
|
|
15157
|
+
placeholder: external_exports.string().optional(),
|
|
15158
|
+
prefill: external_exports.string().optional()
|
|
15159
|
+
})
|
|
15160
|
+
]);
|
|
15161
|
+
var threadQuestionSchema = external_exports.object({
|
|
15162
|
+
interactionId: external_exports.string().min(1),
|
|
15163
|
+
turnId: external_exports.string().min(1),
|
|
15164
|
+
title: external_exports.string().optional(),
|
|
15165
|
+
questions: external_exports.array(field).min(1)
|
|
15166
|
+
}).refine(({ questions }) => questions.some((q) => q.type === "choice" && q.multiple), {
|
|
15167
|
+
message: "Shared cards require at least one multi-select question"
|
|
15168
|
+
});
|
|
15169
|
+
var threadQuestionsListParamsSchema = external_exports.strictObject({ threadId: external_exports.string().min(1) });
|
|
15170
|
+
var threadQuestionsResultSchema = external_exports.object({ questions: external_exports.array(threadQuestionSchema) });
|
|
15171
|
+
var threadQuestionRespondParamsSchema = external_exports.strictObject({
|
|
15172
|
+
threadId: external_exports.string().min(1),
|
|
15173
|
+
turnId: external_exports.string().min(1),
|
|
15174
|
+
interactionId: external_exports.string().min(1),
|
|
15175
|
+
answers: external_exports.record(external_exports.string(), external_exports.array(external_exports.string())),
|
|
15176
|
+
cancelled: external_exports.boolean().default(false)
|
|
15177
|
+
});
|
|
15178
|
+
var threadQuestionRespondResultSchema = external_exports.object({ accepted: external_exports.literal(true) });
|
|
15179
|
+
|
|
15133
15180
|
// ../../shared-contracts/dist/harness-plugins.js
|
|
15134
15181
|
var HARNESS_PLUGIN_MANIFEST_MAX_BYTES = 32 * 1024;
|
|
15135
15182
|
var HARNESS_PLUGIN_ICON_MAX_BYTES = 128 * 1024;
|
|
@@ -15889,6 +15936,21 @@ var threadSteeringInspectParamsSchema = external_exports.object({
|
|
|
15889
15936
|
/** The text about to be steered; a Harness command always stops and restarts. */
|
|
15890
15937
|
text: external_exports.string().optional()
|
|
15891
15938
|
}).strict();
|
|
15939
|
+
var threadSteeringContextSchema = external_exports.object({
|
|
15940
|
+
kind: external_exports.literal("application"),
|
|
15941
|
+
value: external_exports.string().transform((text, context) => {
|
|
15942
|
+
try {
|
|
15943
|
+
return JSON.parse(text);
|
|
15944
|
+
} catch {
|
|
15945
|
+
context.addIssue({ code: "custom", message: "Invalid steering context JSON" });
|
|
15946
|
+
return external_exports.NEVER;
|
|
15947
|
+
}
|
|
15948
|
+
}).pipe(external_exports.object({
|
|
15949
|
+
expectedTurnId: hostTurnIdSchema,
|
|
15950
|
+
clientUserMessageId: external_exports.string().min(1),
|
|
15951
|
+
delivery: external_exports.enum(["newTurn", "activeTurn"])
|
|
15952
|
+
}).strict())
|
|
15953
|
+
}).strict().transform((context) => context.value);
|
|
15892
15954
|
var threadSteerDeliverySchema = external_exports.enum(["activeTurn", "newTurn"]);
|
|
15893
15955
|
var threadSteeringInspectResultSchema = external_exports.object({
|
|
15894
15956
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
@@ -15899,7 +15961,10 @@ var harnessPluginRouteSchema = external_exports.object({
|
|
|
15899
15961
|
harnessId: harnessPluginIdSchema,
|
|
15900
15962
|
model: harnessModelRefSchema.optional(),
|
|
15901
15963
|
thinkingOptionId: harnessThinkingOptionIdSchema.optional(),
|
|
15902
|
-
permissionModeId: harnessPermissionModeIdSchema.optional()
|
|
15964
|
+
permissionModeId: harnessPermissionModeIdSchema.optional(),
|
|
15965
|
+
/** A draft prewarm create: stays unsubmitted until the user's first Turn.
|
|
15966
|
+
* Desktop forwards only the Model of a main-process prewarm to thread/start. */
|
|
15967
|
+
prewarm: external_exports.literal(true).optional()
|
|
15903
15968
|
}).strict();
|
|
15904
15969
|
|
|
15905
15970
|
// ../../shared-contracts/dist/harness-launch-settings.js
|
|
@@ -16510,26 +16575,26 @@ function parseHostUsage(value) {
|
|
|
16510
16575
|
}
|
|
16511
16576
|
}
|
|
16512
16577
|
const indicators = value.composerIndicators === void 0 ? {} : { composerIndicators: composerIndicatorsSchema.parse(value.composerIndicators) };
|
|
16513
|
-
for (const
|
|
16578
|
+
for (const field2 of [
|
|
16514
16579
|
"totalCredits",
|
|
16515
16580
|
"contextUsagePercent",
|
|
16516
16581
|
"apiOutputTokensPerSecond"
|
|
16517
16582
|
]) {
|
|
16518
|
-
const candidate = value[
|
|
16583
|
+
const candidate = value[field2];
|
|
16519
16584
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
|
|
16520
|
-
throw new Error(`Harness Usage '${
|
|
16585
|
+
throw new Error(`Harness Usage '${field2}' must be a finite non-negative number`);
|
|
16521
16586
|
}
|
|
16522
16587
|
}
|
|
16523
|
-
for (const
|
|
16524
|
-
const candidate = value[
|
|
16588
|
+
for (const field2 of tokenFields) {
|
|
16589
|
+
const candidate = value[field2];
|
|
16525
16590
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
|
|
16526
|
-
throw new Error(`Harness Usage '${
|
|
16591
|
+
throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
|
|
16527
16592
|
}
|
|
16528
16593
|
}
|
|
16529
|
-
for (const
|
|
16530
|
-
const candidate = value[
|
|
16594
|
+
for (const field2 of safeIntegerFields) {
|
|
16595
|
+
const candidate = value[field2];
|
|
16531
16596
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
|
|
16532
|
-
throw new Error(`Harness Usage '${
|
|
16597
|
+
throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
|
|
16533
16598
|
}
|
|
16534
16599
|
}
|
|
16535
16600
|
if (value.outputTokensPerSecond !== void 0 && (typeof value.outputTokensPerSecond !== "number" || !Number.isFinite(value.outputTokensPerSecond) || value.outputTokensPerSecond < 0)) {
|
|
@@ -16538,16 +16603,16 @@ function parseHostUsage(value) {
|
|
|
16538
16603
|
if (value.totalCostUsd !== void 0 && (typeof value.totalCostUsd !== "number" || !Number.isFinite(value.totalCostUsd) || value.totalCostUsd < 0)) {
|
|
16539
16604
|
throw new Error("Harness Usage 'totalCostUsd' must be a finite non-negative number");
|
|
16540
16605
|
}
|
|
16541
|
-
for (const
|
|
16542
|
-
const candidate = value[
|
|
16606
|
+
for (const field2 of ["totalCredits", "contextUsagePercent"]) {
|
|
16607
|
+
const candidate = value[field2];
|
|
16543
16608
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
|
|
16544
|
-
throw new Error(`Harness Usage '${
|
|
16609
|
+
throw new Error(`Harness Usage '${field2}' must be a finite non-negative number`);
|
|
16545
16610
|
}
|
|
16546
16611
|
}
|
|
16547
|
-
for (const
|
|
16548
|
-
const candidate = value[
|
|
16612
|
+
for (const field2 of percentFields) {
|
|
16613
|
+
const candidate = value[field2];
|
|
16549
16614
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0 || candidate > 100)) {
|
|
16550
|
-
throw new Error(`Harness Usage '${
|
|
16615
|
+
throw new Error(`Harness Usage '${field2}' must be between 0 and 100`);
|
|
16551
16616
|
}
|
|
16552
16617
|
}
|
|
16553
16618
|
if (value.sessionCacheUsage !== void 0) {
|
|
@@ -3289,10 +3289,10 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
3289
3289
|
const shape = def.shape;
|
|
3290
3290
|
const propValues = {};
|
|
3291
3291
|
for (const key in shape) {
|
|
3292
|
-
const
|
|
3293
|
-
if (
|
|
3292
|
+
const field2 = shape[key]._zod;
|
|
3293
|
+
if (field2.values) {
|
|
3294
3294
|
propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
|
|
3295
|
-
for (const v of
|
|
3295
|
+
for (const v of field2.values)
|
|
3296
3296
|
propValues[key].add(v);
|
|
3297
3297
|
}
|
|
3298
3298
|
}
|
|
@@ -14932,6 +14932,8 @@ var usageStatisticsTotalsSchema = external_exports.strictObject({
|
|
|
14932
14932
|
cachedInputTokens: count,
|
|
14933
14933
|
cacheWriteInputTokens: count,
|
|
14934
14934
|
cacheKnownInputTokens: count,
|
|
14935
|
+
cacheHitCachedInputTokens: count,
|
|
14936
|
+
cacheHitInputTokens: count,
|
|
14935
14937
|
outputTokens: count,
|
|
14936
14938
|
reasoningOutputTokens: count,
|
|
14937
14939
|
/** USD at the public price, summed over the priced requests only. */
|
|
@@ -15039,6 +15041,51 @@ var hostInteractionIdSchema = opaqueIdSchema.brand();
|
|
|
15039
15041
|
var threadPrewarmDiscardParamsSchema = external_exports.object({ threadId: hostThreadIdSchema });
|
|
15040
15042
|
var threadPrewarmDiscardResultSchema = external_exports.object({ discarded: external_exports.boolean() });
|
|
15041
15043
|
|
|
15044
|
+
// ../../shared-contracts/dist/thread-questions.js
|
|
15045
|
+
var field = external_exports.discriminatedUnion("type", [
|
|
15046
|
+
external_exports.object({
|
|
15047
|
+
id: external_exports.string().min(1),
|
|
15048
|
+
type: external_exports.literal("choice"),
|
|
15049
|
+
prompt: external_exports.string(),
|
|
15050
|
+
options: external_exports.array(external_exports.object({
|
|
15051
|
+
value: external_exports.string().min(1),
|
|
15052
|
+
label: external_exports.string(),
|
|
15053
|
+
description: external_exports.string().optional()
|
|
15054
|
+
})).min(1),
|
|
15055
|
+
multiple: external_exports.boolean(),
|
|
15056
|
+
allowOther: external_exports.boolean(),
|
|
15057
|
+
optional: external_exports.boolean()
|
|
15058
|
+
}),
|
|
15059
|
+
external_exports.object({
|
|
15060
|
+
id: external_exports.string().min(1),
|
|
15061
|
+
type: external_exports.literal("text"),
|
|
15062
|
+
prompt: external_exports.string(),
|
|
15063
|
+
multiline: external_exports.boolean(),
|
|
15064
|
+
secret: external_exports.literal(false),
|
|
15065
|
+
optional: external_exports.boolean(),
|
|
15066
|
+
placeholder: external_exports.string().optional(),
|
|
15067
|
+
prefill: external_exports.string().optional()
|
|
15068
|
+
})
|
|
15069
|
+
]);
|
|
15070
|
+
var threadQuestionSchema = external_exports.object({
|
|
15071
|
+
interactionId: external_exports.string().min(1),
|
|
15072
|
+
turnId: external_exports.string().min(1),
|
|
15073
|
+
title: external_exports.string().optional(),
|
|
15074
|
+
questions: external_exports.array(field).min(1)
|
|
15075
|
+
}).refine(({ questions }) => questions.some((q) => q.type === "choice" && q.multiple), {
|
|
15076
|
+
message: "Shared cards require at least one multi-select question"
|
|
15077
|
+
});
|
|
15078
|
+
var threadQuestionsListParamsSchema = external_exports.strictObject({ threadId: external_exports.string().min(1) });
|
|
15079
|
+
var threadQuestionsResultSchema = external_exports.object({ questions: external_exports.array(threadQuestionSchema) });
|
|
15080
|
+
var threadQuestionRespondParamsSchema = external_exports.strictObject({
|
|
15081
|
+
threadId: external_exports.string().min(1),
|
|
15082
|
+
turnId: external_exports.string().min(1),
|
|
15083
|
+
interactionId: external_exports.string().min(1),
|
|
15084
|
+
answers: external_exports.record(external_exports.string(), external_exports.array(external_exports.string())),
|
|
15085
|
+
cancelled: external_exports.boolean().default(false)
|
|
15086
|
+
});
|
|
15087
|
+
var threadQuestionRespondResultSchema = external_exports.object({ accepted: external_exports.literal(true) });
|
|
15088
|
+
|
|
15042
15089
|
// ../../shared-contracts/dist/harness-plugins.js
|
|
15043
15090
|
var HARNESS_PLUGIN_MANIFEST_MAX_BYTES = 32 * 1024;
|
|
15044
15091
|
var HARNESS_PLUGIN_ICON_MAX_BYTES = 128 * 1024;
|
|
@@ -15798,6 +15845,21 @@ var threadSteeringInspectParamsSchema = external_exports.object({
|
|
|
15798
15845
|
/** The text about to be steered; a Harness command always stops and restarts. */
|
|
15799
15846
|
text: external_exports.string().optional()
|
|
15800
15847
|
}).strict();
|
|
15848
|
+
var threadSteeringContextSchema = external_exports.object({
|
|
15849
|
+
kind: external_exports.literal("application"),
|
|
15850
|
+
value: external_exports.string().transform((text, context) => {
|
|
15851
|
+
try {
|
|
15852
|
+
return JSON.parse(text);
|
|
15853
|
+
} catch {
|
|
15854
|
+
context.addIssue({ code: "custom", message: "Invalid steering context JSON" });
|
|
15855
|
+
return external_exports.NEVER;
|
|
15856
|
+
}
|
|
15857
|
+
}).pipe(external_exports.object({
|
|
15858
|
+
expectedTurnId: hostTurnIdSchema,
|
|
15859
|
+
clientUserMessageId: external_exports.string().min(1),
|
|
15860
|
+
delivery: external_exports.enum(["newTurn", "activeTurn"])
|
|
15861
|
+
}).strict())
|
|
15862
|
+
}).strict().transform((context) => context.value);
|
|
15801
15863
|
var threadSteerDeliverySchema = external_exports.enum(["activeTurn", "newTurn"]);
|
|
15802
15864
|
var threadSteeringInspectResultSchema = external_exports.object({
|
|
15803
15865
|
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
@@ -15808,7 +15870,10 @@ var harnessPluginRouteSchema = external_exports.object({
|
|
|
15808
15870
|
harnessId: harnessPluginIdSchema,
|
|
15809
15871
|
model: harnessModelRefSchema.optional(),
|
|
15810
15872
|
thinkingOptionId: harnessThinkingOptionIdSchema.optional(),
|
|
15811
|
-
permissionModeId: harnessPermissionModeIdSchema.optional()
|
|
15873
|
+
permissionModeId: harnessPermissionModeIdSchema.optional(),
|
|
15874
|
+
/** A draft prewarm create: stays unsubmitted until the user's first Turn.
|
|
15875
|
+
* Desktop forwards only the Model of a main-process prewarm to thread/start. */
|
|
15876
|
+
prewarm: external_exports.literal(true).optional()
|
|
15812
15877
|
}).strict();
|
|
15813
15878
|
|
|
15814
15879
|
// ../../shared-contracts/dist/harness-launch-settings.js
|
|
@@ -17840,9 +17905,9 @@ var MuseHarnessSession = class {
|
|
|
17840
17905
|
const text = typeof params.delta === "string" ? params.delta : "";
|
|
17841
17906
|
if (!item || !text)
|
|
17842
17907
|
return;
|
|
17843
|
-
const
|
|
17844
|
-
const asOutput =
|
|
17845
|
-
if (item.type === "commandExecution" && (asOutput ||
|
|
17908
|
+
const field2 = typeof params.field === "string" && params.field ? params.field : "text";
|
|
17909
|
+
const asOutput = field2 === "output";
|
|
17910
|
+
if (item.type === "commandExecution" && (asOutput || field2 === "text")) {
|
|
17846
17911
|
const suffix = text;
|
|
17847
17912
|
item.output = `${item.output ?? ""}${suffix}`;
|
|
17848
17913
|
this.#emit({
|
|
@@ -17856,7 +17921,7 @@ var MuseHarnessSession = class {
|
|
|
17856
17921
|
});
|
|
17857
17922
|
return;
|
|
17858
17923
|
}
|
|
17859
|
-
if (item.type === "toolExecution" && (asOutput ||
|
|
17924
|
+
if (item.type === "toolExecution" && (asOutput || field2 === "text")) {
|
|
17860
17925
|
const suffix = text;
|
|
17861
17926
|
const next = `${toolOutputText(item)}${suffix}`;
|
|
17862
17927
|
item.output = { content: [{ type: "text", text: next }] };
|
|
@@ -17872,7 +17937,7 @@ var MuseHarnessSession = class {
|
|
|
17872
17937
|
return;
|
|
17873
17938
|
}
|
|
17874
17939
|
if (item.type === "agentMessage" || item.type === "reasoning") {
|
|
17875
|
-
if (item.type === "agentMessage" &&
|
|
17940
|
+
if (item.type === "agentMessage" && field2 !== "text")
|
|
17876
17941
|
return;
|
|
17877
17942
|
const suffix = text;
|
|
17878
17943
|
item.text += suffix;
|