@codexhost/cli-win32-arm64 0.13.3 → 0.15.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 +109 -11
- package/app/console-web.js +649 -132
- package/app/desktop-controller.mjs +120 -12
- package/app/host-runtime.mjs +1124 -293
- package/app/plugins/antigravity/plugin.mjs +431 -66
- package/app/plugins/claude-code/plugin.mjs +761 -139
- package/app/plugins/codebuddy/plugin.mjs +322 -68
- package/app/plugins/codex-usage/plugin.mjs +249 -102
- package/app/plugins/copilot/assets/icon.png +0 -0
- package/app/plugins/copilot/manifest.json +26 -0
- package/app/plugins/copilot/plugin.mjs +34591 -0
- package/app/plugins/cursor-cli/plugin.mjs +21011 -44970
- package/app/plugins/deepseek-harness/plugin.mjs +160 -43
- package/app/plugins/enabled.json +1 -0
- package/app/plugins/grok/plugin.mjs +565 -107
- package/app/plugins/hermes/plugin.mjs +128 -12
- package/app/plugins/kimi-code/plugin.mjs +136 -22
- package/app/plugins/kiro-cli/plugin.mjs +136 -22
- package/app/plugins/omp/plugin.mjs +2236 -2036
- package/app/plugins/opencode/plugin.mjs +187 -68
- package/app/plugins/pi/plugin.mjs +2621 -2304
- package/app/plugins/qoder/plugin.mjs +153 -36
- package/app/plugins/qoder-cn/plugin.mjs +153 -36
- package/app/plugins/workbuddy/plugin.mjs +583 -92
- package/app/plugins/zcode/plugin.mjs +183 -40
- package/app/renderer-extension.js +1758 -392
- 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
|
@@ -3401,10 +3401,10 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
|
3401
3401
|
const shape = def.shape;
|
|
3402
3402
|
const propValues = {};
|
|
3403
3403
|
for (const key in shape) {
|
|
3404
|
-
const
|
|
3405
|
-
if (
|
|
3404
|
+
const field2 = shape[key]._zod;
|
|
3405
|
+
if (field2.values) {
|
|
3406
3406
|
propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
|
|
3407
|
-
for (const v of
|
|
3407
|
+
for (const v of field2.values)
|
|
3408
3408
|
propValues[key].add(v);
|
|
3409
3409
|
}
|
|
3410
3410
|
}
|
|
@@ -15023,10 +15023,19 @@ var model = external_exports.string().min(1).max(512);
|
|
|
15023
15023
|
var project = external_exports.string().min(1).max(4096);
|
|
15024
15024
|
var usageStatisticsParamsSchema = external_exports.strictObject({
|
|
15025
15025
|
range: external_exports.enum(USAGE_STATISTICS_RANGES),
|
|
15026
|
+
/** Display timezone for ranges, dates and hourly buckets; omitted means the Host's local zone. */
|
|
15027
|
+
timeZone: external_exports.string().min(1).max(128).refine((value) => {
|
|
15028
|
+
try {
|
|
15029
|
+
new Intl.DateTimeFormat("en", { timeZone: value });
|
|
15030
|
+
return true;
|
|
15031
|
+
} catch {
|
|
15032
|
+
return false;
|
|
15033
|
+
}
|
|
15034
|
+
}, "Unsupported usage statistics timezone").optional(),
|
|
15026
15035
|
harness: harness.optional(),
|
|
15027
15036
|
model: model.nullable().optional(),
|
|
15028
15037
|
project: project.nullable().optional(),
|
|
15029
|
-
/** One
|
|
15038
|
+
/** One date in the query timezone inside the range. */
|
|
15030
15039
|
date: localDate.optional()
|
|
15031
15040
|
});
|
|
15032
15041
|
var usageStatisticsTotalsSchema = external_exports.strictObject({
|
|
@@ -15062,7 +15071,7 @@ var usageStatisticsSessionSchema = external_exports.strictObject({
|
|
|
15062
15071
|
});
|
|
15063
15072
|
var usageStatisticsResultSchema = external_exports.strictObject({
|
|
15064
15073
|
range: external_exports.enum(USAGE_STATISTICS_RANGES),
|
|
15065
|
-
/** First
|
|
15074
|
+
/** First date in the query timezone (Host local when omitted); null for all time. */
|
|
15066
15075
|
from: localDate.nullable(),
|
|
15067
15076
|
to: localDate,
|
|
15068
15077
|
/** The filters these figures apply, echoed so a late answer to older filters is recognised. */
|
|
@@ -15102,7 +15111,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
15102
15111
|
totals: usageStatisticsTotalsSchema,
|
|
15103
15112
|
/** Each date and Harness of the range: every filter except the day. */
|
|
15104
15113
|
daily: external_exports.array(external_exports.strictObject({ date: localDate, harness, ...totals })).max(2e5),
|
|
15105
|
-
/**
|
|
15114
|
+
/** Weekday (0 = Sunday) and hour in the query timezone, all filters applied. */
|
|
15106
15115
|
hourly: external_exports.array(external_exports.strictObject({
|
|
15107
15116
|
weekday: external_exports.number().int().min(0).max(6),
|
|
15108
15117
|
hour: external_exports.number().int().min(0).max(23),
|
|
@@ -15142,6 +15151,51 @@ var hostInteractionIdSchema = opaqueIdSchema.brand();
|
|
|
15142
15151
|
var threadPrewarmDiscardParamsSchema = external_exports.object({ threadId: hostThreadIdSchema });
|
|
15143
15152
|
var threadPrewarmDiscardResultSchema = external_exports.object({ discarded: external_exports.boolean() });
|
|
15144
15153
|
|
|
15154
|
+
// ../../shared-contracts/dist/thread-questions.js
|
|
15155
|
+
var field = external_exports.discriminatedUnion("type", [
|
|
15156
|
+
external_exports.object({
|
|
15157
|
+
id: external_exports.string().min(1),
|
|
15158
|
+
type: external_exports.literal("choice"),
|
|
15159
|
+
prompt: external_exports.string(),
|
|
15160
|
+
options: external_exports.array(external_exports.object({
|
|
15161
|
+
value: external_exports.string().min(1),
|
|
15162
|
+
label: external_exports.string(),
|
|
15163
|
+
description: external_exports.string().optional()
|
|
15164
|
+
})).min(1),
|
|
15165
|
+
multiple: external_exports.boolean(),
|
|
15166
|
+
allowOther: external_exports.boolean(),
|
|
15167
|
+
optional: external_exports.boolean()
|
|
15168
|
+
}),
|
|
15169
|
+
external_exports.object({
|
|
15170
|
+
id: external_exports.string().min(1),
|
|
15171
|
+
type: external_exports.literal("text"),
|
|
15172
|
+
prompt: external_exports.string(),
|
|
15173
|
+
multiline: external_exports.boolean(),
|
|
15174
|
+
secret: external_exports.literal(false),
|
|
15175
|
+
optional: external_exports.boolean(),
|
|
15176
|
+
placeholder: external_exports.string().optional(),
|
|
15177
|
+
prefill: external_exports.string().optional()
|
|
15178
|
+
})
|
|
15179
|
+
]);
|
|
15180
|
+
var threadQuestionSchema = external_exports.object({
|
|
15181
|
+
interactionId: external_exports.string().min(1),
|
|
15182
|
+
turnId: external_exports.string().min(1),
|
|
15183
|
+
title: external_exports.string().optional(),
|
|
15184
|
+
questions: external_exports.array(field).min(1)
|
|
15185
|
+
}).refine(({ questions }) => questions.some((q) => q.type === "choice" && q.multiple), {
|
|
15186
|
+
message: "Shared cards require at least one multi-select question"
|
|
15187
|
+
});
|
|
15188
|
+
var threadQuestionsListParamsSchema = external_exports.strictObject({ threadId: external_exports.string().min(1) });
|
|
15189
|
+
var threadQuestionsResultSchema = external_exports.object({ questions: external_exports.array(threadQuestionSchema) });
|
|
15190
|
+
var threadQuestionRespondParamsSchema = external_exports.strictObject({
|
|
15191
|
+
threadId: external_exports.string().min(1),
|
|
15192
|
+
turnId: external_exports.string().min(1),
|
|
15193
|
+
interactionId: external_exports.string().min(1),
|
|
15194
|
+
answers: external_exports.record(external_exports.string(), external_exports.array(external_exports.string())),
|
|
15195
|
+
cancelled: external_exports.boolean().default(false)
|
|
15196
|
+
});
|
|
15197
|
+
var threadQuestionRespondResultSchema = external_exports.object({ accepted: external_exports.literal(true) });
|
|
15198
|
+
|
|
15145
15199
|
// ../../shared-contracts/dist/console.js
|
|
15146
15200
|
var consoleAnnouncementSchema = external_exports.strictObject({
|
|
15147
15201
|
title: external_exports.string().trim().min(1).max(200),
|
|
@@ -15162,6 +15216,8 @@ var CONSOLE_HOST_METHODS = Object.freeze([
|
|
|
15162
15216
|
"codexhost/harness/display-settings/set",
|
|
15163
15217
|
"codexhost/harness/inspect",
|
|
15164
15218
|
"codexhost/harness/installation",
|
|
15219
|
+
"codexhost/harness/installation/start",
|
|
15220
|
+
"codexhost/harness/installation/status",
|
|
15165
15221
|
"codexhost/harness/launch-settings/get",
|
|
15166
15222
|
"codexhost/harness/launch-settings/set",
|
|
15167
15223
|
"codexhost/harness/web-ui/open",
|
|
@@ -15237,7 +15293,18 @@ var threadManualCompactionStartedSchema = external_exports.strictObject({
|
|
|
15237
15293
|
var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonnegative();
|
|
15238
15294
|
var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
|
|
15239
15295
|
var cacheHitRatePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
15296
|
+
var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text2) => text2.length <= maximum));
|
|
15297
|
+
var composerIndicatorsSchema = external_exports.array(external_exports.object({
|
|
15298
|
+
kind: external_exports.literal("countdown"),
|
|
15299
|
+
id: external_exports.string().min(1).max(64),
|
|
15300
|
+
expiresAtUnix: nonNegativeSafeIntegerSchema,
|
|
15301
|
+
label: indicatorTextSchema(256).optional(),
|
|
15302
|
+
tooltip: indicatorTextSchema(1024).optional()
|
|
15303
|
+
}).strict()).max(2).refine((entries) => new Set(entries.map(({ id }) => id)).size === entries.length, {
|
|
15304
|
+
message: "Composer indicator IDs must be unique"
|
|
15305
|
+
});
|
|
15240
15306
|
var threadUsageSnapshotSchema = external_exports.object({
|
|
15307
|
+
composerIndicators: composerIndicatorsSchema.optional(),
|
|
15241
15308
|
inputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
15242
15309
|
cachedInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
15243
15310
|
cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
@@ -15645,7 +15712,9 @@ var harnessSessionCapabilitiesSchema = external_exports.object({
|
|
|
15645
15712
|
}).strict().optional(),
|
|
15646
15713
|
autonomousTurns: external_exports.object({
|
|
15647
15714
|
observe: external_exports.boolean()
|
|
15648
|
-
}).strict().optional()
|
|
15715
|
+
}).strict().optional(),
|
|
15716
|
+
/** True only when `turn.steer` delivers input into the active Turn through a native primitive. */
|
|
15717
|
+
steer: external_exports.boolean().optional()
|
|
15649
15718
|
}).strict();
|
|
15650
15719
|
var harnessConfigurationStateSchema = external_exports.object({
|
|
15651
15720
|
effectiveModel: harnessModelRefSchema.optional(),
|
|
@@ -15692,7 +15761,9 @@ var harnessInspectionSchema = external_exports.union([
|
|
|
15692
15761
|
var harnessInspectParamsSchema = external_exports.object({
|
|
15693
15762
|
harnessId: harnessIdSchema,
|
|
15694
15763
|
cwd: nonBlankTextSchema2.max(16384).optional(),
|
|
15695
|
-
refresh: external_exports.boolean().optional()
|
|
15764
|
+
refresh: external_exports.boolean().optional(),
|
|
15765
|
+
/** `availability` asks only whether the Harness can run; see `InspectHarnessInput.purpose`. */
|
|
15766
|
+
purpose: external_exports.literal("availability").optional()
|
|
15696
15767
|
}).strict();
|
|
15697
15768
|
var harnessWebUiOpenParamsSchema = external_exports.object({
|
|
15698
15769
|
harnessId: harnessIdSchema
|
|
@@ -15775,6 +15846,15 @@ var threadOwnershipListResultSchema = external_exports.object({
|
|
|
15775
15846
|
seen.add(thread.threadId);
|
|
15776
15847
|
}
|
|
15777
15848
|
});
|
|
15849
|
+
var threadSteeringInspectParamsSchema = external_exports.object({
|
|
15850
|
+
threadId: hostThreadIdSchema,
|
|
15851
|
+
/** The text about to be steered; a Harness command always stops and restarts. */
|
|
15852
|
+
text: external_exports.string().optional()
|
|
15853
|
+
}).strict();
|
|
15854
|
+
var threadSteerDeliverySchema = external_exports.enum(["activeTurn", "newTurn"]);
|
|
15855
|
+
var threadSteeringInspectResultSchema = external_exports.object({
|
|
15856
|
+
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
15857
|
+
}).strict();
|
|
15778
15858
|
|
|
15779
15859
|
// ../../shared-contracts/dist/harness-plugins.js
|
|
15780
15860
|
var HARNESS_PLUGIN_MANIFEST_MAX_BYTES = 32 * 1024;
|
|
@@ -15876,6 +15956,10 @@ var harnessInstallationStateSchema = external_exports.object({
|
|
|
15876
15956
|
latestVersion: external_exports.string().min(1).max(128),
|
|
15877
15957
|
updateAvailable: external_exports.boolean(),
|
|
15878
15958
|
canUpdate: external_exports.boolean(),
|
|
15959
|
+
/** Defaults to CLI; some Harnesses ship only inside a desktop application. */
|
|
15960
|
+
versionKind: external_exports.enum(["cli", "application"]).optional(),
|
|
15961
|
+
/** Official download opened by the user; does not imply an automatic installation. */
|
|
15962
|
+
manualUpdateUrl: external_exports.url().max(2048).refine((value) => /^https:\/\/[^/?#@]+(?:[/?#]|$)/iu.test(value), "Manual updates require a credential-free HTTPS URL").optional(),
|
|
15879
15963
|
// Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
|
|
15880
15964
|
message: external_exports.string().max(2048).optional(),
|
|
15881
15965
|
messageCode: external_exports.string().min(1).max(128).optional(),
|
|
@@ -15883,6 +15967,20 @@ var harnessInstallationStateSchema = external_exports.object({
|
|
|
15883
15967
|
notice: harnessLocalizedTextSchema.optional(),
|
|
15884
15968
|
latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
|
|
15885
15969
|
}).strict();
|
|
15970
|
+
var harnessInstallationTaskParamsSchema = external_exports.object({ taskId: external_exports.string().uuid() }).strict();
|
|
15971
|
+
var harnessInstallationTaskSchema = external_exports.discriminatedUnion("status", [
|
|
15972
|
+
external_exports.object({ taskId: external_exports.string().uuid(), status: external_exports.literal("running") }).strict(),
|
|
15973
|
+
external_exports.object({
|
|
15974
|
+
taskId: external_exports.string().uuid(),
|
|
15975
|
+
status: external_exports.literal("succeeded"),
|
|
15976
|
+
result: harnessInstallationStateSchema
|
|
15977
|
+
}).strict(),
|
|
15978
|
+
external_exports.object({
|
|
15979
|
+
taskId: external_exports.string().uuid(),
|
|
15980
|
+
status: external_exports.literal("failed"),
|
|
15981
|
+
error: external_exports.object({ code: external_exports.number().int(), message: external_exports.string().min(1).max(2048) }).strict()
|
|
15982
|
+
}).strict()
|
|
15983
|
+
]);
|
|
15886
15984
|
|
|
15887
15985
|
// ../../shared-contracts/dist/codex-accounts.js
|
|
15888
15986
|
var accountIdSchema = external_exports.string().min(1).max(256).regex(/^[A-Za-z0-9._~-]+$/u);
|
|
@@ -16368,6 +16466,18 @@ function sanitizeDiagnosticTail(value) {
|
|
|
16368
16466
|
return redacted.length <= DIAGNOSTIC_TAIL_MAX_LENGTH ? redacted : redacted.slice(-DIAGNOSTIC_TAIL_MAX_LENGTH);
|
|
16369
16467
|
}
|
|
16370
16468
|
|
|
16469
|
+
// ../../harness-adapter/dist/steer.js
|
|
16470
|
+
function unsupportedSteer(harnessLabel) {
|
|
16471
|
+
return {
|
|
16472
|
+
ok: false,
|
|
16473
|
+
error: {
|
|
16474
|
+
code: "unsupported",
|
|
16475
|
+
message: `${harnessLabel} cannot steer an active Turn natively`,
|
|
16476
|
+
retryable: false
|
|
16477
|
+
}
|
|
16478
|
+
};
|
|
16479
|
+
}
|
|
16480
|
+
|
|
16371
16481
|
// ../../harness-adapter/dist/usage.js
|
|
16372
16482
|
var tokenFields = [
|
|
16373
16483
|
"inputTokens",
|
|
@@ -16395,6 +16505,7 @@ var usageFields = /* @__PURE__ */ new Set([
|
|
|
16395
16505
|
...safeIntegerFields,
|
|
16396
16506
|
...percentFields,
|
|
16397
16507
|
"sessionCacheUsage",
|
|
16508
|
+
"composerIndicators",
|
|
16398
16509
|
"totalCostUsd",
|
|
16399
16510
|
"totalCredits",
|
|
16400
16511
|
"contextUsagePercent",
|
|
@@ -18521,10 +18632,13 @@ function usageSessionTitle(value) {
|
|
|
18521
18632
|
return void 0;
|
|
18522
18633
|
if (normalized.length <= MAX_SESSION_TITLE_LENGTH)
|
|
18523
18634
|
return normalized;
|
|
18524
|
-
|
|
18525
|
-
|
|
18526
|
-
|
|
18527
|
-
|
|
18635
|
+
let title = "";
|
|
18636
|
+
for (const character of normalized) {
|
|
18637
|
+
if (title.length + character.length >= MAX_SESSION_TITLE_LENGTH)
|
|
18638
|
+
break;
|
|
18639
|
+
title += character;
|
|
18640
|
+
}
|
|
18641
|
+
return `${title.trimEnd()}…`;
|
|
18528
18642
|
}
|
|
18529
18643
|
function sessionIdOk(value) {
|
|
18530
18644
|
return typeof value === "string" && value.length > 0 && value.length <= MAX_SESSION_ID_LENGTH;
|
|
@@ -19513,6 +19627,8 @@ var HermesSession = class {
|
|
|
19513
19627
|
switch (command.type) {
|
|
19514
19628
|
case "turn.start":
|
|
19515
19629
|
return this.#startTurn(command);
|
|
19630
|
+
case "turn.steer":
|
|
19631
|
+
return Promise.resolve(unsupportedSteer("Hermes"));
|
|
19516
19632
|
case "turn.cancel":
|
|
19517
19633
|
return this.#cancelTurn(command);
|
|
19518
19634
|
case "interaction.respond":
|
|
@@ -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
|
}
|
|
@@ -15143,10 +15143,19 @@ var model = external_exports.string().min(1).max(512);
|
|
|
15143
15143
|
var project = external_exports.string().min(1).max(4096);
|
|
15144
15144
|
var usageStatisticsParamsSchema = external_exports.strictObject({
|
|
15145
15145
|
range: external_exports.enum(USAGE_STATISTICS_RANGES),
|
|
15146
|
+
/** Display timezone for ranges, dates and hourly buckets; omitted means the Host's local zone. */
|
|
15147
|
+
timeZone: external_exports.string().min(1).max(128).refine((value) => {
|
|
15148
|
+
try {
|
|
15149
|
+
new Intl.DateTimeFormat("en", { timeZone: value });
|
|
15150
|
+
return true;
|
|
15151
|
+
} catch {
|
|
15152
|
+
return false;
|
|
15153
|
+
}
|
|
15154
|
+
}, "Unsupported usage statistics timezone").optional(),
|
|
15146
15155
|
harness: harness.optional(),
|
|
15147
15156
|
model: model.nullable().optional(),
|
|
15148
15157
|
project: project.nullable().optional(),
|
|
15149
|
-
/** One
|
|
15158
|
+
/** One date in the query timezone inside the range. */
|
|
15150
15159
|
date: localDate.optional()
|
|
15151
15160
|
});
|
|
15152
15161
|
var usageStatisticsTotalsSchema = external_exports.strictObject({
|
|
@@ -15182,7 +15191,7 @@ var usageStatisticsSessionSchema = external_exports.strictObject({
|
|
|
15182
15191
|
});
|
|
15183
15192
|
var usageStatisticsResultSchema = external_exports.strictObject({
|
|
15184
15193
|
range: external_exports.enum(USAGE_STATISTICS_RANGES),
|
|
15185
|
-
/** First
|
|
15194
|
+
/** First date in the query timezone (Host local when omitted); null for all time. */
|
|
15186
15195
|
from: localDate.nullable(),
|
|
15187
15196
|
to: localDate,
|
|
15188
15197
|
/** The filters these figures apply, echoed so a late answer to older filters is recognised. */
|
|
@@ -15222,7 +15231,7 @@ var usageStatisticsResultSchema = external_exports.strictObject({
|
|
|
15222
15231
|
totals: usageStatisticsTotalsSchema,
|
|
15223
15232
|
/** Each date and Harness of the range: every filter except the day. */
|
|
15224
15233
|
daily: external_exports.array(external_exports.strictObject({ date: localDate, harness, ...totals })).max(2e5),
|
|
15225
|
-
/**
|
|
15234
|
+
/** Weekday (0 = Sunday) and hour in the query timezone, all filters applied. */
|
|
15226
15235
|
hourly: external_exports.array(external_exports.strictObject({
|
|
15227
15236
|
weekday: external_exports.number().int().min(0).max(6),
|
|
15228
15237
|
hour: external_exports.number().int().min(0).max(23),
|
|
@@ -15262,6 +15271,51 @@ var hostInteractionIdSchema = opaqueIdSchema.brand();
|
|
|
15262
15271
|
var threadPrewarmDiscardParamsSchema = external_exports.object({ threadId: hostThreadIdSchema });
|
|
15263
15272
|
var threadPrewarmDiscardResultSchema = external_exports.object({ discarded: external_exports.boolean() });
|
|
15264
15273
|
|
|
15274
|
+
// ../../shared-contracts/dist/thread-questions.js
|
|
15275
|
+
var field = external_exports.discriminatedUnion("type", [
|
|
15276
|
+
external_exports.object({
|
|
15277
|
+
id: external_exports.string().min(1),
|
|
15278
|
+
type: external_exports.literal("choice"),
|
|
15279
|
+
prompt: external_exports.string(),
|
|
15280
|
+
options: external_exports.array(external_exports.object({
|
|
15281
|
+
value: external_exports.string().min(1),
|
|
15282
|
+
label: external_exports.string(),
|
|
15283
|
+
description: external_exports.string().optional()
|
|
15284
|
+
})).min(1),
|
|
15285
|
+
multiple: external_exports.boolean(),
|
|
15286
|
+
allowOther: external_exports.boolean(),
|
|
15287
|
+
optional: external_exports.boolean()
|
|
15288
|
+
}),
|
|
15289
|
+
external_exports.object({
|
|
15290
|
+
id: external_exports.string().min(1),
|
|
15291
|
+
type: external_exports.literal("text"),
|
|
15292
|
+
prompt: external_exports.string(),
|
|
15293
|
+
multiline: external_exports.boolean(),
|
|
15294
|
+
secret: external_exports.literal(false),
|
|
15295
|
+
optional: external_exports.boolean(),
|
|
15296
|
+
placeholder: external_exports.string().optional(),
|
|
15297
|
+
prefill: external_exports.string().optional()
|
|
15298
|
+
})
|
|
15299
|
+
]);
|
|
15300
|
+
var threadQuestionSchema = external_exports.object({
|
|
15301
|
+
interactionId: external_exports.string().min(1),
|
|
15302
|
+
turnId: external_exports.string().min(1),
|
|
15303
|
+
title: external_exports.string().optional(),
|
|
15304
|
+
questions: external_exports.array(field).min(1)
|
|
15305
|
+
}).refine(({ questions }) => questions.some((q) => q.type === "choice" && q.multiple), {
|
|
15306
|
+
message: "Shared cards require at least one multi-select question"
|
|
15307
|
+
});
|
|
15308
|
+
var threadQuestionsListParamsSchema = external_exports.strictObject({ threadId: external_exports.string().min(1) });
|
|
15309
|
+
var threadQuestionsResultSchema = external_exports.object({ questions: external_exports.array(threadQuestionSchema) });
|
|
15310
|
+
var threadQuestionRespondParamsSchema = external_exports.strictObject({
|
|
15311
|
+
threadId: external_exports.string().min(1),
|
|
15312
|
+
turnId: external_exports.string().min(1),
|
|
15313
|
+
interactionId: external_exports.string().min(1),
|
|
15314
|
+
answers: external_exports.record(external_exports.string(), external_exports.array(external_exports.string())),
|
|
15315
|
+
cancelled: external_exports.boolean().default(false)
|
|
15316
|
+
});
|
|
15317
|
+
var threadQuestionRespondResultSchema = external_exports.object({ accepted: external_exports.literal(true) });
|
|
15318
|
+
|
|
15265
15319
|
// ../../shared-contracts/dist/console.js
|
|
15266
15320
|
var consoleAnnouncementSchema = external_exports.strictObject({
|
|
15267
15321
|
title: external_exports.string().trim().min(1).max(200),
|
|
@@ -15282,6 +15336,8 @@ var CONSOLE_HOST_METHODS = Object.freeze([
|
|
|
15282
15336
|
"codexhost/harness/display-settings/set",
|
|
15283
15337
|
"codexhost/harness/inspect",
|
|
15284
15338
|
"codexhost/harness/installation",
|
|
15339
|
+
"codexhost/harness/installation/start",
|
|
15340
|
+
"codexhost/harness/installation/status",
|
|
15285
15341
|
"codexhost/harness/launch-settings/get",
|
|
15286
15342
|
"codexhost/harness/launch-settings/set",
|
|
15287
15343
|
"codexhost/harness/web-ui/open",
|
|
@@ -15357,7 +15413,18 @@ var threadManualCompactionStartedSchema = external_exports.strictObject({
|
|
|
15357
15413
|
var nonNegativeSafeIntegerSchema = external_exports.number().int().safe().nonnegative();
|
|
15358
15414
|
var finiteNonNegativeNumberSchema = external_exports.number().finite().nonnegative();
|
|
15359
15415
|
var cacheHitRatePercentSchema = external_exports.number().finite().min(0).max(100);
|
|
15416
|
+
var indicatorTextSchema = (maximum) => harnessLocalizedTextSchema.refine((entries) => Object.values(entries).every((text) => text.length <= maximum));
|
|
15417
|
+
var composerIndicatorsSchema = external_exports.array(external_exports.object({
|
|
15418
|
+
kind: external_exports.literal("countdown"),
|
|
15419
|
+
id: external_exports.string().min(1).max(64),
|
|
15420
|
+
expiresAtUnix: nonNegativeSafeIntegerSchema,
|
|
15421
|
+
label: indicatorTextSchema(256).optional(),
|
|
15422
|
+
tooltip: indicatorTextSchema(1024).optional()
|
|
15423
|
+
}).strict()).max(2).refine((entries) => new Set(entries.map(({ id }) => id)).size === entries.length, {
|
|
15424
|
+
message: "Composer indicator IDs must be unique"
|
|
15425
|
+
});
|
|
15360
15426
|
var threadUsageSnapshotSchema = external_exports.object({
|
|
15427
|
+
composerIndicators: composerIndicatorsSchema.optional(),
|
|
15361
15428
|
inputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
15362
15429
|
cachedInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
15363
15430
|
cacheWriteInputTokens: nonNegativeSafeIntegerSchema.optional(),
|
|
@@ -15765,7 +15832,9 @@ var harnessSessionCapabilitiesSchema = external_exports.object({
|
|
|
15765
15832
|
}).strict().optional(),
|
|
15766
15833
|
autonomousTurns: external_exports.object({
|
|
15767
15834
|
observe: external_exports.boolean()
|
|
15768
|
-
}).strict().optional()
|
|
15835
|
+
}).strict().optional(),
|
|
15836
|
+
/** True only when `turn.steer` delivers input into the active Turn through a native primitive. */
|
|
15837
|
+
steer: external_exports.boolean().optional()
|
|
15769
15838
|
}).strict();
|
|
15770
15839
|
var harnessConfigurationStateSchema = external_exports.object({
|
|
15771
15840
|
effectiveModel: harnessModelRefSchema.optional(),
|
|
@@ -15812,7 +15881,9 @@ var harnessInspectionSchema = external_exports.union([
|
|
|
15812
15881
|
var harnessInspectParamsSchema = external_exports.object({
|
|
15813
15882
|
harnessId: harnessIdSchema,
|
|
15814
15883
|
cwd: nonBlankTextSchema2.max(16384).optional(),
|
|
15815
|
-
refresh: external_exports.boolean().optional()
|
|
15884
|
+
refresh: external_exports.boolean().optional(),
|
|
15885
|
+
/** `availability` asks only whether the Harness can run; see `InspectHarnessInput.purpose`. */
|
|
15886
|
+
purpose: external_exports.literal("availability").optional()
|
|
15816
15887
|
}).strict();
|
|
15817
15888
|
var harnessWebUiOpenParamsSchema = external_exports.object({
|
|
15818
15889
|
harnessId: harnessIdSchema
|
|
@@ -15895,6 +15966,15 @@ var threadOwnershipListResultSchema = external_exports.object({
|
|
|
15895
15966
|
seen.add(thread.threadId);
|
|
15896
15967
|
}
|
|
15897
15968
|
});
|
|
15969
|
+
var threadSteeringInspectParamsSchema = external_exports.object({
|
|
15970
|
+
threadId: hostThreadIdSchema,
|
|
15971
|
+
/** The text about to be steered; a Harness command always stops and restarts. */
|
|
15972
|
+
text: external_exports.string().optional()
|
|
15973
|
+
}).strict();
|
|
15974
|
+
var threadSteerDeliverySchema = external_exports.enum(["activeTurn", "newTurn"]);
|
|
15975
|
+
var threadSteeringInspectResultSchema = external_exports.object({
|
|
15976
|
+
delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
|
|
15977
|
+
}).strict();
|
|
15898
15978
|
|
|
15899
15979
|
// ../../shared-contracts/dist/harness-plugins.js
|
|
15900
15980
|
var HARNESS_PLUGIN_MANIFEST_MAX_BYTES = 32 * 1024;
|
|
@@ -15996,6 +16076,10 @@ var harnessInstallationStateSchema = external_exports.object({
|
|
|
15996
16076
|
latestVersion: external_exports.string().min(1).max(128),
|
|
15997
16077
|
updateAvailable: external_exports.boolean(),
|
|
15998
16078
|
canUpdate: external_exports.boolean(),
|
|
16079
|
+
/** Defaults to CLI; some Harnesses ship only inside a desktop application. */
|
|
16080
|
+
versionKind: external_exports.enum(["cli", "application"]).optional(),
|
|
16081
|
+
/** Official download opened by the user; does not imply an automatic installation. */
|
|
16082
|
+
manualUpdateUrl: external_exports.url().max(2048).refine((value) => /^https:\/\/[^/?#@]+(?:[/?#]|$)/iu.test(value), "Manual updates require a credential-free HTTPS URL").optional(),
|
|
15999
16083
|
// Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
|
|
16000
16084
|
message: external_exports.string().max(2048).optional(),
|
|
16001
16085
|
messageCode: external_exports.string().min(1).max(128).optional(),
|
|
@@ -16003,6 +16087,20 @@ var harnessInstallationStateSchema = external_exports.object({
|
|
|
16003
16087
|
notice: harnessLocalizedTextSchema.optional(),
|
|
16004
16088
|
latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
|
|
16005
16089
|
}).strict();
|
|
16090
|
+
var harnessInstallationTaskParamsSchema = external_exports.object({ taskId: external_exports.string().uuid() }).strict();
|
|
16091
|
+
var harnessInstallationTaskSchema = external_exports.discriminatedUnion("status", [
|
|
16092
|
+
external_exports.object({ taskId: external_exports.string().uuid(), status: external_exports.literal("running") }).strict(),
|
|
16093
|
+
external_exports.object({
|
|
16094
|
+
taskId: external_exports.string().uuid(),
|
|
16095
|
+
status: external_exports.literal("succeeded"),
|
|
16096
|
+
result: harnessInstallationStateSchema
|
|
16097
|
+
}).strict(),
|
|
16098
|
+
external_exports.object({
|
|
16099
|
+
taskId: external_exports.string().uuid(),
|
|
16100
|
+
status: external_exports.literal("failed"),
|
|
16101
|
+
error: external_exports.object({ code: external_exports.number().int(), message: external_exports.string().min(1).max(2048) }).strict()
|
|
16102
|
+
}).strict()
|
|
16103
|
+
]);
|
|
16006
16104
|
|
|
16007
16105
|
// ../../shared-contracts/dist/codex-accounts.js
|
|
16008
16106
|
var accountIdSchema = external_exports.string().min(1).max(256).regex(/^[A-Za-z0-9._~-]+$/u);
|
|
@@ -16492,6 +16590,18 @@ function sanitizeDiagnosticTail(value) {
|
|
|
16492
16590
|
return redacted.length <= DIAGNOSTIC_TAIL_MAX_LENGTH ? redacted : redacted.slice(-DIAGNOSTIC_TAIL_MAX_LENGTH);
|
|
16493
16591
|
}
|
|
16494
16592
|
|
|
16593
|
+
// ../../harness-adapter/dist/steer.js
|
|
16594
|
+
function unsupportedSteer(harnessLabel) {
|
|
16595
|
+
return {
|
|
16596
|
+
ok: false,
|
|
16597
|
+
error: {
|
|
16598
|
+
code: "unsupported",
|
|
16599
|
+
message: `${harnessLabel} cannot steer an active Turn natively`,
|
|
16600
|
+
retryable: false
|
|
16601
|
+
}
|
|
16602
|
+
};
|
|
16603
|
+
}
|
|
16604
|
+
|
|
16495
16605
|
// ../../harness-adapter/dist/usage.js
|
|
16496
16606
|
var tokenFields = [
|
|
16497
16607
|
"inputTokens",
|
|
@@ -16519,6 +16629,7 @@ var usageFields = /* @__PURE__ */ new Set([
|
|
|
16519
16629
|
...safeIntegerFields,
|
|
16520
16630
|
...percentFields,
|
|
16521
16631
|
"sessionCacheUsage",
|
|
16632
|
+
"composerIndicators",
|
|
16522
16633
|
"totalCostUsd",
|
|
16523
16634
|
"totalCredits",
|
|
16524
16635
|
"contextUsagePercent",
|
|
@@ -16541,26 +16652,27 @@ function parseHostUsage(value) {
|
|
|
16541
16652
|
throw new Error(`Harness Usage contains unknown field '${key}'`);
|
|
16542
16653
|
}
|
|
16543
16654
|
}
|
|
16544
|
-
|
|
16655
|
+
const indicators = value.composerIndicators === void 0 ? {} : { composerIndicators: composerIndicatorsSchema.parse(value.composerIndicators) };
|
|
16656
|
+
for (const field2 of [
|
|
16545
16657
|
"totalCredits",
|
|
16546
16658
|
"contextUsagePercent",
|
|
16547
16659
|
"apiOutputTokensPerSecond"
|
|
16548
16660
|
]) {
|
|
16549
|
-
const candidate = value[
|
|
16661
|
+
const candidate = value[field2];
|
|
16550
16662
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
|
|
16551
|
-
throw new Error(`Harness Usage '${
|
|
16663
|
+
throw new Error(`Harness Usage '${field2}' must be a finite non-negative number`);
|
|
16552
16664
|
}
|
|
16553
16665
|
}
|
|
16554
|
-
for (const
|
|
16555
|
-
const candidate = value[
|
|
16666
|
+
for (const field2 of tokenFields) {
|
|
16667
|
+
const candidate = value[field2];
|
|
16556
16668
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
|
|
16557
|
-
throw new Error(`Harness Usage '${
|
|
16669
|
+
throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
|
|
16558
16670
|
}
|
|
16559
16671
|
}
|
|
16560
|
-
for (const
|
|
16561
|
-
const candidate = value[
|
|
16672
|
+
for (const field2 of safeIntegerFields) {
|
|
16673
|
+
const candidate = value[field2];
|
|
16562
16674
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
|
|
16563
|
-
throw new Error(`Harness Usage '${
|
|
16675
|
+
throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
|
|
16564
16676
|
}
|
|
16565
16677
|
}
|
|
16566
16678
|
if (value.outputTokensPerSecond !== void 0 && (typeof value.outputTokensPerSecond !== "number" || !Number.isFinite(value.outputTokensPerSecond) || value.outputTokensPerSecond < 0)) {
|
|
@@ -16569,10 +16681,10 @@ function parseHostUsage(value) {
|
|
|
16569
16681
|
if (value.totalCostUsd !== void 0 && (typeof value.totalCostUsd !== "number" || !Number.isFinite(value.totalCostUsd) || value.totalCostUsd < 0)) {
|
|
16570
16682
|
throw new Error("Harness Usage 'totalCostUsd' must be a finite non-negative number");
|
|
16571
16683
|
}
|
|
16572
|
-
for (const
|
|
16573
|
-
const candidate = value[
|
|
16684
|
+
for (const field2 of percentFields) {
|
|
16685
|
+
const candidate = value[field2];
|
|
16574
16686
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0 || candidate > 100)) {
|
|
16575
|
-
throw new Error(`Harness Usage '${
|
|
16687
|
+
throw new Error(`Harness Usage '${field2}' must be between 0 and 100`);
|
|
16576
16688
|
}
|
|
16577
16689
|
}
|
|
16578
16690
|
if (value.sessionCacheUsage !== void 0) {
|
|
@@ -16611,9 +16723,9 @@ function parseHostUsage(value) {
|
|
|
16611
16723
|
if (value.costSource !== "publicPrice") {
|
|
16612
16724
|
throw new Error("Harness Usage 'unpricedModels' must be provided with a 'publicPrice' cost");
|
|
16613
16725
|
}
|
|
16614
|
-
return { ...value, unpricedModels: [...models] };
|
|
16726
|
+
return { ...value, ...indicators, unpricedModels: [...models] };
|
|
16615
16727
|
}
|
|
16616
|
-
return { ...value };
|
|
16728
|
+
return { ...value, ...indicators };
|
|
16617
16729
|
}
|
|
16618
16730
|
var requestTokenFields = [
|
|
16619
16731
|
"inputTokens",
|
|
@@ -24422,6 +24534,8 @@ var KimiSession = class {
|
|
|
24422
24534
|
switch (command.type) {
|
|
24423
24535
|
case "turn.start":
|
|
24424
24536
|
return this.#handleTurnStart(command);
|
|
24537
|
+
case "turn.steer":
|
|
24538
|
+
return unsupportedSteer("Kimi ACP");
|
|
24425
24539
|
case "turn.cancel":
|
|
24426
24540
|
return this.#handleTurnCancel(command);
|
|
24427
24541
|
case "interaction.respond":
|