@liberseek/boft-cli-win32-arm64 0.7.1 → 0.7.3

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.
@@ -27890,10 +27890,21 @@ var harnessCommandDescriptorSchema = external_exports.object({
27890
27890
  invocation: commandInvocationSchema,
27891
27891
  label: commandLabelSchema,
27892
27892
  description: commandDescriptionSchema.optional(),
27893
- argumentMode: external_exports.enum(["none", "text"])
27893
+ argumentMode: external_exports.enum(["none", "text"]),
27894
+ /**
27895
+ * Native distinction reported by the Harness. Omitted when the Harness does
27896
+ * not tell skills and commands apart; consumers treat that as "command".
27897
+ */
27898
+ kind: external_exports.enum(["command", "skill"]).optional()
27894
27899
  }).strict();
27895
27900
  var harnessCommandCatalogSchema = external_exports.object({
27896
- commands: external_exports.array(harnessCommandDescriptorSchema)
27901
+ commands: external_exports.array(harnessCommandDescriptorSchema),
27902
+ /**
27903
+ * `live` when the catalog includes what a native Session reports for its
27904
+ * workspace (custom commands, skills); `static` for Adapter built-ins only.
27905
+ * Omitted by Adapters; set by the Host on inspection results.
27906
+ */
27907
+ source: external_exports.enum(["live", "static"]).optional()
27897
27908
  }).strict().superRefine((catalog, context) => {
27898
27909
  const ids = /* @__PURE__ */ new Set();
27899
27910
  for (const [index, command] of catalog.commands.entries()) {
@@ -27907,7 +27918,11 @@ var harnessCommandCatalogSchema = external_exports.object({
27907
27918
  ids.add(command.id);
27908
27919
  }
27909
27920
  });
27910
- var harnessCommandsInspectParamsSchema = external_exports.object({ harnessId: harnessIdSchema }).strict();
27921
+ var harnessCommandsInspectParamsSchema = external_exports.object({
27922
+ harnessId: harnessIdSchema,
27923
+ /** Workspace of a draft without a Thread, for its live catalog when known. */
27924
+ cwd: external_exports.string().min(1).optional()
27925
+ }).strict();
27911
27926
  var threadCommandsInspectParamsSchema = external_exports.object({
27912
27927
  threadId: hostThreadIdSchema
27913
27928
  }).strict();
@@ -28477,6 +28492,271 @@ function mapQoderException(error51) {
28477
28492
  };
28478
28493
  }
28479
28494
 
28495
+ // ../../harness-adapter/dist/approval.js
28496
+ function invalidRequest(message) {
28497
+ return { code: "invalidRequest", message, retryable: false };
28498
+ }
28499
+ function validateHostApprovalResponse(interaction, response) {
28500
+ return interaction.actions.some(({ id }) => id === response.actionId) ? null : invalidRequest("Approval Response contains an undeclared action ID");
28501
+ }
28502
+
28503
+ // ../../harness-adapter/dist/question.js
28504
+ function invalidRequest2(message) {
28505
+ return { code: "invalidRequest", message, retryable: false };
28506
+ }
28507
+ function validateHostQuestionResponse(interaction, response) {
28508
+ const questionIds = new Set(interaction.questions.map(({ id }) => id));
28509
+ if (response.cancelled) {
28510
+ return Object.keys(response.answers).length === 0 ? null : invalidRequest2("Cancelled Question Response must not contain answers");
28511
+ }
28512
+ for (const answerId of Object.keys(response.answers)) {
28513
+ if (!questionIds.has(answerId)) {
28514
+ return invalidRequest2("Question Response contains an unknown Question ID");
28515
+ }
28516
+ }
28517
+ for (const question of interaction.questions) {
28518
+ const answers = response.answers[question.id] ?? [];
28519
+ if (!question.optional && answers.length === 0) {
28520
+ return invalidRequest2("Question Response omits a required answer");
28521
+ }
28522
+ if (question.type === "text") {
28523
+ if (answers.length > 1) {
28524
+ return invalidRequest2("Text Question accepts at most one answer");
28525
+ }
28526
+ continue;
28527
+ }
28528
+ if (!question.multiple && answers.length > 1) {
28529
+ return invalidRequest2("Single-choice Question accepts at most one answer");
28530
+ }
28531
+ const declared = new Set(question.options.map(({ value }) => value));
28532
+ if (!question.allowOther && answers.some((answer) => !declared.has(answer))) {
28533
+ return invalidRequest2("Question Response contains an undeclared choice");
28534
+ }
28535
+ }
28536
+ return null;
28537
+ }
28538
+
28539
+ // ../../harness-adapter/dist/output-channel.js
28540
+ var HarnessOutputChannel = class {
28541
+ outputs;
28542
+ #consumerCreated = false;
28543
+ #ended = false;
28544
+ #pending = [];
28545
+ #values = [];
28546
+ constructor() {
28547
+ this.outputs = {
28548
+ [Symbol.asyncIterator]: () => {
28549
+ if (this.#consumerCreated) {
28550
+ throw new Error("Harness outputs allow only one consumer");
28551
+ }
28552
+ this.#consumerCreated = true;
28553
+ return {
28554
+ next: () => this.#next()
28555
+ };
28556
+ }
28557
+ };
28558
+ }
28559
+ emit(value) {
28560
+ if (this.#ended)
28561
+ return false;
28562
+ const resolve = this.#pending.shift();
28563
+ if (resolve)
28564
+ resolve({ done: false, value });
28565
+ else
28566
+ this.#values.push(value);
28567
+ return true;
28568
+ }
28569
+ end() {
28570
+ if (this.#ended)
28571
+ return;
28572
+ this.#ended = true;
28573
+ if (this.#values.length !== 0)
28574
+ return;
28575
+ for (const resolve of this.#pending.splice(0))
28576
+ resolve({ done: true, value: void 0 });
28577
+ }
28578
+ #next() {
28579
+ const value = this.#values.shift();
28580
+ if (value !== void 0)
28581
+ return Promise.resolve({ done: false, value });
28582
+ if (this.#ended)
28583
+ return Promise.resolve({ done: true, value: void 0 });
28584
+ return new Promise((resolve) => this.#pending.push(resolve));
28585
+ }
28586
+ };
28587
+
28588
+ // ../../harness-adapter/dist/usage.js
28589
+ var tokenFields = [
28590
+ "inputTokens",
28591
+ "cachedInputTokens",
28592
+ "cacheWriteInputTokens",
28593
+ "outputTokens",
28594
+ "outputTokensPerSecond",
28595
+ "reasoningOutputTokens",
28596
+ "totalTokens",
28597
+ "contextWindowTokens",
28598
+ "contextUsedTokens"
28599
+ ];
28600
+ var safeIntegerFields = [
28601
+ "planFiveHourResetsAtUnix",
28602
+ "planSevenDayResetsAtUnix"
28603
+ ];
28604
+ var percentFields = [
28605
+ "cacheHitRatePercent",
28606
+ "planFiveHourUsedPercent",
28607
+ "planSevenDayUsedPercent"
28608
+ ];
28609
+ var usageFields = /* @__PURE__ */ new Set([
28610
+ ...tokenFields,
28611
+ ...safeIntegerFields,
28612
+ ...percentFields,
28613
+ "totalCostUsd",
28614
+ "totalCredits",
28615
+ "contextUsagePercent"
28616
+ ]);
28617
+ function isRecord(value) {
28618
+ return typeof value === "object" && value !== null && !Array.isArray(value);
28619
+ }
28620
+ function parseHostUsage(value) {
28621
+ if (!isRecord(value))
28622
+ throw new Error("Harness Usage must be an object");
28623
+ const keys = Object.keys(value);
28624
+ if (keys.length === 0)
28625
+ throw new Error("Harness Usage must contain a reliable field");
28626
+ for (const key of keys) {
28627
+ if (!usageFields.has(key)) {
28628
+ throw new Error(`Harness Usage contains unknown field '${key}'`);
28629
+ }
28630
+ }
28631
+ for (const field of ["totalCredits", "contextUsagePercent"]) {
28632
+ const candidate = value[field];
28633
+ if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
28634
+ throw new Error(`Harness Usage '${field}' must be a finite non-negative number`);
28635
+ }
28636
+ }
28637
+ for (const field of tokenFields) {
28638
+ const candidate = value[field];
28639
+ if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
28640
+ throw new Error(`Harness Usage '${field}' must be a non-negative safe integer`);
28641
+ }
28642
+ }
28643
+ for (const field of safeIntegerFields) {
28644
+ const candidate = value[field];
28645
+ if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
28646
+ throw new Error(`Harness Usage '${field}' must be a non-negative safe integer`);
28647
+ }
28648
+ }
28649
+ if (value.outputTokensPerSecond !== void 0 && (typeof value.outputTokensPerSecond !== "number" || !Number.isFinite(value.outputTokensPerSecond) || value.outputTokensPerSecond < 0)) {
28650
+ throw new Error("Harness Usage 'outputTokensPerSecond' must be a finite non-negative number");
28651
+ }
28652
+ if (value.totalCostUsd !== void 0 && (typeof value.totalCostUsd !== "number" || !Number.isFinite(value.totalCostUsd) || value.totalCostUsd < 0)) {
28653
+ throw new Error("Harness Usage 'totalCostUsd' must be a finite non-negative number");
28654
+ }
28655
+ for (const field of ["totalCredits", "contextUsagePercent"]) {
28656
+ const candidate = value[field];
28657
+ if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
28658
+ throw new Error(`Harness Usage '${field}' must be a finite non-negative number`);
28659
+ }
28660
+ }
28661
+ for (const field of percentFields) {
28662
+ const candidate = value[field];
28663
+ if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0 || candidate > 100)) {
28664
+ throw new Error(`Harness Usage '${field}' must be between 0 and 100`);
28665
+ }
28666
+ }
28667
+ const hasContextUsed = value.contextUsedTokens !== void 0;
28668
+ const hasContextWindow = value.contextWindowTokens !== void 0;
28669
+ if (hasContextUsed !== hasContextWindow) {
28670
+ throw new Error("Harness Usage context fields must be provided together");
28671
+ }
28672
+ if (hasContextWindow && value.contextWindowTokens === 0) {
28673
+ throw new Error("Harness Usage 'contextWindowTokens' must be greater than zero");
28674
+ }
28675
+ if (value.planFiveHourResetsAtUnix !== void 0 && value.planFiveHourUsedPercent === void 0) {
28676
+ throw new Error("Harness Usage 'planFiveHourResetsAtUnix' must be provided with 'planFiveHourUsedPercent'");
28677
+ }
28678
+ if (value.planSevenDayResetsAtUnix !== void 0 && value.planSevenDayUsedPercent === void 0) {
28679
+ throw new Error("Harness Usage 'planSevenDayResetsAtUnix' must be provided with 'planSevenDayUsedPercent'");
28680
+ }
28681
+ return { ...value };
28682
+ }
28683
+
28684
+ // ../../harness-adapter/dist/live-command-catalog.js
28685
+ var COMMON_EXCLUDED_LIVE_COMMANDS = /* @__PURE__ */ new Set([
28686
+ // Session lifecycle
28687
+ "branch",
28688
+ "clear",
28689
+ "exit",
28690
+ "fork",
28691
+ "fresh",
28692
+ "new",
28693
+ "quit",
28694
+ "rename",
28695
+ "rename-chat",
28696
+ "reset",
28697
+ "resume",
28698
+ "rewind",
28699
+ "session",
28700
+ "sessions",
28701
+ // Desktop-owned configuration
28702
+ "autocompact",
28703
+ "color",
28704
+ "config",
28705
+ "effort",
28706
+ "fast",
28707
+ "keybindings",
28708
+ "model",
28709
+ "models",
28710
+ "output-style",
28711
+ "permissions",
28712
+ "settings",
28713
+ "statusline",
28714
+ "terminal-setup",
28715
+ "theme",
28716
+ "vim",
28717
+ // Trust and approval policy
28718
+ "always-approve",
28719
+ "auto-mode-setup",
28720
+ // Native login
28721
+ "login",
28722
+ "logout",
28723
+ // Work outliving the Turn
28724
+ "autopilot",
28725
+ "background",
28726
+ "bg",
28727
+ "goal",
28728
+ "jobs",
28729
+ "loop",
28730
+ "multitask",
28731
+ "queue",
28732
+ "remote-control",
28733
+ "schedule",
28734
+ "steer",
28735
+ // Native terminal UI
28736
+ "copy",
28737
+ "debug",
28738
+ "feedback",
28739
+ "heapdump",
28740
+ "share",
28741
+ "shell",
28742
+ // Plugin and MCP management
28743
+ "marketplace",
28744
+ "mcp",
28745
+ "plugins",
28746
+ "reload-plugins"
28747
+ ]);
28748
+ var COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES = ["__", "hooks-"];
28749
+ function isExcludedLiveCommand(name, kind, extra = {}) {
28750
+ const normalized = name.trim().replace(/^\//u, "");
28751
+ if (new Set(extra.names ?? []).has(normalized))
28752
+ return true;
28753
+ if (extra.prefixes?.some((prefix) => normalized.startsWith(prefix)))
28754
+ return true;
28755
+ if (kind === "skill")
28756
+ return false;
28757
+ return COMMON_EXCLUDED_LIVE_COMMANDS.has(normalized) || COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES.some((prefix) => normalized.startsWith(prefix));
28758
+ }
28759
+
28480
28760
  // dist/qoder-slash-commands.js
28481
28761
  var QODER_FALLBACK_COMMAND_CATALOG = harnessCommandCatalogSchema.parse({
28482
28762
  commands: [
@@ -28515,7 +28795,7 @@ function mapQoderSlashCommands(commands) {
28515
28795
  if (typeof rawName !== "string")
28516
28796
  continue;
28517
28797
  const cleanName = rawName.replace(/^\//, "").trim().toLowerCase();
28518
- if (!cleanName)
28798
+ if (!cleanName || isExcludedLiveCommand(cleanName, "command"))
28519
28799
  continue;
28520
28800
  const id = `qoder.${cleanName}`;
28521
28801
  if (seenIds.has(id))
@@ -29113,195 +29393,6 @@ function mapToQoderPermissionMode(id) {
29113
29393
  // dist/qoder-sdk-transport.js
29114
29394
  import { randomUUID } from "node:crypto";
29115
29395
 
29116
- // ../../harness-adapter/dist/approval.js
29117
- function invalidRequest(message) {
29118
- return { code: "invalidRequest", message, retryable: false };
29119
- }
29120
- function validateHostApprovalResponse(interaction, response) {
29121
- return interaction.actions.some(({ id }) => id === response.actionId) ? null : invalidRequest("Approval Response contains an undeclared action ID");
29122
- }
29123
-
29124
- // ../../harness-adapter/dist/question.js
29125
- function invalidRequest2(message) {
29126
- return { code: "invalidRequest", message, retryable: false };
29127
- }
29128
- function validateHostQuestionResponse(interaction, response) {
29129
- const questionIds = new Set(interaction.questions.map(({ id }) => id));
29130
- if (response.cancelled) {
29131
- return Object.keys(response.answers).length === 0 ? null : invalidRequest2("Cancelled Question Response must not contain answers");
29132
- }
29133
- for (const answerId of Object.keys(response.answers)) {
29134
- if (!questionIds.has(answerId)) {
29135
- return invalidRequest2("Question Response contains an unknown Question ID");
29136
- }
29137
- }
29138
- for (const question of interaction.questions) {
29139
- const answers = response.answers[question.id] ?? [];
29140
- if (!question.optional && answers.length === 0) {
29141
- return invalidRequest2("Question Response omits a required answer");
29142
- }
29143
- if (question.type === "text") {
29144
- if (answers.length > 1) {
29145
- return invalidRequest2("Text Question accepts at most one answer");
29146
- }
29147
- continue;
29148
- }
29149
- if (!question.multiple && answers.length > 1) {
29150
- return invalidRequest2("Single-choice Question accepts at most one answer");
29151
- }
29152
- const declared = new Set(question.options.map(({ value }) => value));
29153
- if (!question.allowOther && answers.some((answer) => !declared.has(answer))) {
29154
- return invalidRequest2("Question Response contains an undeclared choice");
29155
- }
29156
- }
29157
- return null;
29158
- }
29159
-
29160
- // ../../harness-adapter/dist/output-channel.js
29161
- var HarnessOutputChannel = class {
29162
- outputs;
29163
- #consumerCreated = false;
29164
- #ended = false;
29165
- #pending = [];
29166
- #values = [];
29167
- constructor() {
29168
- this.outputs = {
29169
- [Symbol.asyncIterator]: () => {
29170
- if (this.#consumerCreated) {
29171
- throw new Error("Harness outputs allow only one consumer");
29172
- }
29173
- this.#consumerCreated = true;
29174
- return {
29175
- next: () => this.#next()
29176
- };
29177
- }
29178
- };
29179
- }
29180
- emit(value) {
29181
- if (this.#ended)
29182
- return false;
29183
- const resolve = this.#pending.shift();
29184
- if (resolve)
29185
- resolve({ done: false, value });
29186
- else
29187
- this.#values.push(value);
29188
- return true;
29189
- }
29190
- end() {
29191
- if (this.#ended)
29192
- return;
29193
- this.#ended = true;
29194
- if (this.#values.length !== 0)
29195
- return;
29196
- for (const resolve of this.#pending.splice(0))
29197
- resolve({ done: true, value: void 0 });
29198
- }
29199
- #next() {
29200
- const value = this.#values.shift();
29201
- if (value !== void 0)
29202
- return Promise.resolve({ done: false, value });
29203
- if (this.#ended)
29204
- return Promise.resolve({ done: true, value: void 0 });
29205
- return new Promise((resolve) => this.#pending.push(resolve));
29206
- }
29207
- };
29208
-
29209
- // ../../harness-adapter/dist/usage.js
29210
- var tokenFields = [
29211
- "inputTokens",
29212
- "cachedInputTokens",
29213
- "cacheWriteInputTokens",
29214
- "outputTokens",
29215
- "outputTokensPerSecond",
29216
- "reasoningOutputTokens",
29217
- "totalTokens",
29218
- "contextWindowTokens",
29219
- "contextUsedTokens"
29220
- ];
29221
- var safeIntegerFields = [
29222
- "planFiveHourResetsAtUnix",
29223
- "planSevenDayResetsAtUnix"
29224
- ];
29225
- var percentFields = [
29226
- "cacheHitRatePercent",
29227
- "planFiveHourUsedPercent",
29228
- "planSevenDayUsedPercent"
29229
- ];
29230
- var usageFields = /* @__PURE__ */ new Set([
29231
- ...tokenFields,
29232
- ...safeIntegerFields,
29233
- ...percentFields,
29234
- "totalCostUsd",
29235
- "totalCredits",
29236
- "contextUsagePercent"
29237
- ]);
29238
- function isRecord(value) {
29239
- return typeof value === "object" && value !== null && !Array.isArray(value);
29240
- }
29241
- function parseHostUsage(value) {
29242
- if (!isRecord(value))
29243
- throw new Error("Harness Usage must be an object");
29244
- const keys = Object.keys(value);
29245
- if (keys.length === 0)
29246
- throw new Error("Harness Usage must contain a reliable field");
29247
- for (const key of keys) {
29248
- if (!usageFields.has(key)) {
29249
- throw new Error(`Harness Usage contains unknown field '${key}'`);
29250
- }
29251
- }
29252
- for (const field of ["totalCredits", "contextUsagePercent"]) {
29253
- const candidate = value[field];
29254
- if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
29255
- throw new Error(`Harness Usage '${field}' must be a finite non-negative number`);
29256
- }
29257
- }
29258
- for (const field of tokenFields) {
29259
- const candidate = value[field];
29260
- if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
29261
- throw new Error(`Harness Usage '${field}' must be a non-negative safe integer`);
29262
- }
29263
- }
29264
- for (const field of safeIntegerFields) {
29265
- const candidate = value[field];
29266
- if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isSafeInteger(candidate) || candidate < 0)) {
29267
- throw new Error(`Harness Usage '${field}' must be a non-negative safe integer`);
29268
- }
29269
- }
29270
- if (value.outputTokensPerSecond !== void 0 && (typeof value.outputTokensPerSecond !== "number" || !Number.isFinite(value.outputTokensPerSecond) || value.outputTokensPerSecond < 0)) {
29271
- throw new Error("Harness Usage 'outputTokensPerSecond' must be a finite non-negative number");
29272
- }
29273
- if (value.totalCostUsd !== void 0 && (typeof value.totalCostUsd !== "number" || !Number.isFinite(value.totalCostUsd) || value.totalCostUsd < 0)) {
29274
- throw new Error("Harness Usage 'totalCostUsd' must be a finite non-negative number");
29275
- }
29276
- for (const field of ["totalCredits", "contextUsagePercent"]) {
29277
- const candidate = value[field];
29278
- if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0)) {
29279
- throw new Error(`Harness Usage '${field}' must be a finite non-negative number`);
29280
- }
29281
- }
29282
- for (const field of percentFields) {
29283
- const candidate = value[field];
29284
- if (candidate !== void 0 && (typeof candidate !== "number" || !Number.isFinite(candidate) || candidate < 0 || candidate > 100)) {
29285
- throw new Error(`Harness Usage '${field}' must be between 0 and 100`);
29286
- }
29287
- }
29288
- const hasContextUsed = value.contextUsedTokens !== void 0;
29289
- const hasContextWindow = value.contextWindowTokens !== void 0;
29290
- if (hasContextUsed !== hasContextWindow) {
29291
- throw new Error("Harness Usage context fields must be provided together");
29292
- }
29293
- if (hasContextWindow && value.contextWindowTokens === 0) {
29294
- throw new Error("Harness Usage 'contextWindowTokens' must be greater than zero");
29295
- }
29296
- if (value.planFiveHourResetsAtUnix !== void 0 && value.planFiveHourUsedPercent === void 0) {
29297
- throw new Error("Harness Usage 'planFiveHourResetsAtUnix' must be provided with 'planFiveHourUsedPercent'");
29298
- }
29299
- if (value.planSevenDayResetsAtUnix !== void 0 && value.planSevenDayUsedPercent === void 0) {
29300
- throw new Error("Harness Usage 'planSevenDayResetsAtUnix' must be provided with 'planSevenDayUsedPercent'");
29301
- }
29302
- return { ...value };
29303
- }
29304
-
29305
29396
  // ../../../node_modules/@qoder-ai/qoder-agent-sdk/dist/index.js
29306
29397
  var dist_exports = {};
29307
29398
  __export(dist_exports, {
@@ -51985,6 +52076,7 @@ var QoderAdapter = class {
51985
52076
  harnessId;
51986
52077
  #variant;
51987
52078
  commandCatalog = QODER_FALLBACK_COMMAND_CATALOG;
52079
+ liveCommandCatalog = true;
51988
52080
  #commandOverride;
51989
52081
  #environment;
51990
52082
  #platform;