@codexhost/cli-darwin-x64 0.14.0 → 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 +51 -6
- package/app/console-web.js +212 -64
- package/app/desktop-controller.mjs +48 -3
- package/app/host-runtime.mjs +358 -79
- package/app/plugins/antigravity/plugin.mjs +340 -53
- package/app/plugins/claude-code/plugin.mjs +373 -132
- package/app/plugins/codebuddy/plugin.mjs +205 -46
- package/app/plugins/codex-usage/plugin.mjs +73 -28
- package/app/plugins/copilot/plugin.mjs +98 -53
- package/app/plugins/cursor-cli/plugin.mjs +205 -46
- package/app/plugins/deepseek-harness/plugin.mjs +77 -32
- package/app/plugins/grok/plugin.mjs +352 -84
- package/app/plugins/hermes/plugin.mjs +48 -3
- package/app/plugins/kimi-code/plugin.mjs +60 -15
- package/app/plugins/kiro-cli/plugin.mjs +60 -15
- package/app/plugins/omp/plugin.mjs +80 -35
- package/app/plugins/opencode/plugin.mjs +102 -57
- package/app/plugins/pi/plugin.mjs +113 -43
- package/app/plugins/qoder/plugin.mjs +70 -25
- package/app/plugins/qoder-cn/plugin.mjs +70 -25
- package/app/plugins/workbuddy/plugin.mjs +205 -46
- package/app/plugins/zcode/plugin.mjs +99 -29
- package/app/renderer-extension.js +944 -249
- package/bin/codexhost +0 -0
- package/libexec/codexhost-shim +0 -0
- package/libexec/codexhost-updater +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
|
}
|
|
@@ -15151,6 +15151,51 @@ var hostInteractionIdSchema = opaqueIdSchema.brand();
|
|
|
15151
15151
|
var threadPrewarmDiscardParamsSchema = external_exports.object({ threadId: hostThreadIdSchema });
|
|
15152
15152
|
var threadPrewarmDiscardResultSchema = external_exports.object({ discarded: external_exports.boolean() });
|
|
15153
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
|
+
|
|
15154
15199
|
// ../../shared-contracts/dist/console.js
|
|
15155
15200
|
var consoleAnnouncementSchema = external_exports.strictObject({
|
|
15156
15201
|
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
|
}
|
|
@@ -15271,6 +15271,51 @@ var hostInteractionIdSchema = opaqueIdSchema.brand();
|
|
|
15271
15271
|
var threadPrewarmDiscardParamsSchema = external_exports.object({ threadId: hostThreadIdSchema });
|
|
15272
15272
|
var threadPrewarmDiscardResultSchema = external_exports.object({ discarded: external_exports.boolean() });
|
|
15273
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
|
+
|
|
15274
15319
|
// ../../shared-contracts/dist/console.js
|
|
15275
15320
|
var consoleAnnouncementSchema = external_exports.strictObject({
|
|
15276
15321
|
title: external_exports.string().trim().min(1).max(200),
|
|
@@ -16608,26 +16653,26 @@ function parseHostUsage(value) {
|
|
|
16608
16653
|
}
|
|
16609
16654
|
}
|
|
16610
16655
|
const indicators = value.composerIndicators === void 0 ? {} : { composerIndicators: composerIndicatorsSchema.parse(value.composerIndicators) };
|
|
16611
|
-
for (const
|
|
16656
|
+
for (const field2 of [
|
|
16612
16657
|
"totalCredits",
|
|
16613
16658
|
"contextUsagePercent",
|
|
16614
16659
|
"apiOutputTokensPerSecond"
|
|
16615
16660
|
]) {
|
|
16616
|
-
const candidate = value[
|
|
16661
|
+
const candidate = value[field2];
|
|
16617
16662
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
|
|
16618
|
-
throw new Error(`Harness Usage '${
|
|
16663
|
+
throw new Error(`Harness Usage '${field2}' must be a finite non-negative number`);
|
|
16619
16664
|
}
|
|
16620
16665
|
}
|
|
16621
|
-
for (const
|
|
16622
|
-
const candidate = value[
|
|
16666
|
+
for (const field2 of tokenFields) {
|
|
16667
|
+
const candidate = value[field2];
|
|
16623
16668
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
|
|
16624
|
-
throw new Error(`Harness Usage '${
|
|
16669
|
+
throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
|
|
16625
16670
|
}
|
|
16626
16671
|
}
|
|
16627
|
-
for (const
|
|
16628
|
-
const candidate = value[
|
|
16672
|
+
for (const field2 of safeIntegerFields) {
|
|
16673
|
+
const candidate = value[field2];
|
|
16629
16674
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
|
|
16630
|
-
throw new Error(`Harness Usage '${
|
|
16675
|
+
throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
|
|
16631
16676
|
}
|
|
16632
16677
|
}
|
|
16633
16678
|
if (value.outputTokensPerSecond !== void 0 && (typeof value.outputTokensPerSecond !== "number" || !Number.isFinite(value.outputTokensPerSecond) || value.outputTokensPerSecond < 0)) {
|
|
@@ -16636,10 +16681,10 @@ function parseHostUsage(value) {
|
|
|
16636
16681
|
if (value.totalCostUsd !== void 0 && (typeof value.totalCostUsd !== "number" || !Number.isFinite(value.totalCostUsd) || value.totalCostUsd < 0)) {
|
|
16637
16682
|
throw new Error("Harness Usage 'totalCostUsd' must be a finite non-negative number");
|
|
16638
16683
|
}
|
|
16639
|
-
for (const
|
|
16640
|
-
const candidate = value[
|
|
16684
|
+
for (const field2 of percentFields) {
|
|
16685
|
+
const candidate = value[field2];
|
|
16641
16686
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0 || candidate > 100)) {
|
|
16642
|
-
throw new Error(`Harness Usage '${
|
|
16687
|
+
throw new Error(`Harness Usage '${field2}' must be between 0 and 100`);
|
|
16643
16688
|
}
|
|
16644
16689
|
}
|
|
16645
16690
|
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
|
}
|
|
@@ -15130,6 +15130,51 @@ var hostInteractionIdSchema = opaqueIdSchema.brand();
|
|
|
15130
15130
|
var threadPrewarmDiscardParamsSchema = external_exports.object({ threadId: hostThreadIdSchema });
|
|
15131
15131
|
var threadPrewarmDiscardResultSchema = external_exports.object({ discarded: external_exports.boolean() });
|
|
15132
15132
|
|
|
15133
|
+
// ../../shared-contracts/dist/thread-questions.js
|
|
15134
|
+
var field = external_exports.discriminatedUnion("type", [
|
|
15135
|
+
external_exports.object({
|
|
15136
|
+
id: external_exports.string().min(1),
|
|
15137
|
+
type: external_exports.literal("choice"),
|
|
15138
|
+
prompt: external_exports.string(),
|
|
15139
|
+
options: external_exports.array(external_exports.object({
|
|
15140
|
+
value: external_exports.string().min(1),
|
|
15141
|
+
label: external_exports.string(),
|
|
15142
|
+
description: external_exports.string().optional()
|
|
15143
|
+
})).min(1),
|
|
15144
|
+
multiple: external_exports.boolean(),
|
|
15145
|
+
allowOther: external_exports.boolean(),
|
|
15146
|
+
optional: external_exports.boolean()
|
|
15147
|
+
}),
|
|
15148
|
+
external_exports.object({
|
|
15149
|
+
id: external_exports.string().min(1),
|
|
15150
|
+
type: external_exports.literal("text"),
|
|
15151
|
+
prompt: external_exports.string(),
|
|
15152
|
+
multiline: external_exports.boolean(),
|
|
15153
|
+
secret: external_exports.literal(false),
|
|
15154
|
+
optional: external_exports.boolean(),
|
|
15155
|
+
placeholder: external_exports.string().optional(),
|
|
15156
|
+
prefill: external_exports.string().optional()
|
|
15157
|
+
})
|
|
15158
|
+
]);
|
|
15159
|
+
var threadQuestionSchema = external_exports.object({
|
|
15160
|
+
interactionId: external_exports.string().min(1),
|
|
15161
|
+
turnId: external_exports.string().min(1),
|
|
15162
|
+
title: external_exports.string().optional(),
|
|
15163
|
+
questions: external_exports.array(field).min(1)
|
|
15164
|
+
}).refine(({ questions }) => questions.some((q) => q.type === "choice" && q.multiple), {
|
|
15165
|
+
message: "Shared cards require at least one multi-select question"
|
|
15166
|
+
});
|
|
15167
|
+
var threadQuestionsListParamsSchema = external_exports.strictObject({ threadId: external_exports.string().min(1) });
|
|
15168
|
+
var threadQuestionsResultSchema = external_exports.object({ questions: external_exports.array(threadQuestionSchema) });
|
|
15169
|
+
var threadQuestionRespondParamsSchema = external_exports.strictObject({
|
|
15170
|
+
threadId: external_exports.string().min(1),
|
|
15171
|
+
turnId: external_exports.string().min(1),
|
|
15172
|
+
interactionId: external_exports.string().min(1),
|
|
15173
|
+
answers: external_exports.record(external_exports.string(), external_exports.array(external_exports.string())),
|
|
15174
|
+
cancelled: external_exports.boolean().default(false)
|
|
15175
|
+
});
|
|
15176
|
+
var threadQuestionRespondResultSchema = external_exports.object({ accepted: external_exports.literal(true) });
|
|
15177
|
+
|
|
15133
15178
|
// ../../shared-contracts/dist/console.js
|
|
15134
15179
|
var consoleAnnouncementSchema = external_exports.strictObject({
|
|
15135
15180
|
title: external_exports.string().trim().min(1).max(200),
|
|
@@ -16463,26 +16508,26 @@ function parseHostUsage(value) {
|
|
|
16463
16508
|
}
|
|
16464
16509
|
}
|
|
16465
16510
|
const indicators = value.composerIndicators === void 0 ? {} : { composerIndicators: composerIndicatorsSchema.parse(value.composerIndicators) };
|
|
16466
|
-
for (const
|
|
16511
|
+
for (const field2 of [
|
|
16467
16512
|
"totalCredits",
|
|
16468
16513
|
"contextUsagePercent",
|
|
16469
16514
|
"apiOutputTokensPerSecond"
|
|
16470
16515
|
]) {
|
|
16471
|
-
const candidate = value[
|
|
16516
|
+
const candidate = value[field2];
|
|
16472
16517
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
|
|
16473
|
-
throw new Error(`Harness Usage '${
|
|
16518
|
+
throw new Error(`Harness Usage '${field2}' must be a finite non-negative number`);
|
|
16474
16519
|
}
|
|
16475
16520
|
}
|
|
16476
|
-
for (const
|
|
16477
|
-
const candidate = value[
|
|
16521
|
+
for (const field2 of tokenFields) {
|
|
16522
|
+
const candidate = value[field2];
|
|
16478
16523
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
|
|
16479
|
-
throw new Error(`Harness Usage '${
|
|
16524
|
+
throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
|
|
16480
16525
|
}
|
|
16481
16526
|
}
|
|
16482
|
-
for (const
|
|
16483
|
-
const candidate = value[
|
|
16527
|
+
for (const field2 of safeIntegerFields) {
|
|
16528
|
+
const candidate = value[field2];
|
|
16484
16529
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
|
|
16485
|
-
throw new Error(`Harness Usage '${
|
|
16530
|
+
throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
|
|
16486
16531
|
}
|
|
16487
16532
|
}
|
|
16488
16533
|
if (value.outputTokensPerSecond !== void 0 && (typeof value.outputTokensPerSecond !== "number" || !Number.isFinite(value.outputTokensPerSecond) || value.outputTokensPerSecond < 0)) {
|
|
@@ -16491,10 +16536,10 @@ function parseHostUsage(value) {
|
|
|
16491
16536
|
if (value.totalCostUsd !== void 0 && (typeof value.totalCostUsd !== "number" || !Number.isFinite(value.totalCostUsd) || value.totalCostUsd < 0)) {
|
|
16492
16537
|
throw new Error("Harness Usage 'totalCostUsd' must be a finite non-negative number");
|
|
16493
16538
|
}
|
|
16494
|
-
for (const
|
|
16495
|
-
const candidate = value[
|
|
16539
|
+
for (const field2 of percentFields) {
|
|
16540
|
+
const candidate = value[field2];
|
|
16496
16541
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0 || candidate > 100)) {
|
|
16497
|
-
throw new Error(`Harness Usage '${
|
|
16542
|
+
throw new Error(`Harness Usage '${field2}' must be between 0 and 100`);
|
|
16498
16543
|
}
|
|
16499
16544
|
}
|
|
16500
16545
|
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
|
}
|
|
@@ -15333,6 +15333,51 @@ var hostInteractionIdSchema = opaqueIdSchema.brand();
|
|
|
15333
15333
|
var threadPrewarmDiscardParamsSchema = external_exports.object({ threadId: hostThreadIdSchema });
|
|
15334
15334
|
var threadPrewarmDiscardResultSchema = external_exports.object({ discarded: external_exports.boolean() });
|
|
15335
15335
|
|
|
15336
|
+
// ../../shared-contracts/dist/thread-questions.js
|
|
15337
|
+
var field = external_exports.discriminatedUnion("type", [
|
|
15338
|
+
external_exports.object({
|
|
15339
|
+
id: external_exports.string().min(1),
|
|
15340
|
+
type: external_exports.literal("choice"),
|
|
15341
|
+
prompt: external_exports.string(),
|
|
15342
|
+
options: external_exports.array(external_exports.object({
|
|
15343
|
+
value: external_exports.string().min(1),
|
|
15344
|
+
label: external_exports.string(),
|
|
15345
|
+
description: external_exports.string().optional()
|
|
15346
|
+
})).min(1),
|
|
15347
|
+
multiple: external_exports.boolean(),
|
|
15348
|
+
allowOther: external_exports.boolean(),
|
|
15349
|
+
optional: external_exports.boolean()
|
|
15350
|
+
}),
|
|
15351
|
+
external_exports.object({
|
|
15352
|
+
id: external_exports.string().min(1),
|
|
15353
|
+
type: external_exports.literal("text"),
|
|
15354
|
+
prompt: external_exports.string(),
|
|
15355
|
+
multiline: external_exports.boolean(),
|
|
15356
|
+
secret: external_exports.literal(false),
|
|
15357
|
+
optional: external_exports.boolean(),
|
|
15358
|
+
placeholder: external_exports.string().optional(),
|
|
15359
|
+
prefill: external_exports.string().optional()
|
|
15360
|
+
})
|
|
15361
|
+
]);
|
|
15362
|
+
var threadQuestionSchema = external_exports.object({
|
|
15363
|
+
interactionId: external_exports.string().min(1),
|
|
15364
|
+
turnId: external_exports.string().min(1),
|
|
15365
|
+
title: external_exports.string().optional(),
|
|
15366
|
+
questions: external_exports.array(field).min(1)
|
|
15367
|
+
}).refine(({ questions }) => questions.some((q) => q.type === "choice" && q.multiple), {
|
|
15368
|
+
message: "Shared cards require at least one multi-select question"
|
|
15369
|
+
});
|
|
15370
|
+
var threadQuestionsListParamsSchema = external_exports.strictObject({ threadId: external_exports.string().min(1) });
|
|
15371
|
+
var threadQuestionsResultSchema = external_exports.object({ questions: external_exports.array(threadQuestionSchema) });
|
|
15372
|
+
var threadQuestionRespondParamsSchema = external_exports.strictObject({
|
|
15373
|
+
threadId: external_exports.string().min(1),
|
|
15374
|
+
turnId: external_exports.string().min(1),
|
|
15375
|
+
interactionId: external_exports.string().min(1),
|
|
15376
|
+
answers: external_exports.record(external_exports.string(), external_exports.array(external_exports.string())),
|
|
15377
|
+
cancelled: external_exports.boolean().default(false)
|
|
15378
|
+
});
|
|
15379
|
+
var threadQuestionRespondResultSchema = external_exports.object({ accepted: external_exports.literal(true) });
|
|
15380
|
+
|
|
15336
15381
|
// ../../shared-contracts/dist/console.js
|
|
15337
15382
|
var consoleAnnouncementSchema = external_exports.strictObject({
|
|
15338
15383
|
title: external_exports.string().trim().min(1).max(200),
|
|
@@ -16982,26 +17027,26 @@ function parseHostUsage(value) {
|
|
|
16982
17027
|
}
|
|
16983
17028
|
}
|
|
16984
17029
|
const indicators = value.composerIndicators === void 0 ? {} : { composerIndicators: composerIndicatorsSchema.parse(value.composerIndicators) };
|
|
16985
|
-
for (const
|
|
17030
|
+
for (const field2 of [
|
|
16986
17031
|
"totalCredits",
|
|
16987
17032
|
"contextUsagePercent",
|
|
16988
17033
|
"apiOutputTokensPerSecond"
|
|
16989
17034
|
]) {
|
|
16990
|
-
const candidate = value[
|
|
17035
|
+
const candidate = value[field2];
|
|
16991
17036
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
|
|
16992
|
-
throw new Error(`Harness Usage '${
|
|
17037
|
+
throw new Error(`Harness Usage '${field2}' must be a finite non-negative number`);
|
|
16993
17038
|
}
|
|
16994
17039
|
}
|
|
16995
|
-
for (const
|
|
16996
|
-
const candidate = value[
|
|
17040
|
+
for (const field2 of tokenFields) {
|
|
17041
|
+
const candidate = value[field2];
|
|
16997
17042
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
|
|
16998
|
-
throw new Error(`Harness Usage '${
|
|
17043
|
+
throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
|
|
16999
17044
|
}
|
|
17000
17045
|
}
|
|
17001
|
-
for (const
|
|
17002
|
-
const candidate = value[
|
|
17046
|
+
for (const field2 of safeIntegerFields) {
|
|
17047
|
+
const candidate = value[field2];
|
|
17003
17048
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
|
|
17004
|
-
throw new Error(`Harness Usage '${
|
|
17049
|
+
throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
|
|
17005
17050
|
}
|
|
17006
17051
|
}
|
|
17007
17052
|
if (value.outputTokensPerSecond !== void 0 && (typeof value.outputTokensPerSecond !== "number" || !Number.isFinite(value.outputTokensPerSecond) || value.outputTokensPerSecond < 0)) {
|
|
@@ -17010,10 +17055,10 @@ function parseHostUsage(value) {
|
|
|
17010
17055
|
if (value.totalCostUsd !== void 0 && (typeof value.totalCostUsd !== "number" || !Number.isFinite(value.totalCostUsd) || value.totalCostUsd < 0)) {
|
|
17011
17056
|
throw new Error("Harness Usage 'totalCostUsd' must be a finite non-negative number");
|
|
17012
17057
|
}
|
|
17013
|
-
for (const
|
|
17014
|
-
const candidate = value[
|
|
17058
|
+
for (const field2 of percentFields) {
|
|
17059
|
+
const candidate = value[field2];
|
|
17015
17060
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0 || candidate > 100)) {
|
|
17016
|
-
throw new Error(`Harness Usage '${
|
|
17061
|
+
throw new Error(`Harness Usage '${field2}' must be between 0 and 100`);
|
|
17017
17062
|
}
|
|
17018
17063
|
}
|
|
17019
17064
|
if (value.sessionCacheUsage !== void 0) {
|
|
@@ -17084,19 +17129,19 @@ function parseHostUsageRequest(value) {
|
|
|
17084
17129
|
if (typeof value.requestId !== "string" || value.requestId.length === 0) {
|
|
17085
17130
|
throw new Error("Harness Usage request 'requestId' must be a non-empty string");
|
|
17086
17131
|
}
|
|
17087
|
-
for (const
|
|
17088
|
-
const candidate = value[
|
|
17132
|
+
for (const field2 of ["model", "provider"]) {
|
|
17133
|
+
const candidate = value[field2];
|
|
17089
17134
|
if (candidate !== void 0 && (typeof candidate !== "string" || candidate.length === 0)) {
|
|
17090
|
-
throw new Error(`Harness Usage request '${
|
|
17135
|
+
throw new Error(`Harness Usage request '${field2}' must be a non-empty string`);
|
|
17091
17136
|
}
|
|
17092
17137
|
}
|
|
17093
17138
|
if (value.historical !== void 0 && typeof value.historical !== "boolean") {
|
|
17094
17139
|
throw new Error("Harness Usage request 'historical' must be a boolean");
|
|
17095
17140
|
}
|
|
17096
|
-
for (const
|
|
17097
|
-
const candidate = value[
|
|
17141
|
+
for (const field2 of requestTokenFields) {
|
|
17142
|
+
const candidate = value[field2];
|
|
17098
17143
|
if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
|
|
17099
|
-
throw new Error(`Harness Usage request '${
|
|
17144
|
+
throw new Error(`Harness Usage request '${field2}' must be a non-negative safe integer`);
|
|
17100
17145
|
}
|
|
17101
17146
|
}
|
|
17102
17147
|
if (value.inputTokens === void 0 || value.outputTokens === void 0) {
|
|
@@ -20474,9 +20519,9 @@ function outputText(output) {
|
|
|
20474
20519
|
function stringField2(value, key) {
|
|
20475
20520
|
if (!isRecord10(value))
|
|
20476
20521
|
return void 0;
|
|
20477
|
-
const
|
|
20478
|
-
if (typeof
|
|
20479
|
-
return
|
|
20522
|
+
const field2 = value[key];
|
|
20523
|
+
if (typeof field2 === "string" && field2.length > 0)
|
|
20524
|
+
return field2;
|
|
20480
20525
|
if (isRecord10(value.input)) {
|
|
20481
20526
|
const nested = value.input[key];
|
|
20482
20527
|
if (typeof nested === "string" && nested.length > 0)
|
|
@@ -20492,8 +20537,8 @@ function stringField2(value, key) {
|
|
|
20492
20537
|
function numberField(value, key) {
|
|
20493
20538
|
if (!isRecord10(value))
|
|
20494
20539
|
return void 0;
|
|
20495
|
-
const
|
|
20496
|
-
return typeof
|
|
20540
|
+
const field2 = value[key];
|
|
20541
|
+
return typeof field2 === "number" || field2 === null ? field2 : void 0;
|
|
20497
20542
|
}
|
|
20498
20543
|
function stripDiffPrefix(pathString) {
|
|
20499
20544
|
if (typeof pathString !== "string" || pathString.length === 0)
|
|
@@ -20532,9 +20577,9 @@ function nestedToolString(value, keys) {
|
|
|
20532
20577
|
if (!isRecord10(value))
|
|
20533
20578
|
return void 0;
|
|
20534
20579
|
for (const key of keys) {
|
|
20535
|
-
const
|
|
20536
|
-
if (typeof
|
|
20537
|
-
return
|
|
20580
|
+
const field2 = value[key];
|
|
20581
|
+
if (typeof field2 === "string" && field2.length > 0)
|
|
20582
|
+
return field2;
|
|
20538
20583
|
}
|
|
20539
20584
|
for (const wrapper of ["input", "arguments", "params", "details"]) {
|
|
20540
20585
|
const nested = nestedToolString(value[wrapper], keys);
|
|
@@ -20547,15 +20592,15 @@ function patchFromResult(result) {
|
|
|
20547
20592
|
if (!isRecord10(result))
|
|
20548
20593
|
return void 0;
|
|
20549
20594
|
for (const key of ["patch", "diff", "unifiedDiff"]) {
|
|
20550
|
-
const
|
|
20551
|
-
if (typeof
|
|
20552
|
-
return
|
|
20595
|
+
const field2 = result[key];
|
|
20596
|
+
if (typeof field2 === "string" && field2.length > 0)
|
|
20597
|
+
return field2;
|
|
20553
20598
|
}
|
|
20554
20599
|
if (isRecord10(result.details)) {
|
|
20555
20600
|
for (const key of ["patch", "diff", "unifiedDiff"]) {
|
|
20556
|
-
const
|
|
20557
|
-
if (typeof
|
|
20558
|
-
return
|
|
20601
|
+
const field2 = result.details[key];
|
|
20602
|
+
if (typeof field2 === "string" && field2.length > 0)
|
|
20603
|
+
return field2;
|
|
20559
20604
|
}
|
|
20560
20605
|
}
|
|
20561
20606
|
return void 0;
|