@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.
@@ -16026,10 +16026,10 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
16026
16026
  const shape = def.shape;
16027
16027
  const propValues = {};
16028
16028
  for (const key in shape) {
16029
- const field = shape[key]._zod;
16030
- if (field.values) {
16029
+ const field2 = shape[key]._zod;
16030
+ if (field2.values) {
16031
16031
  propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
16032
- for (const v3 of field.values)
16032
+ for (const v3 of field2.values)
16033
16033
  propValues[key].add(v3);
16034
16034
  }
16035
16035
  }
@@ -27776,6 +27776,51 @@ var hostInteractionIdSchema = opaqueIdSchema.brand();
27776
27776
  var threadPrewarmDiscardParamsSchema = external_exports.object({ threadId: hostThreadIdSchema });
27777
27777
  var threadPrewarmDiscardResultSchema = external_exports.object({ discarded: external_exports.boolean() });
27778
27778
 
27779
+ // ../../shared-contracts/dist/thread-questions.js
27780
+ var field = external_exports.discriminatedUnion("type", [
27781
+ external_exports.object({
27782
+ id: external_exports.string().min(1),
27783
+ type: external_exports.literal("choice"),
27784
+ prompt: external_exports.string(),
27785
+ options: external_exports.array(external_exports.object({
27786
+ value: external_exports.string().min(1),
27787
+ label: external_exports.string(),
27788
+ description: external_exports.string().optional()
27789
+ })).min(1),
27790
+ multiple: external_exports.boolean(),
27791
+ allowOther: external_exports.boolean(),
27792
+ optional: external_exports.boolean()
27793
+ }),
27794
+ external_exports.object({
27795
+ id: external_exports.string().min(1),
27796
+ type: external_exports.literal("text"),
27797
+ prompt: external_exports.string(),
27798
+ multiline: external_exports.boolean(),
27799
+ secret: external_exports.literal(false),
27800
+ optional: external_exports.boolean(),
27801
+ placeholder: external_exports.string().optional(),
27802
+ prefill: external_exports.string().optional()
27803
+ })
27804
+ ]);
27805
+ var threadQuestionSchema = external_exports.object({
27806
+ interactionId: external_exports.string().min(1),
27807
+ turnId: external_exports.string().min(1),
27808
+ title: external_exports.string().optional(),
27809
+ questions: external_exports.array(field).min(1)
27810
+ }).refine(({ questions }) => questions.some((q3) => q3.type === "choice" && q3.multiple), {
27811
+ message: "Shared cards require at least one multi-select question"
27812
+ });
27813
+ var threadQuestionsListParamsSchema = external_exports.strictObject({ threadId: external_exports.string().min(1) });
27814
+ var threadQuestionsResultSchema = external_exports.object({ questions: external_exports.array(threadQuestionSchema) });
27815
+ var threadQuestionRespondParamsSchema = external_exports.strictObject({
27816
+ threadId: external_exports.string().min(1),
27817
+ turnId: external_exports.string().min(1),
27818
+ interactionId: external_exports.string().min(1),
27819
+ answers: external_exports.record(external_exports.string(), external_exports.array(external_exports.string())),
27820
+ cancelled: external_exports.boolean().default(false)
27821
+ });
27822
+ var threadQuestionRespondResultSchema = external_exports.object({ accepted: external_exports.literal(true) });
27823
+
27779
27824
  // ../../shared-contracts/dist/console.js
27780
27825
  var consoleAnnouncementSchema = external_exports.strictObject({
27781
27826
  title: external_exports.string().trim().min(1).max(200),
@@ -29377,26 +29422,26 @@ function parseHostUsage(value) {
29377
29422
  }
29378
29423
  }
29379
29424
  const indicators = value.composerIndicators === void 0 ? {} : { composerIndicators: composerIndicatorsSchema.parse(value.composerIndicators) };
29380
- for (const field of [
29425
+ for (const field2 of [
29381
29426
  "totalCredits",
29382
29427
  "contextUsagePercent",
29383
29428
  "apiOutputTokensPerSecond"
29384
29429
  ]) {
29385
- const candidate = value[field];
29430
+ const candidate = value[field2];
29386
29431
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
29387
- throw new Error(`Harness Usage '${field}' must be a finite non-negative number`);
29432
+ throw new Error(`Harness Usage '${field2}' must be a finite non-negative number`);
29388
29433
  }
29389
29434
  }
29390
- for (const field of tokenFields) {
29391
- const candidate = value[field];
29435
+ for (const field2 of tokenFields) {
29436
+ const candidate = value[field2];
29392
29437
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
29393
- throw new Error(`Harness Usage '${field}' must be a non-negative safe integer`);
29438
+ throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
29394
29439
  }
29395
29440
  }
29396
- for (const field of safeIntegerFields) {
29397
- const candidate = value[field];
29441
+ for (const field2 of safeIntegerFields) {
29442
+ const candidate = value[field2];
29398
29443
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
29399
- throw new Error(`Harness Usage '${field}' must be a non-negative safe integer`);
29444
+ throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
29400
29445
  }
29401
29446
  }
29402
29447
  if (value.outputTokensPerSecond !== void 0 && (typeof value.outputTokensPerSecond !== "number" || !Number.isFinite(value.outputTokensPerSecond) || value.outputTokensPerSecond < 0)) {
@@ -29405,10 +29450,10 @@ function parseHostUsage(value) {
29405
29450
  if (value.totalCostUsd !== void 0 && (typeof value.totalCostUsd !== "number" || !Number.isFinite(value.totalCostUsd) || value.totalCostUsd < 0)) {
29406
29451
  throw new Error("Harness Usage 'totalCostUsd' must be a finite non-negative number");
29407
29452
  }
29408
- for (const field of percentFields) {
29409
- const candidate = value[field];
29453
+ for (const field2 of percentFields) {
29454
+ const candidate = value[field2];
29410
29455
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0 || candidate > 100)) {
29411
- throw new Error(`Harness Usage '${field}' must be between 0 and 100`);
29456
+ throw new Error(`Harness Usage '${field2}' must be between 0 and 100`);
29412
29457
  }
29413
29458
  }
29414
29459
  if (value.sessionCacheUsage !== void 0) {
@@ -39227,11 +39272,11 @@ var McpServer = class {
39227
39272
  return EMPTY_COMPLETION_RESULT;
39228
39273
  }
39229
39274
  const promptShape = getObjectShape(prompt.argsSchema);
39230
- const field = promptShape?.[request.params.argument.name];
39231
- if (!isCompletable(field)) {
39275
+ const field2 = promptShape?.[request.params.argument.name];
39276
+ if (!isCompletable(field2)) {
39232
39277
  return EMPTY_COMPLETION_RESULT;
39233
39278
  }
39234
- const completer = getCompleter(field);
39279
+ const completer = getCompleter(field2);
39235
39280
  if (!completer) {
39236
39281
  return EMPTY_COMPLETION_RESULT;
39237
39282
  }
@@ -39504,8 +39549,8 @@ var McpServer = class {
39504
39549
  };
39505
39550
  this._registeredPrompts[name] = registeredPrompt;
39506
39551
  if (argsSchema) {
39507
- const hasCompletable = Object.values(argsSchema).some((field) => {
39508
- const inner = field instanceof ZodOptional ? field._def?.innerType : field;
39552
+ const hasCompletable = Object.values(argsSchema).some((field2) => {
39553
+ const inner = field2 instanceof ZodOptional ? field2._def?.innerType : field2;
39509
39554
  return isCompletable(inner);
39510
39555
  });
39511
39556
  if (hasCompletable) {
@@ -39714,9 +39759,9 @@ function promptArgumentsFromSchema(schema) {
39714
39759
  const shape = getObjectShape(schema);
39715
39760
  if (!shape)
39716
39761
  return [];
39717
- return Object.entries(shape).map(([name, field]) => {
39718
- const description = getSchemaDescription(field);
39719
- const isOptional = isSchemaOptional(field);
39762
+ return Object.entries(shape).map(([name, field2]) => {
39763
+ const description = getSchemaDescription(field2);
39764
+ const isOptional = isSchemaOptional(field2);
39720
39765
  return {
39721
39766
  name,
39722
39767
  description,
@@ -53092,13 +53137,13 @@ function parseHarnessUsageEntry(value) {
53092
53137
  }
53093
53138
  if (!tokenCount(entry.inputTokens) || !tokenCount(entry.outputTokens))
53094
53139
  return null;
53095
- for (const field of [
53140
+ for (const field2 of [
53096
53141
  "cachedInputTokens",
53097
53142
  "cacheWriteInputTokens",
53098
53143
  "cacheWrite1hInputTokens",
53099
53144
  "reasoningOutputTokens"
53100
53145
  ]) {
53101
- if (entry[field] !== void 0 && !tokenCount(entry[field]))
53146
+ if (entry[field2] !== void 0 && !tokenCount(entry[field2]))
53102
53147
  return null;
53103
53148
  }
53104
53149
  const cached2 = entry.cachedInputTokens ?? 0;
@@ -15623,10 +15623,10 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
15623
15623
  const shape = def.shape;
15624
15624
  const propValues = {};
15625
15625
  for (const key in shape) {
15626
- const field = shape[key]._zod;
15627
- if (field.values) {
15626
+ const field2 = shape[key]._zod;
15627
+ if (field2.values) {
15628
15628
  propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
15629
- for (const v3 of field.values)
15629
+ for (const v3 of field2.values)
15630
15630
  propValues[key].add(v3);
15631
15631
  }
15632
15632
  }
@@ -27373,6 +27373,51 @@ var hostInteractionIdSchema = opaqueIdSchema.brand();
27373
27373
  var threadPrewarmDiscardParamsSchema = external_exports.object({ threadId: hostThreadIdSchema });
27374
27374
  var threadPrewarmDiscardResultSchema = external_exports.object({ discarded: external_exports.boolean() });
27375
27375
 
27376
+ // ../../shared-contracts/dist/thread-questions.js
27377
+ var field = external_exports.discriminatedUnion("type", [
27378
+ external_exports.object({
27379
+ id: external_exports.string().min(1),
27380
+ type: external_exports.literal("choice"),
27381
+ prompt: external_exports.string(),
27382
+ options: external_exports.array(external_exports.object({
27383
+ value: external_exports.string().min(1),
27384
+ label: external_exports.string(),
27385
+ description: external_exports.string().optional()
27386
+ })).min(1),
27387
+ multiple: external_exports.boolean(),
27388
+ allowOther: external_exports.boolean(),
27389
+ optional: external_exports.boolean()
27390
+ }),
27391
+ external_exports.object({
27392
+ id: external_exports.string().min(1),
27393
+ type: external_exports.literal("text"),
27394
+ prompt: external_exports.string(),
27395
+ multiline: external_exports.boolean(),
27396
+ secret: external_exports.literal(false),
27397
+ optional: external_exports.boolean(),
27398
+ placeholder: external_exports.string().optional(),
27399
+ prefill: external_exports.string().optional()
27400
+ })
27401
+ ]);
27402
+ var threadQuestionSchema = external_exports.object({
27403
+ interactionId: external_exports.string().min(1),
27404
+ turnId: external_exports.string().min(1),
27405
+ title: external_exports.string().optional(),
27406
+ questions: external_exports.array(field).min(1)
27407
+ }).refine(({ questions }) => questions.some((q3) => q3.type === "choice" && q3.multiple), {
27408
+ message: "Shared cards require at least one multi-select question"
27409
+ });
27410
+ var threadQuestionsListParamsSchema = external_exports.strictObject({ threadId: external_exports.string().min(1) });
27411
+ var threadQuestionsResultSchema = external_exports.object({ questions: external_exports.array(threadQuestionSchema) });
27412
+ var threadQuestionRespondParamsSchema = external_exports.strictObject({
27413
+ threadId: external_exports.string().min(1),
27414
+ turnId: external_exports.string().min(1),
27415
+ interactionId: external_exports.string().min(1),
27416
+ answers: external_exports.record(external_exports.string(), external_exports.array(external_exports.string())),
27417
+ cancelled: external_exports.boolean().default(false)
27418
+ });
27419
+ var threadQuestionRespondResultSchema = external_exports.object({ accepted: external_exports.literal(true) });
27420
+
27376
27421
  // ../../shared-contracts/dist/console.js
27377
27422
  var consoleAnnouncementSchema = external_exports.strictObject({
27378
27423
  title: external_exports.string().trim().min(1).max(200),
@@ -29379,26 +29424,26 @@ function parseHostUsage(value) {
29379
29424
  }
29380
29425
  }
29381
29426
  const indicators = value.composerIndicators === void 0 ? {} : { composerIndicators: composerIndicatorsSchema.parse(value.composerIndicators) };
29382
- for (const field of [
29427
+ for (const field2 of [
29383
29428
  "totalCredits",
29384
29429
  "contextUsagePercent",
29385
29430
  "apiOutputTokensPerSecond"
29386
29431
  ]) {
29387
- const candidate = value[field];
29432
+ const candidate = value[field2];
29388
29433
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
29389
- throw new Error(`Harness Usage '${field}' must be a finite non-negative number`);
29434
+ throw new Error(`Harness Usage '${field2}' must be a finite non-negative number`);
29390
29435
  }
29391
29436
  }
29392
- for (const field of tokenFields) {
29393
- const candidate = value[field];
29437
+ for (const field2 of tokenFields) {
29438
+ const candidate = value[field2];
29394
29439
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
29395
- throw new Error(`Harness Usage '${field}' must be a non-negative safe integer`);
29440
+ throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
29396
29441
  }
29397
29442
  }
29398
- for (const field of safeIntegerFields) {
29399
- const candidate = value[field];
29443
+ for (const field2 of safeIntegerFields) {
29444
+ const candidate = value[field2];
29400
29445
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
29401
- throw new Error(`Harness Usage '${field}' must be a non-negative safe integer`);
29446
+ throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
29402
29447
  }
29403
29448
  }
29404
29449
  if (value.outputTokensPerSecond !== void 0 && (typeof value.outputTokensPerSecond !== "number" || !Number.isFinite(value.outputTokensPerSecond) || value.outputTokensPerSecond < 0)) {
@@ -29407,10 +29452,10 @@ function parseHostUsage(value) {
29407
29452
  if (value.totalCostUsd !== void 0 && (typeof value.totalCostUsd !== "number" || !Number.isFinite(value.totalCostUsd) || value.totalCostUsd < 0)) {
29408
29453
  throw new Error("Harness Usage 'totalCostUsd' must be a finite non-negative number");
29409
29454
  }
29410
- for (const field of percentFields) {
29411
- const candidate = value[field];
29455
+ for (const field2 of percentFields) {
29456
+ const candidate = value[field2];
29412
29457
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0 || candidate > 100)) {
29413
- throw new Error(`Harness Usage '${field}' must be between 0 and 100`);
29458
+ throw new Error(`Harness Usage '${field2}' must be between 0 and 100`);
29414
29459
  }
29415
29460
  }
29416
29461
  if (value.sessionCacheUsage !== void 0) {
@@ -39229,11 +39274,11 @@ var McpServer = class {
39229
39274
  return EMPTY_COMPLETION_RESULT;
39230
39275
  }
39231
39276
  const promptShape = getObjectShape(prompt.argsSchema);
39232
- const field = promptShape?.[request.params.argument.name];
39233
- if (!isCompletable(field)) {
39277
+ const field2 = promptShape?.[request.params.argument.name];
39278
+ if (!isCompletable(field2)) {
39234
39279
  return EMPTY_COMPLETION_RESULT;
39235
39280
  }
39236
- const completer = getCompleter(field);
39281
+ const completer = getCompleter(field2);
39237
39282
  if (!completer) {
39238
39283
  return EMPTY_COMPLETION_RESULT;
39239
39284
  }
@@ -39506,8 +39551,8 @@ var McpServer = class {
39506
39551
  };
39507
39552
  this._registeredPrompts[name] = registeredPrompt;
39508
39553
  if (argsSchema) {
39509
- const hasCompletable = Object.values(argsSchema).some((field) => {
39510
- const inner = field instanceof ZodOptional ? field._def?.innerType : field;
39554
+ const hasCompletable = Object.values(argsSchema).some((field2) => {
39555
+ const inner = field2 instanceof ZodOptional ? field2._def?.innerType : field2;
39511
39556
  return isCompletable(inner);
39512
39557
  });
39513
39558
  if (hasCompletable) {
@@ -39716,9 +39761,9 @@ function promptArgumentsFromSchema(schema) {
39716
39761
  const shape = getObjectShape(schema);
39717
39762
  if (!shape)
39718
39763
  return [];
39719
- return Object.entries(shape).map(([name, field]) => {
39720
- const description = getSchemaDescription(field);
39721
- const isOptional = isSchemaOptional(field);
39764
+ return Object.entries(shape).map(([name, field2]) => {
39765
+ const description = getSchemaDescription(field2);
39766
+ const isOptional = isSchemaOptional(field2);
39722
39767
  return {
39723
39768
  name,
39724
39769
  description,
@@ -53094,13 +53139,13 @@ function parseHarnessUsageEntry(value) {
53094
53139
  }
53095
53140
  if (!tokenCount(entry.inputTokens) || !tokenCount(entry.outputTokens))
53096
53141
  return null;
53097
- for (const field of [
53142
+ for (const field2 of [
53098
53143
  "cachedInputTokens",
53099
53144
  "cacheWriteInputTokens",
53100
53145
  "cacheWrite1hInputTokens",
53101
53146
  "reasoningOutputTokens"
53102
53147
  ]) {
53103
- if (entry[field] !== void 0 && !tokenCount(entry[field]))
53148
+ if (entry[field2] !== void 0 && !tokenCount(entry[field2]))
53104
53149
  return null;
53105
53150
  }
53106
53151
  const cached2 = entry.cachedInputTokens ?? 0;