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

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.
@@ -7281,10 +7281,10 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
7281
7281
  const shape = def.shape;
7282
7282
  const propValues = {};
7283
7283
  for (const key in shape) {
7284
- const field = shape[key]._zod;
7285
- if (field.values) {
7284
+ const field2 = shape[key]._zod;
7285
+ if (field2.values) {
7286
7286
  propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
7287
- for (const v of field.values)
7287
+ for (const v of field2.values)
7288
7288
  propValues[key].add(v);
7289
7289
  }
7290
7290
  }
@@ -18924,6 +18924,8 @@ var usageStatisticsTotalsSchema = external_exports.strictObject({
18924
18924
  cachedInputTokens: count,
18925
18925
  cacheWriteInputTokens: count,
18926
18926
  cacheKnownInputTokens: count,
18927
+ cacheHitCachedInputTokens: count,
18928
+ cacheHitInputTokens: count,
18927
18929
  outputTokens: count,
18928
18930
  reasoningOutputTokens: count,
18929
18931
  /** USD at the public price, summed over the priced requests only. */
@@ -19031,6 +19033,51 @@ var hostInteractionIdSchema = opaqueIdSchema.brand();
19031
19033
  var threadPrewarmDiscardParamsSchema = external_exports.object({ threadId: hostThreadIdSchema });
19032
19034
  var threadPrewarmDiscardResultSchema = external_exports.object({ discarded: external_exports.boolean() });
19033
19035
 
19036
+ // ../../shared-contracts/dist/thread-questions.js
19037
+ var field = external_exports.discriminatedUnion("type", [
19038
+ external_exports.object({
19039
+ id: external_exports.string().min(1),
19040
+ type: external_exports.literal("choice"),
19041
+ prompt: external_exports.string(),
19042
+ options: external_exports.array(external_exports.object({
19043
+ value: external_exports.string().min(1),
19044
+ label: external_exports.string(),
19045
+ description: external_exports.string().optional()
19046
+ })).min(1),
19047
+ multiple: external_exports.boolean(),
19048
+ allowOther: external_exports.boolean(),
19049
+ optional: external_exports.boolean()
19050
+ }),
19051
+ external_exports.object({
19052
+ id: external_exports.string().min(1),
19053
+ type: external_exports.literal("text"),
19054
+ prompt: external_exports.string(),
19055
+ multiline: external_exports.boolean(),
19056
+ secret: external_exports.literal(false),
19057
+ optional: external_exports.boolean(),
19058
+ placeholder: external_exports.string().optional(),
19059
+ prefill: external_exports.string().optional()
19060
+ })
19061
+ ]);
19062
+ var threadQuestionSchema = external_exports.object({
19063
+ interactionId: external_exports.string().min(1),
19064
+ turnId: external_exports.string().min(1),
19065
+ title: external_exports.string().optional(),
19066
+ questions: external_exports.array(field).min(1)
19067
+ }).refine(({ questions }) => questions.some((q) => q.type === "choice" && q.multiple), {
19068
+ message: "Shared cards require at least one multi-select question"
19069
+ });
19070
+ var threadQuestionsListParamsSchema = external_exports.strictObject({ threadId: external_exports.string().min(1) });
19071
+ var threadQuestionsResultSchema = external_exports.object({ questions: external_exports.array(threadQuestionSchema) });
19072
+ var threadQuestionRespondParamsSchema = external_exports.strictObject({
19073
+ threadId: external_exports.string().min(1),
19074
+ turnId: external_exports.string().min(1),
19075
+ interactionId: external_exports.string().min(1),
19076
+ answers: external_exports.record(external_exports.string(), external_exports.array(external_exports.string())),
19077
+ cancelled: external_exports.boolean().default(false)
19078
+ });
19079
+ var threadQuestionRespondResultSchema = external_exports.object({ accepted: external_exports.literal(true) });
19080
+
19034
19081
  // ../../shared-contracts/dist/harness-plugins.js
19035
19082
  var HARNESS_PLUGIN_MANIFEST_MAX_BYTES = 32 * 1024;
19036
19083
  var HARNESS_PLUGIN_ICON_MAX_BYTES = 128 * 1024;
@@ -19800,7 +19847,10 @@ var harnessPluginRouteSchema = external_exports.object({
19800
19847
  harnessId: harnessPluginIdSchema,
19801
19848
  model: harnessModelRefSchema.optional(),
19802
19849
  thinkingOptionId: harnessThinkingOptionIdSchema.optional(),
19803
- permissionModeId: harnessPermissionModeIdSchema.optional()
19850
+ permissionModeId: harnessPermissionModeIdSchema.optional(),
19851
+ /** A draft prewarm create: stays unsubmitted until the user's first Turn.
19852
+ * Desktop forwards only the Model of a main-process prewarm to thread/start. */
19853
+ prewarm: external_exports.literal(true).optional()
19804
19854
  }).strict();
19805
19855
 
19806
19856
  // ../../shared-contracts/dist/harness-launch-settings.js
@@ -20437,26 +20487,26 @@ function parseHostUsage(value) {
20437
20487
  }
20438
20488
  }
20439
20489
  const indicators = value.composerIndicators === void 0 ? {} : { composerIndicators: composerIndicatorsSchema.parse(value.composerIndicators) };
20440
- for (const field of [
20490
+ for (const field2 of [
20441
20491
  "totalCredits",
20442
20492
  "contextUsagePercent",
20443
20493
  "apiOutputTokensPerSecond"
20444
20494
  ]) {
20445
- const candidate = value[field];
20495
+ const candidate = value[field2];
20446
20496
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
20447
- throw new Error(`Harness Usage '${field}' must be a finite non-negative number`);
20497
+ throw new Error(`Harness Usage '${field2}' must be a finite non-negative number`);
20448
20498
  }
20449
20499
  }
20450
- for (const field of tokenFields) {
20451
- const candidate = value[field];
20500
+ for (const field2 of tokenFields) {
20501
+ const candidate = value[field2];
20452
20502
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
20453
- throw new Error(`Harness Usage '${field}' must be a non-negative safe integer`);
20503
+ throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
20454
20504
  }
20455
20505
  }
20456
- for (const field of safeIntegerFields) {
20457
- const candidate = value[field];
20506
+ for (const field2 of safeIntegerFields) {
20507
+ const candidate = value[field2];
20458
20508
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
20459
- throw new Error(`Harness Usage '${field}' must be a non-negative safe integer`);
20509
+ throw new Error(`Harness Usage '${field2}' must be a non-negative safe integer`);
20460
20510
  }
20461
20511
  }
20462
20512
  if (value.outputTokensPerSecond !== void 0 && (typeof value.outputTokensPerSecond !== "number" || !Number.isFinite(value.outputTokensPerSecond) || value.outputTokensPerSecond < 0)) {
@@ -20465,16 +20515,16 @@ function parseHostUsage(value) {
20465
20515
  if (value.totalCostUsd !== void 0 && (typeof value.totalCostUsd !== "number" || !Number.isFinite(value.totalCostUsd) || value.totalCostUsd < 0)) {
20466
20516
  throw new Error("Harness Usage 'totalCostUsd' must be a finite non-negative number");
20467
20517
  }
20468
- for (const field of ["totalCredits", "contextUsagePercent"]) {
20469
- const candidate = value[field];
20518
+ for (const field2 of ["totalCredits", "contextUsagePercent"]) {
20519
+ const candidate = value[field2];
20470
20520
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
20471
- throw new Error(`Harness Usage '${field}' must be a finite non-negative number`);
20521
+ throw new Error(`Harness Usage '${field2}' must be a finite non-negative number`);
20472
20522
  }
20473
20523
  }
20474
- for (const field of percentFields) {
20475
- const candidate = value[field];
20524
+ for (const field2 of percentFields) {
20525
+ const candidate = value[field2];
20476
20526
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0 || candidate > 100)) {
20477
- throw new Error(`Harness Usage '${field}' must be between 0 and 100`);
20527
+ throw new Error(`Harness Usage '${field2}' must be between 0 and 100`);
20478
20528
  }
20479
20529
  }
20480
20530
  if (value.sessionCacheUsage !== void 0) {
@@ -20545,19 +20595,19 @@ function parseHostUsageRequest(value) {
20545
20595
  if (typeof value.requestId !== "string" || value.requestId.length === 0) {
20546
20596
  throw new Error("Harness Usage request 'requestId' must be a non-empty string");
20547
20597
  }
20548
- for (const field of ["model", "provider"]) {
20549
- const candidate = value[field];
20598
+ for (const field2 of ["model", "provider"]) {
20599
+ const candidate = value[field2];
20550
20600
  if (candidate !== void 0 && (typeof candidate !== "string" || candidate.length === 0)) {
20551
- throw new Error(`Harness Usage request '${field}' must be a non-empty string`);
20601
+ throw new Error(`Harness Usage request '${field2}' must be a non-empty string`);
20552
20602
  }
20553
20603
  }
20554
20604
  if (value.historical !== void 0 && typeof value.historical !== "boolean") {
20555
20605
  throw new Error("Harness Usage request 'historical' must be a boolean");
20556
20606
  }
20557
- for (const field of requestTokenFields) {
20558
- const candidate = value[field];
20607
+ for (const field2 of requestTokenFields) {
20608
+ const candidate = value[field2];
20559
20609
  if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
20560
- throw new Error(`Harness Usage request '${field}' must be a non-negative safe integer`);
20610
+ throw new Error(`Harness Usage request '${field2}' must be a non-negative safe integer`);
20561
20611
  }
20562
20612
  }
20563
20613
  if (value.inputTokens === void 0 || value.outputTokens === void 0) {
@@ -21372,9 +21422,9 @@ var DEEPSEEK_USAGE_COUNTERS = [
21372
21422
  "reasoningOutputTokens"
21373
21423
  ];
21374
21424
  function mergeDeepSeekUsage(current, next) {
21375
- const counters = Object.fromEntries(DEEPSEEK_USAGE_COUNTERS.flatMap((field) => {
21376
- const value = (current?.[field] ?? 0) + (next[field] ?? 0);
21377
- return current?.[field] !== void 0 || next[field] !== void 0 ? [[field, value]] : [];
21425
+ const counters = Object.fromEntries(DEEPSEEK_USAGE_COUNTERS.flatMap((field2) => {
21426
+ const value = (current?.[field2] ?? 0) + (next[field2] ?? 0);
21427
+ return current?.[field2] !== void 0 || next[field2] !== void 0 ? [[field2, value]] : [];
21378
21428
  }));
21379
21429
  const context = next.contextUsedTokens !== void 0 && next.contextWindowTokens !== void 0 ? {
21380
21430
  contextUsedTokens: next.contextUsedTokens,
@@ -21786,7 +21836,7 @@ function onlyKeys(value, required2, optional2 = []) {
21786
21836
  return required2.every((key) => Object.hasOwn(value, key)) && Reflect.ownKeys(value).every((key) => typeof key === "string" && allowed.has(key));
21787
21837
  }
21788
21838
  function requiredFields(value, fields) {
21789
- if (fields.some((field) => !Object.hasOwn(value, field)))
21839
+ if (fields.some((field2) => !Object.hasOwn(value, field2)))
21790
21840
  throw invalid("required fields");
21791
21841
  }
21792
21842
  function assertJsonValue2(value, label) {
@@ -22110,9 +22160,9 @@ function validateTeamPayload(type, data) {
22110
22160
  identifier(value.id, "team payload id");
22111
22161
  if (key === "member") {
22112
22162
  requiredOptionalKeys(value, ["id", "name", "description", "provider", "context", "phase"], ["error"]);
22113
- for (const field of ["name", "description", "provider"])
22114
- if (typeof value[field] !== "string")
22115
- throw invalid(`team member ${field}`);
22163
+ for (const field2 of ["name", "description", "provider"])
22164
+ if (typeof value[field2] !== "string")
22165
+ throw invalid(`team member ${field2}`);
22116
22166
  if (!["fresh", "fork"].includes(value.context) || !["provisioning", "active", "failed"].includes(value.phase) || value.error !== void 0 && typeof value.error !== "string")
22117
22167
  throw invalid("team member");
22118
22168
  } else if (key === "task") {
@@ -22126,8 +22176,8 @@ function validateTeamPayload(type, data) {
22126
22176
  stringArray(value.writeScopes, "team task writeScopes");
22127
22177
  } else {
22128
22178
  exactKeys(value, ["id", "senderId", "senderName", "targetId", "content"]);
22129
- for (const field of ["senderId", "senderName", "targetId"])
22130
- identifier(value[field], `team message ${field}`);
22179
+ for (const field2 of ["senderId", "senderName", "targetId"])
22180
+ identifier(value[field2], `team message ${field2}`);
22131
22181
  validateBlocks(value.content);
22132
22182
  }
22133
22183
  }
@@ -22572,7 +22622,7 @@ var DeepSeekGenerationProbeError = class extends Error {
22572
22622
  this.stderrTail = options.stderrTail;
22573
22623
  }
22574
22624
  };
22575
- var DEFAULT_TIMEOUT_MS = 5e3;
22625
+ var DEFAULT_TIMEOUT_MS = 15e3;
22576
22626
  var DEFAULT_CLEANUP_TIMEOUT_MS = 1e3;
22577
22627
  var DEFAULT_OUTPUT_LIMIT_BYTES = 16 * 1024;
22578
22628
  var DIAGNOSTIC_RAW_TAIL_BYTES = 16 * 1024;
@@ -23003,7 +23053,7 @@ var ModernRemoteConnectionError = class extends Error {
23003
23053
  this.remoteFailure = sanitizeModernRemoteFailure(remoteFailure3);
23004
23054
  }
23005
23055
  };
23006
- var DEFAULT_STARTUP_TIMEOUT_MS = 2e4;
23056
+ var DEFAULT_STARTUP_TIMEOUT_MS = 9e4;
23007
23057
  var DEFAULT_UNARY_TIMEOUT_MS = 1e4;
23008
23058
  var DEFAULT_STREAM_OPEN_TIMEOUT_MS = 1e4;
23009
23059
  var DEFAULT_CLOSE_TIMEOUT_MS = 3e3;
@@ -26309,15 +26359,24 @@ function attachedKnownInvocation(value, sinks) {
26309
26359
  return { event: value.event, eventId: value.eventId, agentId: value.agentId };
26310
26360
  }
26311
26361
  function parseApprovalRequest(value) {
26312
- if (!hasOnlyKeys(value, ["toolName"], ["callId", "reason"]) || !nonBlankString3(value.toolName) || Object.hasOwn(value, "callId") && !nonBlankString3(value.callId) || Object.hasOwn(value, "reason") && !boundedString3(value.reason)) {
26362
+ if (!hasOnlyKeys(value, ["toolName"], ["callId", "reason", "displayReason"]) || !nonBlankString3(value.toolName) || Object.hasOwn(value, "callId") && !nonBlankString3(value.callId) || Object.hasOwn(value, "reason") && !boundedString3(value.reason) || Object.hasOwn(value, "displayReason") && !isApprovalDisplayReason(value.displayReason)) {
26313
26363
  throw invalidFrame();
26314
26364
  }
26315
26365
  return {
26316
26366
  toolName: value.toolName,
26317
26367
  ...typeof value.callId === "string" ? { callId: value.callId } : {},
26318
- ...typeof value.reason === "string" ? { reason: value.reason } : {}
26368
+ ...typeof value.reason === "string" ? { reason: value.reason } : {},
26369
+ ...Object.hasOwn(value, "displayReason") ? { displayReason: value.displayReason } : {}
26319
26370
  };
26320
26371
  }
26372
+ function isApprovalDisplayReason(value) {
26373
+ if (!isPlainRecord6(value))
26374
+ return false;
26375
+ const entries = Object.entries(value);
26376
+ if (entries.length === 0)
26377
+ return false;
26378
+ return entries.every(([locale, text]) => locale.length > 0 && nonBlankString3(text) && boundedString3(text));
26379
+ }
26321
26380
  function parseQuestionRequest(value) {
26322
26381
  if (!hasOnlyKeys(value, ["questions"], ["wait"]) || !Array.isArray(value.questions)) {
26323
26382
  throw invalidFrame();
@@ -28135,7 +28194,7 @@ function validateToolResultMessage(value, profile) {
28135
28194
  return callId;
28136
28195
  }
28137
28196
  function requiredFields2(value, fields) {
28138
- if (fields.some((field) => !Object.hasOwn(value, field))) {
28197
+ if (fields.some((field2) => !Object.hasOwn(value, field2))) {
28139
28198
  fail("Modern history known event omitted a required field");
28140
28199
  }
28141
28200
  }
@@ -28160,7 +28219,7 @@ function validUsage(value) {
28160
28219
  if (!nonNegativeSafeInteger2(value.inputTokens) || !nonNegativeSafeInteger2(value.outputTokens)) {
28161
28220
  return false;
28162
28221
  }
28163
- return fields.slice(2).every((field) => value[field] === void 0 || nonNegativeSafeInteger2(value[field]));
28222
+ return fields.slice(2).every((field2) => value[field2] === void 0 || nonNegativeSafeInteger2(value[field2]));
28164
28223
  }
28165
28224
  function validateTurnReason(value) {
28166
28225
  if (!isRecord4(value) || typeof value.kind !== "string") {
@@ -28275,7 +28334,7 @@ function validateInboxSplice(data, profile) {
28275
28334
  }
28276
28335
  }
28277
28336
  function validateApprovalAsked(data) {
28278
- requiredOptionalKeys(data, ["id", "toolName"], ["callId", "reason"]);
28337
+ requiredOptionalKeys(data, ["id", "toolName"], ["callId", "reason", "displayReason"]);
28279
28338
  requiredString(data.id, "approval/asked id");
28280
28339
  requiredString(data.toolName, "approval/asked toolName");
28281
28340
  if (data.callId !== void 0)
@@ -28283,6 +28342,17 @@ function validateApprovalAsked(data) {
28283
28342
  if (data.reason !== void 0 && typeof data.reason !== "string") {
28284
28343
  fail("Modern history approval/asked reason is malformed");
28285
28344
  }
28345
+ if (data.displayReason !== void 0 && !isApprovalDisplayReason2(data.displayReason)) {
28346
+ fail("Modern history approval/asked displayReason is malformed");
28347
+ }
28348
+ }
28349
+ function isApprovalDisplayReason2(value) {
28350
+ if (!isRecord4(value))
28351
+ return false;
28352
+ const entries = Object.entries(value);
28353
+ if (entries.length === 0)
28354
+ return false;
28355
+ return entries.every(([locale, text]) => locale.length > 0 && typeof text === "string" && text.length > 0 && nonBlankString(text));
28286
28356
  }
28287
28357
  function validateApprovalDecided(data) {
28288
28358
  exactKeys(data, ["id", "outcome"]);
@@ -29196,7 +29266,7 @@ var ModernHarnessSession = class {
29196
29266
  type: "approval",
29197
29267
  interactionId,
29198
29268
  turnId: active.turnId,
29199
- title: delivery.request.reason ?? `Allow ${delivery.request.toolName}?`,
29269
+ title: delivery.request.displayReason?.en ?? delivery.request.reason ?? `Allow ${delivery.request.toolName}?`,
29200
29270
  description: delivery.request.callId ? `${delivery.request.toolName} (${delivery.request.callId})` : delivery.request.toolName,
29201
29271
  subject: { type: "nativeAction" },
29202
29272
  actions: [