@codexhost/cli-win32-arm64 0.14.0 → 0.16.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 +55 -7
- package/app/console-web.js +281 -79
- package/app/desktop-controller.mjs +155 -22
- package/app/host-runtime.mjs +548 -148
- package/app/plugins/antigravity/plugin.mjs +342 -53
- package/app/plugins/claude-code/plugin.mjs +393 -162
- package/app/plugins/codebuddy/plugin.mjs +245 -49
- package/app/plugins/codex-usage/plugin.mjs +75 -28
- package/app/plugins/copilot/plugin.mjs +100 -53
- package/app/plugins/cursor-cli/plugin.mjs +207 -46
- package/app/plugins/deepseek-harness/plugin.mjs +103 -36
- package/app/plugins/grok/plugin.mjs +354 -84
- package/app/plugins/hermes/plugin.mjs +50 -3
- package/app/plugins/kimi-code/plugin.mjs +62 -15
- package/app/plugins/kiro-cli/plugin.mjs +62 -15
- package/app/plugins/omp/plugin.mjs +82 -35
- package/app/plugins/opencode/plugin.mjs +104 -57
- package/app/plugins/pi/plugin.mjs +134 -50
- package/app/plugins/qoder/plugin.mjs +72 -25
- package/app/plugins/qoder-cn/plugin.mjs +72 -25
- package/app/plugins/workbuddy/plugin.mjs +245 -49
- package/app/plugins/zcode/plugin.mjs +101 -29
- package/app/renderer-extension.js +2353 -344
- 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
|
}
|
|
@@ -15044,6 +15044,8 @@ var usageStatisticsTotalsSchema = external_exports.strictObject({
|
|
|
15044
15044
|
cachedInputTokens: count,
|
|
15045
15045
|
cacheWriteInputTokens: count,
|
|
15046
15046
|
cacheKnownInputTokens: count,
|
|
15047
|
+
cacheHitCachedInputTokens: count,
|
|
15048
|
+
cacheHitInputTokens: count,
|
|
15047
15049
|
outputTokens: count,
|
|
15048
15050
|
reasoningOutputTokens: count,
|
|
15049
15051
|
/** USD at the public price, summed over the priced requests only. */
|
|
@@ -15151,6 +15153,51 @@ var hostInteractionIdSchema = opaqueIdSchema.brand();
|
|
|
15151
15153
|
var threadPrewarmDiscardParamsSchema = external_exports.object({ threadId: hostThreadIdSchema });
|
|
15152
15154
|
var threadPrewarmDiscardResultSchema = external_exports.object({ discarded: external_exports.boolean() });
|
|
15153
15155
|
|
|
15156
|
+
// ../../shared-contracts/dist/thread-questions.js
|
|
15157
|
+
var field = external_exports.discriminatedUnion("type", [
|
|
15158
|
+
external_exports.object({
|
|
15159
|
+
id: external_exports.string().min(1),
|
|
15160
|
+
type: external_exports.literal("choice"),
|
|
15161
|
+
prompt: external_exports.string(),
|
|
15162
|
+
options: external_exports.array(external_exports.object({
|
|
15163
|
+
value: external_exports.string().min(1),
|
|
15164
|
+
label: external_exports.string(),
|
|
15165
|
+
description: external_exports.string().optional()
|
|
15166
|
+
})).min(1),
|
|
15167
|
+
multiple: external_exports.boolean(),
|
|
15168
|
+
allowOther: external_exports.boolean(),
|
|
15169
|
+
optional: external_exports.boolean()
|
|
15170
|
+
}),
|
|
15171
|
+
external_exports.object({
|
|
15172
|
+
id: external_exports.string().min(1),
|
|
15173
|
+
type: external_exports.literal("text"),
|
|
15174
|
+
prompt: external_exports.string(),
|
|
15175
|
+
multiline: external_exports.boolean(),
|
|
15176
|
+
secret: external_exports.literal(false),
|
|
15177
|
+
optional: external_exports.boolean(),
|
|
15178
|
+
placeholder: external_exports.string().optional(),
|
|
15179
|
+
prefill: external_exports.string().optional()
|
|
15180
|
+
})
|
|
15181
|
+
]);
|
|
15182
|
+
var threadQuestionSchema = external_exports.object({
|
|
15183
|
+
interactionId: external_exports.string().min(1),
|
|
15184
|
+
turnId: external_exports.string().min(1),
|
|
15185
|
+
title: external_exports.string().optional(),
|
|
15186
|
+
questions: external_exports.array(field).min(1)
|
|
15187
|
+
}).refine(({ questions }) => questions.some((q) => q.type === "choice" && q.multiple), {
|
|
15188
|
+
message: "Shared cards require at least one multi-select question"
|
|
15189
|
+
});
|
|
15190
|
+
var threadQuestionsListParamsSchema = external_exports.strictObject({ threadId: external_exports.string().min(1) });
|
|
15191
|
+
var threadQuestionsResultSchema = external_exports.object({ questions: external_exports.array(threadQuestionSchema) });
|
|
15192
|
+
var threadQuestionRespondParamsSchema = external_exports.strictObject({
|
|
15193
|
+
threadId: external_exports.string().min(1),
|
|
15194
|
+
turnId: external_exports.string().min(1),
|
|
15195
|
+
interactionId: external_exports.string().min(1),
|
|
15196
|
+
answers: external_exports.record(external_exports.string(), external_exports.array(external_exports.string())),
|
|
15197
|
+
cancelled: external_exports.boolean().default(false)
|
|
15198
|
+
});
|
|
15199
|
+
var threadQuestionRespondResultSchema = external_exports.object({ accepted: external_exports.literal(true) });
|
|
15200
|
+
|
|
15154
15201
|
// ../../shared-contracts/dist/console.js
|
|
15155
15202
|
var consoleAnnouncementSchema = external_exports.strictObject({
|
|
15156
15203
|
title: external_exports.string().trim().min(1).max(200),
|
|
@@ -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/console.js
|
|
15275
15322
|
var consoleAnnouncementSchema = external_exports.strictObject({
|
|
15276
15323
|
title: external_exports.string().trim().min(1).max(200),
|
|
@@ -16608,26 +16655,26 @@ function parseHostUsage(value) {
|
|
|
16608
16655
|
}
|
|
16609
16656
|
}
|
|
16610
16657
|
const indicators = value.composerIndicators === void 0 ? {} : { composerIndicators: composerIndicatorsSchema.parse(value.composerIndicators) };
|
|
16611
|
-
for (const
|
|
16658
|
+
for (const field2 of [
|
|
16612
16659
|
"totalCredits",
|
|
16613
16660
|
"contextUsagePercent",
|
|
16614
16661
|
"apiOutputTokensPerSecond"
|
|
16615
16662
|
]) {
|
|
16616
|
-
const candidate = value[
|
|
16663
|
+
const candidate = value[field2];
|
|
16617
16664
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
|
|
16618
|
-
throw new Error(`Harness Usage '${
|
|
16665
|
+
throw new Error(`Harness Usage '${field2}' must be a finite non-negative number`);
|
|
16619
16666
|
}
|
|
16620
16667
|
}
|
|
16621
|
-
for (const
|
|
16622
|
-
const candidate = value[
|
|
16668
|
+
for (const field2 of tokenFields) {
|
|
16669
|
+
const candidate = value[field2];
|
|
16623
16670
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
|
|
16624
|
-
throw new Error(`Harness Usage '${
|
|
16671
|
+
throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
|
|
16625
16672
|
}
|
|
16626
16673
|
}
|
|
16627
|
-
for (const
|
|
16628
|
-
const candidate = value[
|
|
16674
|
+
for (const field2 of safeIntegerFields) {
|
|
16675
|
+
const candidate = value[field2];
|
|
16629
16676
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
|
|
16630
|
-
throw new Error(`Harness Usage '${
|
|
16677
|
+
throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
|
|
16631
16678
|
}
|
|
16632
16679
|
}
|
|
16633
16680
|
if (value.outputTokensPerSecond !== void 0 && (typeof value.outputTokensPerSecond !== "number" || !Number.isFinite(value.outputTokensPerSecond) || value.outputTokensPerSecond < 0)) {
|
|
@@ -16636,10 +16683,10 @@ function parseHostUsage(value) {
|
|
|
16636
16683
|
if (value.totalCostUsd !== void 0 && (typeof value.totalCostUsd !== "number" || !Number.isFinite(value.totalCostUsd) || value.totalCostUsd < 0)) {
|
|
16637
16684
|
throw new Error("Harness Usage 'totalCostUsd' must be a finite non-negative number");
|
|
16638
16685
|
}
|
|
16639
|
-
for (const
|
|
16640
|
-
const candidate = value[
|
|
16686
|
+
for (const field2 of percentFields) {
|
|
16687
|
+
const candidate = value[field2];
|
|
16641
16688
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0 || candidate > 100)) {
|
|
16642
|
-
throw new Error(`Harness Usage '${
|
|
16689
|
+
throw new Error(`Harness Usage '${field2}' must be between 0 and 100`);
|
|
16643
16690
|
}
|
|
16644
16691
|
}
|
|
16645
16692
|
if (value.sessionCacheUsage !== void 0) {
|
|
@@ -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/console.js
|
|
15134
15181
|
var consoleAnnouncementSchema = external_exports.strictObject({
|
|
15135
15182
|
title: external_exports.string().trim().min(1).max(200),
|
|
@@ -16463,26 +16510,26 @@ function parseHostUsage(value) {
|
|
|
16463
16510
|
}
|
|
16464
16511
|
}
|
|
16465
16512
|
const indicators = value.composerIndicators === void 0 ? {} : { composerIndicators: composerIndicatorsSchema.parse(value.composerIndicators) };
|
|
16466
|
-
for (const
|
|
16513
|
+
for (const field2 of [
|
|
16467
16514
|
"totalCredits",
|
|
16468
16515
|
"contextUsagePercent",
|
|
16469
16516
|
"apiOutputTokensPerSecond"
|
|
16470
16517
|
]) {
|
|
16471
|
-
const candidate = value[
|
|
16518
|
+
const candidate = value[field2];
|
|
16472
16519
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
|
|
16473
|
-
throw new Error(`Harness Usage '${
|
|
16520
|
+
throw new Error(`Harness Usage '${field2}' must be a finite non-negative number`);
|
|
16474
16521
|
}
|
|
16475
16522
|
}
|
|
16476
|
-
for (const
|
|
16477
|
-
const candidate = value[
|
|
16523
|
+
for (const field2 of tokenFields) {
|
|
16524
|
+
const candidate = value[field2];
|
|
16478
16525
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
|
|
16479
|
-
throw new Error(`Harness Usage '${
|
|
16526
|
+
throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
|
|
16480
16527
|
}
|
|
16481
16528
|
}
|
|
16482
|
-
for (const
|
|
16483
|
-
const candidate = value[
|
|
16529
|
+
for (const field2 of safeIntegerFields) {
|
|
16530
|
+
const candidate = value[field2];
|
|
16484
16531
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
|
|
16485
|
-
throw new Error(`Harness Usage '${
|
|
16532
|
+
throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
|
|
16486
16533
|
}
|
|
16487
16534
|
}
|
|
16488
16535
|
if (value.outputTokensPerSecond !== void 0 && (typeof value.outputTokensPerSecond !== "number" || !Number.isFinite(value.outputTokensPerSecond) || value.outputTokensPerSecond < 0)) {
|
|
@@ -16491,10 +16538,10 @@ function parseHostUsage(value) {
|
|
|
16491
16538
|
if (value.totalCostUsd !== void 0 && (typeof value.totalCostUsd !== "number" || !Number.isFinite(value.totalCostUsd) || value.totalCostUsd < 0)) {
|
|
16492
16539
|
throw new Error("Harness Usage 'totalCostUsd' must be a finite non-negative number");
|
|
16493
16540
|
}
|
|
16494
|
-
for (const
|
|
16495
|
-
const candidate = value[
|
|
16541
|
+
for (const field2 of percentFields) {
|
|
16542
|
+
const candidate = value[field2];
|
|
16496
16543
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0 || candidate > 100)) {
|
|
16497
|
-
throw new Error(`Harness Usage '${
|
|
16544
|
+
throw new Error(`Harness Usage '${field2}' must be between 0 and 100`);
|
|
16498
16545
|
}
|
|
16499
16546
|
}
|
|
16500
16547
|
if (value.sessionCacheUsage !== void 0) {
|
|
@@ -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/console.js
|
|
15337
15384
|
var consoleAnnouncementSchema = external_exports.strictObject({
|
|
15338
15385
|
title: external_exports.string().trim().min(1).max(200),
|
|
@@ -16982,26 +17029,26 @@ function parseHostUsage(value) {
|
|
|
16982
17029
|
}
|
|
16983
17030
|
}
|
|
16984
17031
|
const indicators = value.composerIndicators === void 0 ? {} : { composerIndicators: composerIndicatorsSchema.parse(value.composerIndicators) };
|
|
16985
|
-
for (const
|
|
17032
|
+
for (const field2 of [
|
|
16986
17033
|
"totalCredits",
|
|
16987
17034
|
"contextUsagePercent",
|
|
16988
17035
|
"apiOutputTokensPerSecond"
|
|
16989
17036
|
]) {
|
|
16990
|
-
const candidate = value[
|
|
17037
|
+
const candidate = value[field2];
|
|
16991
17038
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
|
|
16992
|
-
throw new Error(`Harness Usage '${
|
|
17039
|
+
throw new Error(`Harness Usage '${field2}' must be a finite non-negative number`);
|
|
16993
17040
|
}
|
|
16994
17041
|
}
|
|
16995
|
-
for (const
|
|
16996
|
-
const candidate = value[
|
|
17042
|
+
for (const field2 of tokenFields) {
|
|
17043
|
+
const candidate = value[field2];
|
|
16997
17044
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
|
|
16998
|
-
throw new Error(`Harness Usage '${
|
|
17045
|
+
throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
|
|
16999
17046
|
}
|
|
17000
17047
|
}
|
|
17001
|
-
for (const
|
|
17002
|
-
const candidate = value[
|
|
17048
|
+
for (const field2 of safeIntegerFields) {
|
|
17049
|
+
const candidate = value[field2];
|
|
17003
17050
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
|
|
17004
|
-
throw new Error(`Harness Usage '${
|
|
17051
|
+
throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
|
|
17005
17052
|
}
|
|
17006
17053
|
}
|
|
17007
17054
|
if (value.outputTokensPerSecond !== void 0 && (typeof value.outputTokensPerSecond !== "number" || !Number.isFinite(value.outputTokensPerSecond) || value.outputTokensPerSecond < 0)) {
|
|
@@ -17010,10 +17057,10 @@ function parseHostUsage(value) {
|
|
|
17010
17057
|
if (value.totalCostUsd !== void 0 && (typeof value.totalCostUsd !== "number" || !Number.isFinite(value.totalCostUsd) || value.totalCostUsd < 0)) {
|
|
17011
17058
|
throw new Error("Harness Usage 'totalCostUsd' must be a finite non-negative number");
|
|
17012
17059
|
}
|
|
17013
|
-
for (const
|
|
17014
|
-
const candidate = value[
|
|
17060
|
+
for (const field2 of percentFields) {
|
|
17061
|
+
const candidate = value[field2];
|
|
17015
17062
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0 || candidate > 100)) {
|
|
17016
|
-
throw new Error(`Harness Usage '${
|
|
17063
|
+
throw new Error(`Harness Usage '${field2}' must be between 0 and 100`);
|
|
17017
17064
|
}
|
|
17018
17065
|
}
|
|
17019
17066
|
if (value.sessionCacheUsage !== void 0) {
|
|
@@ -17084,19 +17131,19 @@ function parseHostUsageRequest(value) {
|
|
|
17084
17131
|
if (typeof value.requestId !== "string" || value.requestId.length === 0) {
|
|
17085
17132
|
throw new Error("Harness Usage request 'requestId' must be a non-empty string");
|
|
17086
17133
|
}
|
|
17087
|
-
for (const
|
|
17088
|
-
const candidate = value[
|
|
17134
|
+
for (const field2 of ["model", "provider"]) {
|
|
17135
|
+
const candidate = value[field2];
|
|
17089
17136
|
if (candidate !== void 0 && (typeof candidate !== "string" || candidate.length === 0)) {
|
|
17090
|
-
throw new Error(`Harness Usage request '${
|
|
17137
|
+
throw new Error(`Harness Usage request '${field2}' must be a non-empty string`);
|
|
17091
17138
|
}
|
|
17092
17139
|
}
|
|
17093
17140
|
if (value.historical !== void 0 && typeof value.historical !== "boolean") {
|
|
17094
17141
|
throw new Error("Harness Usage request 'historical' must be a boolean");
|
|
17095
17142
|
}
|
|
17096
|
-
for (const
|
|
17097
|
-
const candidate = value[
|
|
17143
|
+
for (const field2 of requestTokenFields) {
|
|
17144
|
+
const candidate = value[field2];
|
|
17098
17145
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
|
|
17099
|
-
throw new Error(`Harness Usage request '${
|
|
17146
|
+
throw new Error(`Harness Usage request '${field2}' must be a non-negative safe integer`);
|
|
17100
17147
|
}
|
|
17101
17148
|
}
|
|
17102
17149
|
if (value.inputTokens === void 0 || value.outputTokens === void 0) {
|
|
@@ -20474,9 +20521,9 @@ function outputText(output) {
|
|
|
20474
20521
|
function stringField2(value, key) {
|
|
20475
20522
|
if (!isRecord10(value))
|
|
20476
20523
|
return void 0;
|
|
20477
|
-
const
|
|
20478
|
-
if (typeof
|
|
20479
|
-
return
|
|
20524
|
+
const field2 = value[key];
|
|
20525
|
+
if (typeof field2 === "string" && field2.length > 0)
|
|
20526
|
+
return field2;
|
|
20480
20527
|
if (isRecord10(value.input)) {
|
|
20481
20528
|
const nested = value.input[key];
|
|
20482
20529
|
if (typeof nested === "string" && nested.length > 0)
|
|
@@ -20492,8 +20539,8 @@ function stringField2(value, key) {
|
|
|
20492
20539
|
function numberField(value, key) {
|
|
20493
20540
|
if (!isRecord10(value))
|
|
20494
20541
|
return void 0;
|
|
20495
|
-
const
|
|
20496
|
-
return typeof
|
|
20542
|
+
const field2 = value[key];
|
|
20543
|
+
return typeof field2 === "number" || field2 === null ? field2 : void 0;
|
|
20497
20544
|
}
|
|
20498
20545
|
function stripDiffPrefix(pathString) {
|
|
20499
20546
|
if (typeof pathString !== "string" || pathString.length === 0)
|
|
@@ -20532,9 +20579,9 @@ function nestedToolString(value, keys) {
|
|
|
20532
20579
|
if (!isRecord10(value))
|
|
20533
20580
|
return void 0;
|
|
20534
20581
|
for (const key of keys) {
|
|
20535
|
-
const
|
|
20536
|
-
if (typeof
|
|
20537
|
-
return
|
|
20582
|
+
const field2 = value[key];
|
|
20583
|
+
if (typeof field2 === "string" && field2.length > 0)
|
|
20584
|
+
return field2;
|
|
20538
20585
|
}
|
|
20539
20586
|
for (const wrapper of ["input", "arguments", "params", "details"]) {
|
|
20540
20587
|
const nested = nestedToolString(value[wrapper], keys);
|
|
@@ -20547,15 +20594,15 @@ function patchFromResult(result) {
|
|
|
20547
20594
|
if (!isRecord10(result))
|
|
20548
20595
|
return void 0;
|
|
20549
20596
|
for (const key of ["patch", "diff", "unifiedDiff"]) {
|
|
20550
|
-
const
|
|
20551
|
-
if (typeof
|
|
20552
|
-
return
|
|
20597
|
+
const field2 = result[key];
|
|
20598
|
+
if (typeof field2 === "string" && field2.length > 0)
|
|
20599
|
+
return field2;
|
|
20553
20600
|
}
|
|
20554
20601
|
if (isRecord10(result.details)) {
|
|
20555
20602
|
for (const key of ["patch", "diff", "unifiedDiff"]) {
|
|
20556
|
-
const
|
|
20557
|
-
if (typeof
|
|
20558
|
-
return
|
|
20603
|
+
const field2 = result.details[key];
|
|
20604
|
+
if (typeof field2 === "string" && field2.length > 0)
|
|
20605
|
+
return field2;
|
|
20559
20606
|
}
|
|
20560
20607
|
}
|
|
20561
20608
|
return void 0;
|