@liberseek/boft-cli-win32-arm64 0.8.4 → 0.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +2 -2
  2. package/THIRD_PARTY_NOTICES.txt +6 -2
  3. package/app/codexhost-distribution.json +1 -1
  4. package/app/console-server.mjs +129 -28
  5. package/app/console-web.js +336 -78
  6. package/app/desktop-controller.mjs +1741 -60
  7. package/app/host-runtime.mjs +4983 -2002
  8. package/app/plugins/antigravity/plugin.mjs +423 -63
  9. package/app/plugins/claude-code/plugin.mjs +417 -264
  10. package/app/plugins/codebuddy/plugin.mjs +256 -134
  11. package/app/plugins/codex-usage/plugin.mjs +97 -32
  12. package/app/plugins/copilot/plugin.mjs +122 -57
  13. package/app/plugins/cursor-cli/plugin.mjs +236 -139
  14. package/app/plugins/deepseek-harness/plugin.mjs +584 -86
  15. package/app/plugins/devin/assets/icon.svg +1 -0
  16. package/app/plugins/devin/manifest.json +30 -0
  17. package/app/plugins/devin/plugin.mjs +23425 -0
  18. package/app/plugins/enabled.json +2 -0
  19. package/app/plugins/grok/plugin.mjs +839 -500
  20. package/app/plugins/hermes/plugin.mjs +522 -200
  21. package/app/plugins/kimi-code/plugin.mjs +134 -22
  22. package/app/plugins/kiro-cli/plugin.mjs +84 -19
  23. package/app/plugins/muse/plugin.mjs +74 -9
  24. package/app/plugins/omp/plugin.mjs +104 -39
  25. package/app/plugins/opencode/plugin.mjs +126 -61
  26. package/app/plugins/pi/plugin.mjs +1769 -468
  27. package/app/plugins/qoder/plugin.mjs +9617 -8682
  28. package/app/plugins/qoder-cn/plugin.mjs +9617 -8682
  29. package/app/plugins/qwen-code/assets/icon.svg +1 -0
  30. package/app/plugins/qwen-code/manifest.json +29 -0
  31. package/app/plugins/qwen-code/plugin.mjs +29366 -0
  32. package/app/plugins/workbuddy/plugin.mjs +256 -134
  33. package/app/plugins/zcode/plugin.mjs +265 -42
  34. package/app/renderer-extension.js +3286 -528
  35. package/bin/boft.exe +0 -0
  36. package/libexec/boft-node-repl.exe +0 -0
  37. package/libexec/boft-shim.exe +0 -0
  38. package/libexec/boft-updater.exe +0 -0
  39. package/licenses/Qwen-Code-SDK-LICENSE.txt +203 -0
  40. package/package.json +2 -2
@@ -3034,10 +3034,10 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
3034
3034
  const shape = def.shape;
3035
3035
  const propValues = {};
3036
3036
  for (const key2 in shape) {
3037
- const field = shape[key2]._zod;
3038
- if (field.values) {
3037
+ const field2 = shape[key2]._zod;
3038
+ if (field2.values) {
3039
3039
  propValues[key2] ?? (propValues[key2] = /* @__PURE__ */ new Set());
3040
- for (const v of field.values)
3040
+ for (const v of field2.values)
3041
3041
  propValues[key2].add(v);
3042
3042
  }
3043
3043
  }
@@ -14677,6 +14677,8 @@ var usageStatisticsTotalsSchema = external_exports.strictObject({
14677
14677
  cachedInputTokens: count,
14678
14678
  cacheWriteInputTokens: count,
14679
14679
  cacheKnownInputTokens: count,
14680
+ cacheHitCachedInputTokens: count,
14681
+ cacheHitInputTokens: count,
14680
14682
  outputTokens: count,
14681
14683
  reasoningOutputTokens: count,
14682
14684
  /** USD at the public price, summed over the priced requests only. */
@@ -14784,6 +14786,51 @@ var hostInteractionIdSchema = opaqueIdSchema.brand();
14784
14786
  var threadPrewarmDiscardParamsSchema = external_exports.object({ threadId: hostThreadIdSchema });
14785
14787
  var threadPrewarmDiscardResultSchema = external_exports.object({ discarded: external_exports.boolean() });
14786
14788
 
14789
+ // ../../shared-contracts/dist/thread-questions.js
14790
+ var field = external_exports.discriminatedUnion("type", [
14791
+ external_exports.object({
14792
+ id: external_exports.string().min(1),
14793
+ type: external_exports.literal("choice"),
14794
+ prompt: external_exports.string(),
14795
+ options: external_exports.array(external_exports.object({
14796
+ value: external_exports.string().min(1),
14797
+ label: external_exports.string(),
14798
+ description: external_exports.string().optional()
14799
+ })).min(1),
14800
+ multiple: external_exports.boolean(),
14801
+ allowOther: external_exports.boolean(),
14802
+ optional: external_exports.boolean()
14803
+ }),
14804
+ external_exports.object({
14805
+ id: external_exports.string().min(1),
14806
+ type: external_exports.literal("text"),
14807
+ prompt: external_exports.string(),
14808
+ multiline: external_exports.boolean(),
14809
+ secret: external_exports.literal(false),
14810
+ optional: external_exports.boolean(),
14811
+ placeholder: external_exports.string().optional(),
14812
+ prefill: external_exports.string().optional()
14813
+ })
14814
+ ]);
14815
+ var threadQuestionSchema = external_exports.object({
14816
+ interactionId: external_exports.string().min(1),
14817
+ turnId: external_exports.string().min(1),
14818
+ title: external_exports.string().optional(),
14819
+ questions: external_exports.array(field).min(1)
14820
+ }).refine(({ questions }) => questions.some((q) => q.type === "choice" && q.multiple), {
14821
+ message: "Shared cards require at least one multi-select question"
14822
+ });
14823
+ var threadQuestionsListParamsSchema = external_exports.strictObject({ threadId: external_exports.string().min(1) });
14824
+ var threadQuestionsResultSchema = external_exports.object({ questions: external_exports.array(threadQuestionSchema) });
14825
+ var threadQuestionRespondParamsSchema = external_exports.strictObject({
14826
+ threadId: external_exports.string().min(1),
14827
+ turnId: external_exports.string().min(1),
14828
+ interactionId: external_exports.string().min(1),
14829
+ answers: external_exports.record(external_exports.string(), external_exports.array(external_exports.string())),
14830
+ cancelled: external_exports.boolean().default(false)
14831
+ });
14832
+ var threadQuestionRespondResultSchema = external_exports.object({ accepted: external_exports.literal(true) });
14833
+
14787
14834
  // ../../shared-contracts/dist/harness-plugins.js
14788
14835
  var HARNESS_PLUGIN_MANIFEST_MAX_BYTES = 32 * 1024;
14789
14836
  var HARNESS_PLUGIN_ICON_MAX_BYTES = 128 * 1024;
@@ -15543,6 +15590,21 @@ var threadSteeringInspectParamsSchema = external_exports.object({
15543
15590
  /** The text about to be steered; a Harness command always stops and restarts. */
15544
15591
  text: external_exports.string().optional()
15545
15592
  }).strict();
15593
+ var threadSteeringContextSchema = external_exports.object({
15594
+ kind: external_exports.literal("application"),
15595
+ value: external_exports.string().transform((text2, context) => {
15596
+ try {
15597
+ return JSON.parse(text2);
15598
+ } catch {
15599
+ context.addIssue({ code: "custom", message: "Invalid steering context JSON" });
15600
+ return external_exports.NEVER;
15601
+ }
15602
+ }).pipe(external_exports.object({
15603
+ expectedTurnId: hostTurnIdSchema,
15604
+ clientUserMessageId: external_exports.string().min(1),
15605
+ delivery: external_exports.enum(["newTurn", "activeTurn"])
15606
+ }).strict())
15607
+ }).strict().transform((context) => context.value);
15546
15608
  var threadSteerDeliverySchema = external_exports.enum(["activeTurn", "newTurn"]);
15547
15609
  var threadSteeringInspectResultSchema = external_exports.object({
15548
15610
  delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
@@ -15553,7 +15615,10 @@ var harnessPluginRouteSchema = external_exports.object({
15553
15615
  harnessId: harnessPluginIdSchema,
15554
15616
  model: harnessModelRefSchema.optional(),
15555
15617
  thinkingOptionId: harnessThinkingOptionIdSchema.optional(),
15556
- permissionModeId: harnessPermissionModeIdSchema.optional()
15618
+ permissionModeId: harnessPermissionModeIdSchema.optional(),
15619
+ /** A draft prewarm create: stays unsubmitted until the user's first Turn.
15620
+ * Desktop forwards only the Model of a main-process prewarm to thread/start. */
15621
+ prewarm: external_exports.literal(true).optional()
15557
15622
  }).strict();
15558
15623
 
15559
15624
  // ../../shared-contracts/dist/harness-launch-settings.js
@@ -16065,13 +16130,13 @@ function parseHarnessUsageEntry(value) {
16065
16130
  }
16066
16131
  if (!tokenCount(entry.inputTokens) || !tokenCount(entry.outputTokens))
16067
16132
  return null;
16068
- for (const field of [
16133
+ for (const field2 of [
16069
16134
  "cachedInputTokens",
16070
16135
  "cacheWriteInputTokens",
16071
16136
  "cacheWrite1hInputTokens",
16072
16137
  "reasoningOutputTokens"
16073
16138
  ]) {
16074
- if (entry[field] !== void 0 && !tokenCount(entry[field]))
16139
+ if (entry[field2] !== void 0 && !tokenCount(entry[field2]))
16075
16140
  return null;
16076
16141
  }
16077
16142
  const cached2 = entry.cachedInputTokens ?? 0;
@@ -16165,8 +16230,8 @@ function usage(value) {
16165
16230
  if (!row)
16166
16231
  return null;
16167
16232
  const result = { values: [], known: 0 };
16168
- for (const [i, field] of fields.entries()) {
16169
- const n = row[field];
16233
+ for (const [i, field2] of fields.entries()) {
16234
+ const n = row[field2];
16170
16235
  if (n !== void 0 && n !== null) {
16171
16236
  if (typeof n !== "number" || !Number.isSafeInteger(n) || n < 0)
16172
16237
  return null;
@@ -17051,26 +17116,26 @@ function parseHostUsage(value) {
17051
17116
  }
17052
17117
  }
17053
17118
  const indicators = value.composerIndicators === void 0 ? {} : { composerIndicators: composerIndicatorsSchema.parse(value.composerIndicators) };
17054
- for (const field of [
17119
+ for (const field2 of [
17055
17120
  "totalCredits",
17056
17121
  "contextUsagePercent",
17057
17122
  "apiOutputTokensPerSecond"
17058
17123
  ]) {
17059
- const candidate = value[field];
17124
+ const candidate = value[field2];
17060
17125
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
17061
- throw new Error(`Harness Usage '${field}' must be a finite non-negative number`);
17126
+ throw new Error(`Harness Usage '${field2}' must be a finite non-negative number`);
17062
17127
  }
17063
17128
  }
17064
- for (const field of tokenFields) {
17065
- const candidate = value[field];
17129
+ for (const field2 of tokenFields) {
17130
+ const candidate = value[field2];
17066
17131
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
17067
- throw new Error(`Harness Usage '${field}' must be a non-negative safe integer`);
17132
+ throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
17068
17133
  }
17069
17134
  }
17070
- for (const field of safeIntegerFields) {
17071
- const candidate = value[field];
17135
+ for (const field2 of safeIntegerFields) {
17136
+ const candidate = value[field2];
17072
17137
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
17073
- throw new Error(`Harness Usage '${field}' must be a non-negative safe integer`);
17138
+ throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
17074
17139
  }
17075
17140
  }
17076
17141
  if (value.outputTokensPerSecond !== void 0 && (typeof value.outputTokensPerSecond !== "number" || !Number.isFinite(value.outputTokensPerSecond) || value.outputTokensPerSecond < 0)) {
@@ -17079,16 +17144,16 @@ function parseHostUsage(value) {
17079
17144
  if (value.totalCostUsd !== void 0 && (typeof value.totalCostUsd !== "number" || !Number.isFinite(value.totalCostUsd) || value.totalCostUsd < 0)) {
17080
17145
  throw new Error("Harness Usage 'totalCostUsd' must be a finite non-negative number");
17081
17146
  }
17082
- for (const field of ["totalCredits", "contextUsagePercent"]) {
17083
- const candidate = value[field];
17147
+ for (const field2 of ["totalCredits", "contextUsagePercent"]) {
17148
+ const candidate = value[field2];
17084
17149
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
17085
- throw new Error(`Harness Usage '${field}' must be a finite non-negative number`);
17150
+ throw new Error(`Harness Usage '${field2}' must be a finite non-negative number`);
17086
17151
  }
17087
17152
  }
17088
- for (const field of percentFields) {
17089
- const candidate = value[field];
17153
+ for (const field2 of percentFields) {
17154
+ const candidate = value[field2];
17090
17155
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0 || candidate > 100)) {
17091
- throw new Error(`Harness Usage '${field}' must be between 0 and 100`);
17156
+ throw new Error(`Harness Usage '${field2}' must be between 0 and 100`);
17092
17157
  }
17093
17158
  }
17094
17159
  if (value.sessionCacheUsage !== void 0) {
@@ -17159,19 +17224,19 @@ function parseHostUsageRequest(value) {
17159
17224
  if (typeof value.requestId !== "string" || value.requestId.length === 0) {
17160
17225
  throw new Error("Harness Usage request 'requestId' must be a non-empty string");
17161
17226
  }
17162
- for (const field of ["model", "provider"]) {
17163
- const candidate = value[field];
17227
+ for (const field2 of ["model", "provider"]) {
17228
+ const candidate = value[field2];
17164
17229
  if (candidate !== void 0 && (typeof candidate !== "string" || candidate.length === 0)) {
17165
- throw new Error(`Harness Usage request '${field}' must be a non-empty string`);
17230
+ throw new Error(`Harness Usage request '${field2}' must be a non-empty string`);
17166
17231
  }
17167
17232
  }
17168
17233
  if (value.historical !== void 0 && typeof value.historical !== "boolean") {
17169
17234
  throw new Error("Harness Usage request 'historical' must be a boolean");
17170
17235
  }
17171
- for (const field of requestTokenFields) {
17172
- const candidate = value[field];
17236
+ for (const field2 of requestTokenFields) {
17237
+ const candidate = value[field2];
17173
17238
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
17174
- throw new Error(`Harness Usage request '${field}' must be a non-negative safe integer`);
17239
+ throw new Error(`Harness Usage request '${field2}' must be a non-negative safe integer`);
17175
17240
  }
17176
17241
  }
17177
17242
  if (value.inputTokens === void 0 || value.outputTokens === void 0) {
@@ -17205,7 +17270,7 @@ function tokenSnapshot(value) {
17205
17270
  const total = object2(token.total);
17206
17271
  const last = object2(token.last);
17207
17272
  const result = {};
17208
- for (const field of [
17273
+ for (const field2 of [
17209
17274
  "totalTokens",
17210
17275
  "inputTokens",
17211
17276
  "cachedInputTokens",
@@ -17213,9 +17278,9 @@ function tokenSnapshot(value) {
17213
17278
  "outputTokens",
17214
17279
  "reasoningOutputTokens"
17215
17280
  ]) {
17216
- const n = integer2(total?.[field]);
17281
+ const n = integer2(total?.[field2]);
17217
17282
  if (n !== void 0)
17218
- result[field] = n;
17283
+ result[field2] = n;
17219
17284
  }
17220
17285
  const used = integer2(last?.totalTokens);
17221
17286
  const window = integer2(token.modelContextWindow);
@@ -7091,10 +7091,10 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
7091
7091
  const shape = def.shape;
7092
7092
  const propValues = {};
7093
7093
  for (const key in shape) {
7094
- const field = shape[key]._zod;
7095
- if (field.values) {
7094
+ const field2 = shape[key]._zod;
7095
+ if (field2.values) {
7096
7096
  propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
7097
- for (const v of field.values)
7097
+ for (const v of field2.values)
7098
7098
  propValues[key].add(v);
7099
7099
  }
7100
7100
  }
@@ -18734,6 +18734,8 @@ var usageStatisticsTotalsSchema = external_exports.strictObject({
18734
18734
  cachedInputTokens: count,
18735
18735
  cacheWriteInputTokens: count,
18736
18736
  cacheKnownInputTokens: count,
18737
+ cacheHitCachedInputTokens: count,
18738
+ cacheHitInputTokens: count,
18737
18739
  outputTokens: count,
18738
18740
  reasoningOutputTokens: count,
18739
18741
  /** USD at the public price, summed over the priced requests only. */
@@ -18841,6 +18843,51 @@ var hostInteractionIdSchema = opaqueIdSchema.brand();
18841
18843
  var threadPrewarmDiscardParamsSchema = external_exports.object({ threadId: hostThreadIdSchema });
18842
18844
  var threadPrewarmDiscardResultSchema = external_exports.object({ discarded: external_exports.boolean() });
18843
18845
 
18846
+ // ../../shared-contracts/dist/thread-questions.js
18847
+ var field = external_exports.discriminatedUnion("type", [
18848
+ external_exports.object({
18849
+ id: external_exports.string().min(1),
18850
+ type: external_exports.literal("choice"),
18851
+ prompt: external_exports.string(),
18852
+ options: external_exports.array(external_exports.object({
18853
+ value: external_exports.string().min(1),
18854
+ label: external_exports.string(),
18855
+ description: external_exports.string().optional()
18856
+ })).min(1),
18857
+ multiple: external_exports.boolean(),
18858
+ allowOther: external_exports.boolean(),
18859
+ optional: external_exports.boolean()
18860
+ }),
18861
+ external_exports.object({
18862
+ id: external_exports.string().min(1),
18863
+ type: external_exports.literal("text"),
18864
+ prompt: external_exports.string(),
18865
+ multiline: external_exports.boolean(),
18866
+ secret: external_exports.literal(false),
18867
+ optional: external_exports.boolean(),
18868
+ placeholder: external_exports.string().optional(),
18869
+ prefill: external_exports.string().optional()
18870
+ })
18871
+ ]);
18872
+ var threadQuestionSchema = external_exports.object({
18873
+ interactionId: external_exports.string().min(1),
18874
+ turnId: external_exports.string().min(1),
18875
+ title: external_exports.string().optional(),
18876
+ questions: external_exports.array(field).min(1)
18877
+ }).refine(({ questions }) => questions.some((q) => q.type === "choice" && q.multiple), {
18878
+ message: "Shared cards require at least one multi-select question"
18879
+ });
18880
+ var threadQuestionsListParamsSchema = external_exports.strictObject({ threadId: external_exports.string().min(1) });
18881
+ var threadQuestionsResultSchema = external_exports.object({ questions: external_exports.array(threadQuestionSchema) });
18882
+ var threadQuestionRespondParamsSchema = external_exports.strictObject({
18883
+ threadId: external_exports.string().min(1),
18884
+ turnId: external_exports.string().min(1),
18885
+ interactionId: external_exports.string().min(1),
18886
+ answers: external_exports.record(external_exports.string(), external_exports.array(external_exports.string())),
18887
+ cancelled: external_exports.boolean().default(false)
18888
+ });
18889
+ var threadQuestionRespondResultSchema = external_exports.object({ accepted: external_exports.literal(true) });
18890
+
18844
18891
  // ../../shared-contracts/dist/harness-plugins.js
18845
18892
  var HARNESS_PLUGIN_MANIFEST_MAX_BYTES = 32 * 1024;
18846
18893
  var HARNESS_PLUGIN_ICON_MAX_BYTES = 128 * 1024;
@@ -19600,6 +19647,21 @@ var threadSteeringInspectParamsSchema = external_exports.object({
19600
19647
  /** The text about to be steered; a Harness command always stops and restarts. */
19601
19648
  text: external_exports.string().optional()
19602
19649
  }).strict();
19650
+ var threadSteeringContextSchema = external_exports.object({
19651
+ kind: external_exports.literal("application"),
19652
+ value: external_exports.string().transform((text, context) => {
19653
+ try {
19654
+ return JSON.parse(text);
19655
+ } catch {
19656
+ context.addIssue({ code: "custom", message: "Invalid steering context JSON" });
19657
+ return external_exports.NEVER;
19658
+ }
19659
+ }).pipe(external_exports.object({
19660
+ expectedTurnId: hostTurnIdSchema,
19661
+ clientUserMessageId: external_exports.string().min(1),
19662
+ delivery: external_exports.enum(["newTurn", "activeTurn"])
19663
+ }).strict())
19664
+ }).strict().transform((context) => context.value);
19603
19665
  var threadSteerDeliverySchema = external_exports.enum(["activeTurn", "newTurn"]);
19604
19666
  var threadSteeringInspectResultSchema = external_exports.object({
19605
19667
  delivery: external_exports.enum(["official", "activeTurn", "newTurn"])
@@ -19610,7 +19672,10 @@ var harnessPluginRouteSchema = external_exports.object({
19610
19672
  harnessId: harnessPluginIdSchema,
19611
19673
  model: harnessModelRefSchema.optional(),
19612
19674
  thinkingOptionId: harnessThinkingOptionIdSchema.optional(),
19613
- permissionModeId: harnessPermissionModeIdSchema.optional()
19675
+ permissionModeId: harnessPermissionModeIdSchema.optional(),
19676
+ /** A draft prewarm create: stays unsubmitted until the user's first Turn.
19677
+ * Desktop forwards only the Model of a main-process prewarm to thread/start. */
19678
+ prewarm: external_exports.literal(true).optional()
19614
19679
  }).strict();
19615
19680
 
19616
19681
  // ../../shared-contracts/dist/harness-launch-settings.js
@@ -27605,19 +27670,19 @@ var CopilotSession = class {
27605
27670
  }
27606
27671
  async _input(message, options2) {
27607
27672
  this.assertElicitation();
27608
- const field = { type: "string" };
27609
- if (options2?.title) field.title = options2.title;
27610
- if (options2?.description) field.description = options2.description;
27611
- if (options2?.minLength != null) field.minLength = options2.minLength;
27612
- if (options2?.maxLength != null) field.maxLength = options2.maxLength;
27613
- if (options2?.format) field.format = options2.format;
27614
- if (options2?.default != null) field.default = options2.default;
27673
+ const field2 = { type: "string" };
27674
+ if (options2?.title) field2.title = options2.title;
27675
+ if (options2?.description) field2.description = options2.description;
27676
+ if (options2?.minLength != null) field2.minLength = options2.minLength;
27677
+ if (options2?.maxLength != null) field2.maxLength = options2.maxLength;
27678
+ if (options2?.format) field2.format = options2.format;
27679
+ if (options2?.default != null) field2.default = options2.default;
27615
27680
  const result = await this.rpc.ui.elicitation({
27616
27681
  message,
27617
27682
  requestedSchema: {
27618
27683
  type: "object",
27619
27684
  properties: {
27620
- value: field
27685
+ value: field2
27621
27686
  },
27622
27687
  required: ["value"]
27623
27688
  }
@@ -28792,14 +28857,14 @@ function toolFilterListToArray(value) {
28792
28857
  }
28793
28858
  return value instanceof ToolSet ? value.toArray() : value;
28794
28859
  }
28795
- function validateToolFilterList(field, list) {
28860
+ function validateToolFilterList(field2, list) {
28796
28861
  if (!list) {
28797
28862
  return;
28798
28863
  }
28799
28864
  for (const entry of list) {
28800
28865
  if (entry === "*") {
28801
28866
  throw new Error(
28802
- `Invalid ${field} entry '*': there is no bare wildcard. Use one or more of \`new ToolSet().addBuiltIn('*')\`, \`.addMcp('*')\`, or \`.addCustom('*')\` to target a specific source.`
28867
+ `Invalid ${field2} entry '*': there is no bare wildcard. Use one or more of \`new ToolSet().addBuiltIn('*')\`, \`.addMcp('*')\`, or \`.addCustom('*')\` to target a specific source.`
28803
28868
  );
28804
28869
  }
28805
28870
  }
@@ -32210,26 +32275,26 @@ function parseHostUsage(value) {
32210
32275
  }
32211
32276
  }
32212
32277
  const indicators = value.composerIndicators === void 0 ? {} : { composerIndicators: composerIndicatorsSchema.parse(value.composerIndicators) };
32213
- for (const field of [
32278
+ for (const field2 of [
32214
32279
  "totalCredits",
32215
32280
  "contextUsagePercent",
32216
32281
  "apiOutputTokensPerSecond"
32217
32282
  ]) {
32218
- const candidate = value[field];
32283
+ const candidate = value[field2];
32219
32284
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
32220
- throw new Error(`Harness Usage '${field}' must be a finite non-negative number`);
32285
+ throw new Error(`Harness Usage '${field2}' must be a finite non-negative number`);
32221
32286
  }
32222
32287
  }
32223
- for (const field of tokenFields) {
32224
- const candidate = value[field];
32288
+ for (const field2 of tokenFields) {
32289
+ const candidate = value[field2];
32225
32290
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
32226
- throw new Error(`Harness Usage '${field}' must be a non-negative safe integer`);
32291
+ throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
32227
32292
  }
32228
32293
  }
32229
- for (const field of safeIntegerFields) {
32230
- const candidate = value[field];
32294
+ for (const field2 of safeIntegerFields) {
32295
+ const candidate = value[field2];
32231
32296
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
32232
- throw new Error(`Harness Usage '${field}' must be a non-negative safe integer`);
32297
+ throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
32233
32298
  }
32234
32299
  }
32235
32300
  if (value.outputTokensPerSecond !== void 0 && (typeof value.outputTokensPerSecond !== "number" || !Number.isFinite(value.outputTokensPerSecond) || value.outputTokensPerSecond < 0)) {
@@ -32238,16 +32303,16 @@ function parseHostUsage(value) {
32238
32303
  if (value.totalCostUsd !== void 0 && (typeof value.totalCostUsd !== "number" || !Number.isFinite(value.totalCostUsd) || value.totalCostUsd < 0)) {
32239
32304
  throw new Error("Harness Usage 'totalCostUsd' must be a finite non-negative number");
32240
32305
  }
32241
- for (const field of ["totalCredits", "contextUsagePercent"]) {
32242
- const candidate = value[field];
32306
+ for (const field2 of ["totalCredits", "contextUsagePercent"]) {
32307
+ const candidate = value[field2];
32243
32308
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
32244
- throw new Error(`Harness Usage '${field}' must be a finite non-negative number`);
32309
+ throw new Error(`Harness Usage '${field2}' must be a finite non-negative number`);
32245
32310
  }
32246
32311
  }
32247
- for (const field of percentFields) {
32248
- const candidate = value[field];
32312
+ for (const field2 of percentFields) {
32313
+ const candidate = value[field2];
32249
32314
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0 || candidate > 100)) {
32250
- throw new Error(`Harness Usage '${field}' must be between 0 and 100`);
32315
+ throw new Error(`Harness Usage '${field2}' must be between 0 and 100`);
32251
32316
  }
32252
32317
  }
32253
32318
  if (value.sessionCacheUsage !== void 0) {
@@ -32587,18 +32652,18 @@ function calendarDate(value) {
32587
32652
  const timestamp = Date.parse(value);
32588
32653
  return /^\d{4}-\d{2}-\d{2}$/u.test(value) && Number.isFinite(timestamp) && new Date(timestamp).toISOString().slice(0, 10) === value;
32589
32654
  }
32590
- function options(field) {
32591
- if (field.type === "boolean")
32655
+ function options(field2) {
32656
+ if (field2.type === "boolean")
32592
32657
  return [
32593
32658
  { value: "true", label: "Yes" },
32594
32659
  { value: "false", label: "No" }
32595
32660
  ];
32596
- if (field.type === "string" && "enum" in field)
32597
- return field.enum.map((value, index) => ({ value, label: field.enumNames?.[index] ?? value }));
32598
- if (field.type === "string" && "oneOf" in field)
32599
- return field.oneOf.map((option) => ({ value: option.const, label: option.title }));
32600
- if (field.type === "array") {
32601
- return "enum" in field.items ? field.items.enum.map((value) => ({ value, label: value })) : field.items.anyOf.map((option) => ({ value: option.const, label: option.title }));
32661
+ if (field2.type === "string" && "enum" in field2)
32662
+ return field2.enum.map((value, index) => ({ value, label: field2.enumNames?.[index] ?? value }));
32663
+ if (field2.type === "string" && "oneOf" in field2)
32664
+ return field2.oneOf.map((option) => ({ value: option.const, label: option.title }));
32665
+ if (field2.type === "array") {
32666
+ return "enum" in field2.items ? field2.items.enum.map((value) => ({ value, label: value })) : field2.items.anyOf.map((option) => ({ value: option.const, label: option.title }));
32602
32667
  }
32603
32668
  }
32604
32669
  function elicitationForm(context) {
@@ -32607,22 +32672,22 @@ function elicitationForm(context) {
32607
32672
  throw new CopilotOperationError("unsupported", "Copilot elicitation requires a supported primitive form; browser URL flows are unavailable.");
32608
32673
  if (schema.required?.some((id) => !Object.hasOwn(schema.properties, id)))
32609
32674
  throw new Error("Copilot form refers to an unknown required field");
32610
- const questions = Object.entries(schema.properties).map(([id, field]) => {
32675
+ const questions = Object.entries(schema.properties).map(([id, field2]) => {
32611
32676
  const allowed = /* @__PURE__ */ new Set([
32612
32677
  "type",
32613
32678
  "title",
32614
32679
  "description",
32615
32680
  "default",
32616
- ...field.type === "string" ? ["enum", "enumNames", "oneOf", "minLength", "maxLength", "format"] : field.type === "array" ? ["items", "minItems", "maxItems"] : field.type === "number" || field.type === "integer" ? ["minimum", "maximum"] : []
32681
+ ...field2.type === "string" ? ["enum", "enumNames", "oneOf", "minLength", "maxLength", "format"] : field2.type === "array" ? ["items", "minItems", "maxItems"] : field2.type === "number" || field2.type === "integer" ? ["minimum", "maximum"] : []
32617
32682
  ]);
32618
- if (Object.keys(field).some((key) => !allowed.has(key)))
32683
+ if (Object.keys(field2).some((key) => !allowed.has(key)))
32619
32684
  throw new CopilotOperationError("unsupported", "Copilot form contains an unsupported constraint.");
32620
- if ("format" in field && field.format && !["email", "uri", "date", "date-time"].includes(field.format))
32685
+ if ("format" in field2 && field2.format && !["email", "uri", "date", "date-time"].includes(field2.format))
32621
32686
  throw new CopilotOperationError("unsupported", "Copilot form contains an unsupported text format.");
32622
- if (!["string", "number", "integer", "boolean", "array"].includes(field.type))
32687
+ if (!["string", "number", "integer", "boolean", "array"].includes(field2.type))
32623
32688
  throw new CopilotOperationError("unsupported", "Copilot form field cannot be represented");
32624
- const prompt = [field.title ?? id, field.description].filter(Boolean).join("\n");
32625
- const choices = options(field);
32689
+ const prompt = [field2.title ?? id, field2.description].filter(Boolean).join("\n");
32690
+ const choices = options(field2);
32626
32691
  const optional2 = !schema.required?.includes(id);
32627
32692
  if (choices)
32628
32693
  return {
@@ -32630,7 +32695,7 @@ function elicitationForm(context) {
32630
32695
  type: "choice",
32631
32696
  prompt,
32632
32697
  options: choices,
32633
- multiple: field.type === "array",
32698
+ multiple: field2.type === "array",
32634
32699
  allowOther: false,
32635
32700
  optional: optional2
32636
32701
  };
@@ -32638,43 +32703,43 @@ function elicitationForm(context) {
32638
32703
  id,
32639
32704
  type: "text",
32640
32705
  prompt,
32641
- multiline: field.type === "string",
32706
+ multiline: field2.type === "string",
32642
32707
  secret: false,
32643
32708
  optional: optional2,
32644
- ...field.default === void 0 ? {} : { prefill: String(field.default) }
32709
+ ...field2.default === void 0 ? {} : { prefill: String(field2.default) }
32645
32710
  };
32646
32711
  });
32647
32712
  const decode3 = (response) => {
32648
32713
  if (response.cancelled)
32649
32714
  return { action: "cancel" };
32650
32715
  const content = /* @__PURE__ */ Object.create(null);
32651
- for (const [id, field] of Object.entries(schema.properties)) {
32716
+ for (const [id, field2] of Object.entries(schema.properties)) {
32652
32717
  const values = Object.hasOwn(response.answers, id) ? response.answers[id] ?? [] : [];
32653
32718
  if (!values.length)
32654
32719
  continue;
32655
32720
  const value = values[0] ?? "";
32656
- if (field.type === "array") {
32657
- if (field.minItems !== void 0 && values.length < field.minItems || field.maxItems !== void 0 && values.length > field.maxItems)
32721
+ if (field2.type === "array") {
32722
+ if (field2.minItems !== void 0 && values.length < field2.minItems || field2.maxItems !== void 0 && values.length > field2.maxItems)
32658
32723
  throw new Error("The number of choices is outside the native form's limits.");
32659
32724
  content[id] = values;
32660
32725
  continue;
32661
32726
  }
32662
- if (field.type === "boolean") {
32727
+ if (field2.type === "boolean") {
32663
32728
  content[id] = value === "true";
32664
32729
  continue;
32665
32730
  }
32666
- if (field.type === "number" || field.type === "integer") {
32731
+ if (field2.type === "number" || field2.type === "integer") {
32667
32732
  const number4 = Number(value);
32668
- if (!value.trim() || !Number.isFinite(number4) || field.type === "integer" && !Number.isSafeInteger(number4) || field.minimum !== void 0 && number4 < field.minimum || field.maximum !== void 0 && number4 > field.maximum)
32733
+ if (!value.trim() || !Number.isFinite(number4) || field2.type === "integer" && !Number.isSafeInteger(number4) || field2.minimum !== void 0 && number4 < field2.minimum || field2.maximum !== void 0 && number4 > field2.maximum)
32669
32734
  throw new Error("The number is outside the native form's limits.");
32670
32735
  content[id] = number4;
32671
32736
  continue;
32672
32737
  }
32673
- if (field.type === "string") {
32674
- if ("minLength" in field && field.minLength !== void 0 && Array.from(value).length < field.minLength || "maxLength" in field && field.maxLength !== void 0 && Array.from(value).length > field.maxLength)
32738
+ if (field2.type === "string") {
32739
+ if ("minLength" in field2 && field2.minLength !== void 0 && Array.from(value).length < field2.minLength || "maxLength" in field2 && field2.maxLength !== void 0 && Array.from(value).length > field2.maxLength)
32675
32740
  throw new Error("The text length is outside the native form's limits.");
32676
- if ("format" in field && field.format) {
32677
- const valid = field.format === "email" ? /^[^\s@]+@[^\s@]+\.[^\s@]+$/u.test(value) : field.format === "uri" ? URL.canParse(value) : field.format === "date" ? calendarDate(value) : calendarDate(value.slice(0, 10)) && /^\d{4}-\d{2}-\d{2}T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/iu.test(value) && !Number.isNaN(Date.parse(value));
32741
+ if ("format" in field2 && field2.format) {
32742
+ const valid = field2.format === "email" ? /^[^\s@]+@[^\s@]+\.[^\s@]+$/u.test(value) : field2.format === "uri" ? URL.canParse(value) : field2.format === "date" ? calendarDate(value) : calendarDate(value.slice(0, 10)) && /^\d{4}-\d{2}-\d{2}T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/iu.test(value) && !Number.isNaN(Date.parse(value));
32678
32743
  if (!valid)
32679
32744
  throw new Error("The text does not match the native form's format.");
32680
32745
  }