@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
  // ../qoder/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
  // ../qoder/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;
@@ -15306,10 +15306,21 @@ var harnessCommandDescriptorSchema = external_exports.object({
15306
15306
  invocation: commandInvocationSchema,
15307
15307
  label: commandLabelSchema,
15308
15308
  description: commandDescriptionSchema.optional(),
15309
- argumentMode: external_exports.enum(["none", "text"])
15309
+ argumentMode: external_exports.enum(["none", "text"]),
15310
+ /**
15311
+ * Native distinction reported by the Harness. Omitted when the Harness does
15312
+ * not tell skills and commands apart; consumers treat that as "command".
15313
+ */
15314
+ kind: external_exports.enum(["command", "skill"]).optional()
15310
15315
  }).strict();
15311
15316
  var harnessCommandCatalogSchema = external_exports.object({
15312
- commands: external_exports.array(harnessCommandDescriptorSchema)
15317
+ commands: external_exports.array(harnessCommandDescriptorSchema),
15318
+ /**
15319
+ * `live` when the catalog includes what a native Session reports for its
15320
+ * workspace (custom commands, skills); `static` for Adapter built-ins only.
15321
+ * Omitted by Adapters; set by the Host on inspection results.
15322
+ */
15323
+ source: external_exports.enum(["live", "static"]).optional()
15313
15324
  }).strict().superRefine((catalog, context) => {
15314
15325
  const ids = /* @__PURE__ */ new Set();
15315
15326
  for (const [index, command] of catalog.commands.entries()) {
@@ -15323,7 +15334,11 @@ var harnessCommandCatalogSchema = external_exports.object({
15323
15334
  ids.add(command.id);
15324
15335
  }
15325
15336
  });
15326
- var harnessCommandsInspectParamsSchema = external_exports.object({ harnessId: harnessIdSchema }).strict();
15337
+ var harnessCommandsInspectParamsSchema = external_exports.object({
15338
+ harnessId: harnessIdSchema,
15339
+ /** Workspace of a draft without a Thread, for its live catalog when known. */
15340
+ cwd: external_exports.string().min(1).optional()
15341
+ }).strict();
15327
15342
  var threadCommandsInspectParamsSchema = external_exports.object({
15328
15343
  threadId: hostThreadIdSchema
15329
15344
  }).strict();
@@ -15685,6 +15700,82 @@ function parseHostUsage(value) {
15685
15700
  return { ...value };
15686
15701
  }
15687
15702
 
15703
+ // ../../harness-adapter/dist/live-command-catalog.js
15704
+ var COMMON_EXCLUDED_LIVE_COMMANDS = /* @__PURE__ */ new Set([
15705
+ // Session lifecycle
15706
+ "branch",
15707
+ "clear",
15708
+ "exit",
15709
+ "fork",
15710
+ "fresh",
15711
+ "new",
15712
+ "quit",
15713
+ "rename",
15714
+ "rename-chat",
15715
+ "reset",
15716
+ "resume",
15717
+ "rewind",
15718
+ "session",
15719
+ "sessions",
15720
+ // Desktop-owned configuration
15721
+ "autocompact",
15722
+ "color",
15723
+ "config",
15724
+ "effort",
15725
+ "fast",
15726
+ "keybindings",
15727
+ "model",
15728
+ "models",
15729
+ "output-style",
15730
+ "permissions",
15731
+ "settings",
15732
+ "statusline",
15733
+ "terminal-setup",
15734
+ "theme",
15735
+ "vim",
15736
+ // Trust and approval policy
15737
+ "always-approve",
15738
+ "auto-mode-setup",
15739
+ // Native login
15740
+ "login",
15741
+ "logout",
15742
+ // Work outliving the Turn
15743
+ "autopilot",
15744
+ "background",
15745
+ "bg",
15746
+ "goal",
15747
+ "jobs",
15748
+ "loop",
15749
+ "multitask",
15750
+ "queue",
15751
+ "remote-control",
15752
+ "schedule",
15753
+ "steer",
15754
+ // Native terminal UI
15755
+ "copy",
15756
+ "debug",
15757
+ "feedback",
15758
+ "heapdump",
15759
+ "share",
15760
+ "shell",
15761
+ // Plugin and MCP management
15762
+ "marketplace",
15763
+ "mcp",
15764
+ "plugins",
15765
+ "reload-plugins"
15766
+ ]);
15767
+ var COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES = ["__", "hooks-"];
15768
+ function isExcludedLiveCommand(name, kind, extra = {}) {
15769
+ const normalized = name.trim().replace(/^\//u, "");
15770
+ if (new Set(extra.names ?? []).has(normalized))
15771
+ return true;
15772
+ if (extra.prefixes?.some((prefix) => normalized.startsWith(prefix)))
15773
+ return true;
15774
+ if (kind === "skill")
15775
+ return false;
15776
+ return COMMON_EXCLUDED_LIVE_COMMANDS.has(normalized) || COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES.some((prefix) => normalized.startsWith(prefix));
15777
+ }
15778
+
15688
15779
  // ../../harness-broker/dist/protocol.js
15689
15780
  var HARNESS_BROKER_PROTOCOL_VERSION = 1;
15690
15781
  var HARNESS_BROKER_MAX_FRAME_BYTES = 8 * 1024 * 1024;
@@ -16504,6 +16595,7 @@ var BrokeredHarnessSession = class {
16504
16595
  var BrokeredHarnessAdapter = class {
16505
16596
  #sessions = /* @__PURE__ */ new Set();
16506
16597
  commandCatalog;
16598
+ liveCommandCatalog;
16507
16599
  harnessId;
16508
16600
  #descriptorPath;
16509
16601
  #forwardEnvironment;
@@ -16605,6 +16697,8 @@ var BrokeredHarnessAdapter = class {
16605
16697
  this.#forwardEnvironment = input.forwardDelegationEnvironment === true;
16606
16698
  if (input.commandCatalog)
16607
16699
  this.commandCatalog = input.commandCatalog;
16700
+ if (input.liveCommandCatalog)
16701
+ this.liveCommandCatalog = true;
16608
16702
  this.#descriptorPath = input.descriptorPath ?? defaultHarnessBrokerDescriptorPath(input.environment, this.harnessId);
16609
16703
  }
16610
16704
  async inspectAccount() {
@@ -21973,7 +22067,8 @@ function commandCatalog(value, profile = CODEBUDDY_RUNTIME_PROFILE) {
21973
22067
  return {
21974
22068
  commands: rows(value).flatMap((entry) => {
21975
22069
  const name = text(entry.name).replace(/^\//u, "");
21976
- if (excluded.has(name) || seen.has(name))
22070
+ const skill = record2(entry._meta).type === "skill";
22071
+ if (excluded.has(name) || seen.has(name) || isExcludedLiveCommand(name, skill ? "skill" : "command"))
21977
22072
  return [];
21978
22073
  const parsed = harnessCommandCatalogSchema.safeParse({
21979
22074
  commands: [
@@ -21982,7 +22077,8 @@ function commandCatalog(value, profile = CODEBUDDY_RUNTIME_PROFILE) {
21982
22077
  invocation: `/${name}`,
21983
22078
  label: name,
21984
22079
  ...text(entry.description).trim() ? { description: text(entry.description).trim().slice(0, 512) } : {},
21985
- argumentMode: name === "compact" || record2(entry.input).hint || record2(entry._meta).type === "skill" ? "text" : "none"
22080
+ argumentMode: name === "compact" || record2(entry.input).hint || record2(entry._meta).type === "skill" ? "text" : "none",
22081
+ ...record2(entry._meta).type === "skill" ? { kind: "skill" } : {}
21986
22082
  }
21987
22083
  ]
21988
22084
  });
@@ -24441,6 +24537,7 @@ var CodeBuddyAdapter = class {
24441
24537
  options;
24442
24538
  harnessId;
24443
24539
  commandCatalog;
24540
+ liveCommandCatalog = true;
24444
24541
  subagents = {
24445
24542
  readSnapshot: async ({ parent, nativeSubagentId, cwd }) => {
24446
24543
  try {