@codexhost/cli-darwin-x64 0.9.1 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14519,6 +14519,61 @@ function date4(params) {
14519
14519
  // ../../../node_modules/zod/v4/classic/external.js
14520
14520
  config(en_default());
14521
14521
 
14522
+ // ../../shared-contracts/dist/credential-imports.js
14523
+ var credentialSourceSchema = external_exports.object({
14524
+ id: external_exports.string().min(1).max(256),
14525
+ harnessId: external_exports.string().min(1),
14526
+ label: external_exports.string().min(1).max(512),
14527
+ provider: external_exports.enum(["openai-codex", "xai"])
14528
+ }).strict();
14529
+ var credentialImportNameSchema = external_exports.string().regex(/^[a-z][a-z0-9-]{0,47}$/);
14530
+ var credentialImportRecordSchema = external_exports.object({
14531
+ name: credentialImportNameSchema,
14532
+ source: credentialSourceSchema,
14533
+ importedAt: external_exports.string()
14534
+ }).strict();
14535
+ var credentialImportsRequestSchema = external_exports.discriminatedUnion("action", [
14536
+ external_exports.object({ action: external_exports.literal("list") }).strict(),
14537
+ external_exports.object({
14538
+ action: external_exports.literal("import"),
14539
+ sourceId: external_exports.string().min(1).max(256),
14540
+ name: credentialImportNameSchema,
14541
+ confirmed: external_exports.literal(true)
14542
+ }).strict(),
14543
+ external_exports.object({
14544
+ action: external_exports.literal("reimport"),
14545
+ sourceId: external_exports.string().min(1).max(256),
14546
+ name: credentialImportNameSchema,
14547
+ confirmed: external_exports.literal(true)
14548
+ }).strict(),
14549
+ external_exports.object({
14550
+ action: external_exports.literal("remove"),
14551
+ name: credentialImportNameSchema,
14552
+ confirmed: external_exports.literal(true)
14553
+ }).strict()
14554
+ ]);
14555
+ var credentialOtherLoginSchema = external_exports.object({
14556
+ provider: external_exports.string().min(1).max(128),
14557
+ type: external_exports.enum(["oauth", "api_key", "unknown"]),
14558
+ /** Best-effort account label (e.g. the email in a Codex token), derived locally when present. */
14559
+ label: external_exports.string().min(1).max(512).optional(),
14560
+ /** Recognized credential vendor, derived from the OAuth token issuer. Absent when unknown. */
14561
+ vendor: external_exports.enum(["openai-codex", "xai"]).optional()
14562
+ }).strict();
14563
+ var credentialImportsResultSchema = external_exports.object({
14564
+ sources: external_exports.array(credentialSourceSchema),
14565
+ targets: external_exports.array(external_exports.object({
14566
+ harnessId: external_exports.string(),
14567
+ providers: external_exports.array(external_exports.enum(["openai-codex", "xai"])),
14568
+ imports: external_exports.array(credentialImportRecordSchema),
14569
+ others: external_exports.array(credentialOtherLoginSchema).default([])
14570
+ }).strict())
14571
+ }).strict();
14572
+ var credentialImportsParamsSchema = external_exports.object({
14573
+ targetHarnessId: external_exports.string().min(1).max(128).optional(),
14574
+ request: credentialImportsRequestSchema
14575
+ }).strict();
14576
+
14522
14577
  // ../../shared-contracts/dist/version.js
14523
14578
  var WORKSPACE_CONTRACT_VERSION = 1;
14524
14579
 
@@ -15222,10 +15277,21 @@ var harnessCommandDescriptorSchema = external_exports.object({
15222
15277
  invocation: commandInvocationSchema,
15223
15278
  label: commandLabelSchema,
15224
15279
  description: commandDescriptionSchema.optional(),
15225
- argumentMode: external_exports.enum(["none", "text"])
15280
+ argumentMode: external_exports.enum(["none", "text"]),
15281
+ /**
15282
+ * Native distinction reported by the Harness. Omitted when the Harness does
15283
+ * not tell skills and commands apart; consumers treat that as "command".
15284
+ */
15285
+ kind: external_exports.enum(["command", "skill"]).optional()
15226
15286
  }).strict();
15227
15287
  var harnessCommandCatalogSchema = external_exports.object({
15228
- commands: external_exports.array(harnessCommandDescriptorSchema)
15288
+ commands: external_exports.array(harnessCommandDescriptorSchema),
15289
+ /**
15290
+ * `live` when the catalog includes what a native Session reports for its
15291
+ * workspace (custom commands, skills); `static` for Adapter built-ins only.
15292
+ * Omitted by Adapters; set by the Host on inspection results.
15293
+ */
15294
+ source: external_exports.enum(["live", "static"]).optional()
15229
15295
  }).strict().superRefine((catalog, context) => {
15230
15296
  const ids = /* @__PURE__ */ new Set();
15231
15297
  for (const [index, command] of catalog.commands.entries()) {
@@ -15239,7 +15305,11 @@ var harnessCommandCatalogSchema = external_exports.object({
15239
15305
  ids.add(command.id);
15240
15306
  }
15241
15307
  });
15242
- var harnessCommandsInspectParamsSchema = external_exports.object({ harnessId: harnessIdSchema }).strict();
15308
+ var harnessCommandsInspectParamsSchema = external_exports.object({
15309
+ harnessId: harnessIdSchema,
15310
+ /** Workspace of a draft without a Thread, for its live catalog when known. */
15311
+ cwd: external_exports.string().min(1).optional()
15312
+ }).strict();
15243
15313
  var threadCommandsInspectParamsSchema = external_exports.object({
15244
15314
  threadId: hostThreadIdSchema
15245
15315
  }).strict();
@@ -15595,6 +15665,82 @@ function parseHostUsage(value) {
15595
15665
  return { ...value };
15596
15666
  }
15597
15667
 
15668
+ // ../../harness-adapter/dist/live-command-catalog.js
15669
+ var COMMON_EXCLUDED_LIVE_COMMANDS = /* @__PURE__ */ new Set([
15670
+ // Session lifecycle
15671
+ "branch",
15672
+ "clear",
15673
+ "exit",
15674
+ "fork",
15675
+ "fresh",
15676
+ "new",
15677
+ "quit",
15678
+ "rename",
15679
+ "rename-chat",
15680
+ "reset",
15681
+ "resume",
15682
+ "rewind",
15683
+ "session",
15684
+ "sessions",
15685
+ // Desktop-owned configuration
15686
+ "autocompact",
15687
+ "color",
15688
+ "config",
15689
+ "effort",
15690
+ "fast",
15691
+ "keybindings",
15692
+ "model",
15693
+ "models",
15694
+ "output-style",
15695
+ "permissions",
15696
+ "settings",
15697
+ "statusline",
15698
+ "terminal-setup",
15699
+ "theme",
15700
+ "vim",
15701
+ // Trust and approval policy
15702
+ "always-approve",
15703
+ "auto-mode-setup",
15704
+ // Native login
15705
+ "login",
15706
+ "logout",
15707
+ // Work outliving the Turn
15708
+ "autopilot",
15709
+ "background",
15710
+ "bg",
15711
+ "goal",
15712
+ "jobs",
15713
+ "loop",
15714
+ "multitask",
15715
+ "queue",
15716
+ "remote-control",
15717
+ "schedule",
15718
+ "steer",
15719
+ // Native terminal UI
15720
+ "copy",
15721
+ "debug",
15722
+ "feedback",
15723
+ "heapdump",
15724
+ "share",
15725
+ "shell",
15726
+ // Plugin and MCP management
15727
+ "marketplace",
15728
+ "mcp",
15729
+ "plugins",
15730
+ "reload-plugins"
15731
+ ]);
15732
+ var COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES = ["__", "hooks-"];
15733
+ function isExcludedLiveCommand(name, kind, extra = {}) {
15734
+ const normalized = name.trim().replace(/^\//u, "");
15735
+ if (new Set(extra.names ?? []).has(normalized))
15736
+ return true;
15737
+ if (extra.prefixes?.some((prefix) => normalized.startsWith(prefix)))
15738
+ return true;
15739
+ if (kind === "skill")
15740
+ return false;
15741
+ return COMMON_EXCLUDED_LIVE_COMMANDS.has(normalized) || COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES.some((prefix) => normalized.startsWith(prefix));
15742
+ }
15743
+
15598
15744
  // dist/common.js
15599
15745
  var CODEBUDDY_ID = harnessIdSchema.parse("codebuddy");
15600
15746
  var CODEBUDDY_RUNTIME_PROFILE = {
@@ -15686,7 +15832,8 @@ function commandCatalog(value, profile = CODEBUDDY_RUNTIME_PROFILE) {
15686
15832
  return {
15687
15833
  commands: rows(value).flatMap((entry) => {
15688
15834
  const name = text(entry.name).replace(/^\//u, "");
15689
- if (excluded.has(name) || seen.has(name))
15835
+ const skill = record2(entry._meta).type === "skill";
15836
+ if (excluded.has(name) || seen.has(name) || isExcludedLiveCommand(name, skill ? "skill" : "command"))
15690
15837
  return [];
15691
15838
  const parsed = harnessCommandCatalogSchema.safeParse({
15692
15839
  commands: [
@@ -15695,7 +15842,8 @@ function commandCatalog(value, profile = CODEBUDDY_RUNTIME_PROFILE) {
15695
15842
  invocation: `/${name}`,
15696
15843
  label: name,
15697
15844
  ...text(entry.description).trim() ? { description: text(entry.description).trim().slice(0, 512) } : {},
15698
- argumentMode: name === "compact" || record2(entry.input).hint || record2(entry._meta).type === "skill" ? "text" : "none"
15845
+ argumentMode: name === "compact" || record2(entry.input).hint || record2(entry._meta).type === "skill" ? "text" : "none",
15846
+ ...record2(entry._meta).type === "skill" ? { kind: "skill" } : {}
15699
15847
  }
15700
15848
  ]
15701
15849
  });
@@ -22466,7 +22614,7 @@ var CodeBuddyInteractions = class {
22466
22614
  });
22467
22615
  }
22468
22616
  const actions = request.options.flatMap((option) => {
22469
- const effect = option.kind === "allow_once" ? "allowOnce" : option.kind === "allow_always" ? "allowAlways" : option.kind === "reject_once" || option.kind === "reject_always" ? "deny" : void 0;
22617
+ const effect = option.kind === "allow_once" ? "allowOnce" : option.kind === "allow_always" ? "allowForSession" : option.kind === "reject_once" || option.kind === "reject_always" ? "deny" : void 0;
22470
22618
  return effect ? [{ id: option.optionId, label: option.name, effect }] : [];
22471
22619
  });
22472
22620
  if (!actions.some((action) => action.effect === "deny"))
@@ -23334,6 +23482,7 @@ var CodeBuddyAdapter = class {
23334
23482
  options;
23335
23483
  harnessId;
23336
23484
  commandCatalog;
23485
+ liveCommandCatalog = true;
23337
23486
  subagents = {
23338
23487
  readSnapshot: async ({ parent, nativeSubagentId, cwd }) => {
23339
23488
  try {
@@ -24306,6 +24455,7 @@ var BrokeredHarnessSession = class {
24306
24455
  var BrokeredHarnessAdapter = class {
24307
24456
  #sessions = /* @__PURE__ */ new Set();
24308
24457
  commandCatalog;
24458
+ liveCommandCatalog;
24309
24459
  harnessId;
24310
24460
  #descriptorPath;
24311
24461
  #forwardEnvironment;
@@ -24328,6 +24478,8 @@ var BrokeredHarnessAdapter = class {
24328
24478
  this.#forwardEnvironment = input.forwardDelegationEnvironment === true;
24329
24479
  if (input.commandCatalog)
24330
24480
  this.commandCatalog = input.commandCatalog;
24481
+ if (input.liveCommandCatalog)
24482
+ this.liveCommandCatalog = true;
24331
24483
  this.#descriptorPath = input.descriptorPath ?? defaultHarnessBrokerDescriptorPath(input.environment, this.harnessId);
24332
24484
  }
24333
24485
  async inspectAccount() {
@@ -24422,6 +24574,7 @@ function createHarnessAdapter(context) {
24422
24574
  harnessId: "codebuddy",
24423
24575
  forwardDelegationEnvironment: true,
24424
24576
  commandCatalog: CODEBUDDY_COMMAND_CATALOG,
24577
+ liveCommandCatalog: true,
24425
24578
  environment: { ...context.environment }
24426
24579
  });
24427
24580
  return new CodeBuddyAdapter({ environment: { ...context.environment } });
@@ -27208,6 +27208,61 @@ function date4(params) {
27208
27208
  // ../../../node_modules/zod/v4/classic/external.js
27209
27209
  config(en_default());
27210
27210
 
27211
+ // ../../shared-contracts/dist/credential-imports.js
27212
+ var credentialSourceSchema = external_exports.object({
27213
+ id: external_exports.string().min(1).max(256),
27214
+ harnessId: external_exports.string().min(1),
27215
+ label: external_exports.string().min(1).max(512),
27216
+ provider: external_exports.enum(["openai-codex", "xai"])
27217
+ }).strict();
27218
+ var credentialImportNameSchema = external_exports.string().regex(/^[a-z][a-z0-9-]{0,47}$/);
27219
+ var credentialImportRecordSchema = external_exports.object({
27220
+ name: credentialImportNameSchema,
27221
+ source: credentialSourceSchema,
27222
+ importedAt: external_exports.string()
27223
+ }).strict();
27224
+ var credentialImportsRequestSchema = external_exports.discriminatedUnion("action", [
27225
+ external_exports.object({ action: external_exports.literal("list") }).strict(),
27226
+ external_exports.object({
27227
+ action: external_exports.literal("import"),
27228
+ sourceId: external_exports.string().min(1).max(256),
27229
+ name: credentialImportNameSchema,
27230
+ confirmed: external_exports.literal(true)
27231
+ }).strict(),
27232
+ external_exports.object({
27233
+ action: external_exports.literal("reimport"),
27234
+ sourceId: external_exports.string().min(1).max(256),
27235
+ name: credentialImportNameSchema,
27236
+ confirmed: external_exports.literal(true)
27237
+ }).strict(),
27238
+ external_exports.object({
27239
+ action: external_exports.literal("remove"),
27240
+ name: credentialImportNameSchema,
27241
+ confirmed: external_exports.literal(true)
27242
+ }).strict()
27243
+ ]);
27244
+ var credentialOtherLoginSchema = external_exports.object({
27245
+ provider: external_exports.string().min(1).max(128),
27246
+ type: external_exports.enum(["oauth", "api_key", "unknown"]),
27247
+ /** Best-effort account label (e.g. the email in a Codex token), derived locally when present. */
27248
+ label: external_exports.string().min(1).max(512).optional(),
27249
+ /** Recognized credential vendor, derived from the OAuth token issuer. Absent when unknown. */
27250
+ vendor: external_exports.enum(["openai-codex", "xai"]).optional()
27251
+ }).strict();
27252
+ var credentialImportsResultSchema = external_exports.object({
27253
+ sources: external_exports.array(credentialSourceSchema),
27254
+ targets: external_exports.array(external_exports.object({
27255
+ harnessId: external_exports.string(),
27256
+ providers: external_exports.array(external_exports.enum(["openai-codex", "xai"])),
27257
+ imports: external_exports.array(credentialImportRecordSchema),
27258
+ others: external_exports.array(credentialOtherLoginSchema).default([])
27259
+ }).strict())
27260
+ }).strict();
27261
+ var credentialImportsParamsSchema = external_exports.object({
27262
+ targetHarnessId: external_exports.string().min(1).max(128).optional(),
27263
+ request: credentialImportsRequestSchema
27264
+ }).strict();
27265
+
27211
27266
  // ../../shared-contracts/dist/version.js
27212
27267
  var WORKSPACE_CONTRACT_VERSION = 1;
27213
27268
 
@@ -27911,10 +27966,21 @@ var harnessCommandDescriptorSchema = external_exports.object({
27911
27966
  invocation: commandInvocationSchema,
27912
27967
  label: commandLabelSchema,
27913
27968
  description: commandDescriptionSchema.optional(),
27914
- argumentMode: external_exports.enum(["none", "text"])
27969
+ argumentMode: external_exports.enum(["none", "text"]),
27970
+ /**
27971
+ * Native distinction reported by the Harness. Omitted when the Harness does
27972
+ * not tell skills and commands apart; consumers treat that as "command".
27973
+ */
27974
+ kind: external_exports.enum(["command", "skill"]).optional()
27915
27975
  }).strict();
27916
27976
  var harnessCommandCatalogSchema = external_exports.object({
27917
- commands: external_exports.array(harnessCommandDescriptorSchema)
27977
+ commands: external_exports.array(harnessCommandDescriptorSchema),
27978
+ /**
27979
+ * `live` when the catalog includes what a native Session reports for its
27980
+ * workspace (custom commands, skills); `static` for Adapter built-ins only.
27981
+ * Omitted by Adapters; set by the Host on inspection results.
27982
+ */
27983
+ source: external_exports.enum(["live", "static"]).optional()
27918
27984
  }).strict().superRefine((catalog, context) => {
27919
27985
  const ids = /* @__PURE__ */ new Set();
27920
27986
  for (const [index, command] of catalog.commands.entries()) {
@@ -27928,7 +27994,11 @@ var harnessCommandCatalogSchema = external_exports.object({
27928
27994
  ids.add(command.id);
27929
27995
  }
27930
27996
  });
27931
- var harnessCommandsInspectParamsSchema = external_exports.object({ harnessId: harnessIdSchema }).strict();
27997
+ var harnessCommandsInspectParamsSchema = external_exports.object({
27998
+ harnessId: harnessIdSchema,
27999
+ /** Workspace of a draft without a Thread, for its live catalog when known. */
28000
+ cwd: external_exports.string().min(1).optional()
28001
+ }).strict();
27932
28002
  var threadCommandsInspectParamsSchema = external_exports.object({
27933
28003
  threadId: hostThreadIdSchema
27934
28004
  }).strict();
@@ -28075,56 +28145,6 @@ var updateStatusResultSchema = external_exports.strictObject({
28075
28145
  // ../../shared-contracts/dist/index.js
28076
28146
  var workspaceContractVersionSchema = external_exports.literal(WORKSPACE_CONTRACT_VERSION);
28077
28147
 
28078
- // dist/slash-commands.js
28079
- function cursorCommands(native) {
28080
- const commands = /* @__PURE__ */ new Map();
28081
- for (const command of native) {
28082
- const result = harnessCommandDescriptorSchema.safeParse({
28083
- id: `cursor.${command.name}`,
28084
- invocation: `/${command.name}`,
28085
- label: `/${command.name}`,
28086
- ...command.description.trim() ? { description: command.description.slice(0, 512) } : {},
28087
- // Cursor 2026.09.10 omits input metadata for both its administrative command
28088
- // and custom commands/skills, whose parser still accepts trailing text.
28089
- // Honor an explicit native no-input declaration without disabling those skills.
28090
- argumentMode: command.input === null || command.name === "copy-request-id" ? "none" : "text"
28091
- });
28092
- if (result.success)
28093
- commands.set(result.data.id, result.data);
28094
- }
28095
- return { commands: [...commands.values()] };
28096
- }
28097
- var CURSOR_COMMAND_CATALOG = cursorCommands([
28098
- { name: "copy-request-id", description: "Copy the current request ID", input: null }
28099
- ]);
28100
- function cursorCommandPrompt(command, catalog) {
28101
- const descriptor = catalog.commands.find(({ id }) => id === command.commandId);
28102
- if (!descriptor)
28103
- return {
28104
- ok: false,
28105
- error: {
28106
- code: "unsupported",
28107
- message: "Cursor did not advertise this command",
28108
- retryable: false
28109
- }
28110
- };
28111
- const args = command.arguments;
28112
- if (args && (Object.keys(args).some((key) => key !== "text") || args.text !== void 0 && typeof args.text !== "string" || descriptor.argumentMode === "none" && Object.keys(args).length))
28113
- return {
28114
- ok: false,
28115
- error: {
28116
- code: "invalidRequest",
28117
- message: "Invalid Cursor command arguments",
28118
- retryable: false
28119
- }
28120
- };
28121
- const text2 = typeof args?.text === "string" ? args.text.trim() : "";
28122
- return { ok: true, value: `${descriptor.invocation}${text2 ? ` ${text2}` : ""}` };
28123
- }
28124
-
28125
- // dist/adapter.js
28126
- import path7 from "node:path";
28127
-
28128
28148
  // ../../harness-adapter/dist/approval.js
28129
28149
  function invalidRequest(message) {
28130
28150
  return { code: "invalidRequest", message, retryable: false };
@@ -28334,6 +28354,135 @@ function parseHostUsage(value) {
28334
28354
  return { ...value };
28335
28355
  }
28336
28356
 
28357
+ // ../../harness-adapter/dist/live-command-catalog.js
28358
+ var COMMON_EXCLUDED_LIVE_COMMANDS = /* @__PURE__ */ new Set([
28359
+ // Session lifecycle
28360
+ "branch",
28361
+ "clear",
28362
+ "exit",
28363
+ "fork",
28364
+ "fresh",
28365
+ "new",
28366
+ "quit",
28367
+ "rename",
28368
+ "rename-chat",
28369
+ "reset",
28370
+ "resume",
28371
+ "rewind",
28372
+ "session",
28373
+ "sessions",
28374
+ // Desktop-owned configuration
28375
+ "autocompact",
28376
+ "color",
28377
+ "config",
28378
+ "effort",
28379
+ "fast",
28380
+ "keybindings",
28381
+ "model",
28382
+ "models",
28383
+ "output-style",
28384
+ "permissions",
28385
+ "settings",
28386
+ "statusline",
28387
+ "terminal-setup",
28388
+ "theme",
28389
+ "vim",
28390
+ // Trust and approval policy
28391
+ "always-approve",
28392
+ "auto-mode-setup",
28393
+ // Native login
28394
+ "login",
28395
+ "logout",
28396
+ // Work outliving the Turn
28397
+ "autopilot",
28398
+ "background",
28399
+ "bg",
28400
+ "goal",
28401
+ "jobs",
28402
+ "loop",
28403
+ "multitask",
28404
+ "queue",
28405
+ "remote-control",
28406
+ "schedule",
28407
+ "steer",
28408
+ // Native terminal UI
28409
+ "copy",
28410
+ "debug",
28411
+ "feedback",
28412
+ "heapdump",
28413
+ "share",
28414
+ "shell",
28415
+ // Plugin and MCP management
28416
+ "marketplace",
28417
+ "mcp",
28418
+ "plugins",
28419
+ "reload-plugins"
28420
+ ]);
28421
+ var COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES = ["__", "hooks-"];
28422
+ function isExcludedLiveCommand(name, kind, extra = {}) {
28423
+ const normalized = name.trim().replace(/^\//u, "");
28424
+ if (new Set(extra.names ?? []).has(normalized))
28425
+ return true;
28426
+ if (extra.prefixes?.some((prefix) => normalized.startsWith(prefix)))
28427
+ return true;
28428
+ if (kind === "skill")
28429
+ return false;
28430
+ return COMMON_EXCLUDED_LIVE_COMMANDS.has(normalized) || COMMON_EXCLUDED_LIVE_COMMAND_PREFIXES.some((prefix) => normalized.startsWith(prefix));
28431
+ }
28432
+
28433
+ // dist/slash-commands.js
28434
+ var CURSOR_EXCLUSIONS = { names: ["update-cli-config"] };
28435
+ function cursorCommands(native) {
28436
+ const commands = /* @__PURE__ */ new Map();
28437
+ for (const command of native) {
28438
+ if (isExcludedLiveCommand(command.name, "command", CURSOR_EXCLUSIONS))
28439
+ continue;
28440
+ const result = harnessCommandDescriptorSchema.safeParse({
28441
+ id: `cursor.${command.name}`,
28442
+ invocation: `/${command.name}`,
28443
+ label: `/${command.name}`,
28444
+ ...command.description.trim() ? { description: command.description.slice(0, 512) } : {},
28445
+ // Cursor 2026.09.10 omits input metadata for both its administrative command
28446
+ // and custom commands/skills, whose parser still accepts trailing text.
28447
+ // Honor an explicit native no-input declaration without disabling those skills.
28448
+ argumentMode: command.input === null || command.name === "copy-request-id" ? "none" : "text"
28449
+ });
28450
+ if (result.success)
28451
+ commands.set(result.data.id, result.data);
28452
+ }
28453
+ return { commands: [...commands.values()] };
28454
+ }
28455
+ var CURSOR_COMMAND_CATALOG = cursorCommands([
28456
+ { name: "copy-request-id", description: "Copy the current request ID", input: null }
28457
+ ]);
28458
+ function cursorCommandPrompt(command, catalog) {
28459
+ const descriptor = catalog.commands.find(({ id }) => id === command.commandId);
28460
+ if (!descriptor)
28461
+ return {
28462
+ ok: false,
28463
+ error: {
28464
+ code: "unsupported",
28465
+ message: "Cursor did not advertise this command",
28466
+ retryable: false
28467
+ }
28468
+ };
28469
+ const args = command.arguments;
28470
+ if (args && (Object.keys(args).some((key) => key !== "text") || args.text !== void 0 && typeof args.text !== "string" || descriptor.argumentMode === "none" && Object.keys(args).length))
28471
+ return {
28472
+ ok: false,
28473
+ error: {
28474
+ code: "invalidRequest",
28475
+ message: "Invalid Cursor command arguments",
28476
+ retryable: false
28477
+ }
28478
+ };
28479
+ const text2 = typeof args?.text === "string" ? args.text.trim() : "";
28480
+ return { ok: true, value: `${descriptor.invocation}${text2 ? ` ${text2}` : ""}` };
28481
+ }
28482
+
28483
+ // dist/adapter.js
28484
+ import path7 from "node:path";
28485
+
28337
28486
  // dist/thinking.js
28338
28487
  var choices = (option) => option.type === "select" ? option.options.flatMap((entry) => "value" in entry ? [entry] : entry.options) : [];
28339
28488
  function cursorThinking(options) {
@@ -46073,6 +46222,7 @@ function rejected(code, message) {
46073
46222
  var CursorAdapter = class {
46074
46223
  options;
46075
46224
  commandCatalog = CURSOR_COMMAND_CATALOG;
46225
+ liveCommandCatalog = true;
46076
46226
  subagents = {
46077
46227
  readSnapshot: async ({ parent, nativeSubagentId, cwd }) => {
46078
46228
  if (parent.harnessId !== this.harnessId || this.#closed)
@@ -47418,6 +47568,7 @@ var BrokeredHarnessSession = class {
47418
47568
  var BrokeredHarnessAdapter = class {
47419
47569
  #sessions = /* @__PURE__ */ new Set();
47420
47570
  commandCatalog;
47571
+ liveCommandCatalog;
47421
47572
  harnessId;
47422
47573
  #descriptorPath;
47423
47574
  #forwardEnvironment;
@@ -47440,6 +47591,8 @@ var BrokeredHarnessAdapter = class {
47440
47591
  this.#forwardEnvironment = input.forwardDelegationEnvironment === true;
47441
47592
  if (input.commandCatalog)
47442
47593
  this.commandCatalog = input.commandCatalog;
47594
+ if (input.liveCommandCatalog)
47595
+ this.liveCommandCatalog = true;
47443
47596
  this.#descriptorPath = input.descriptorPath ?? defaultHarnessBrokerDescriptorPath(input.environment, this.harnessId);
47444
47597
  }
47445
47598
  async inspectAccount() {
@@ -47534,6 +47687,7 @@ function createHarnessAdapter(context) {
47534
47687
  harnessId: "cursor-cli",
47535
47688
  forwardDelegationEnvironment: true,
47536
47689
  commandCatalog: CURSOR_COMMAND_CATALOG,
47690
+ liveCommandCatalog: true,
47537
47691
  environment: { ...context.environment }
47538
47692
  });
47539
47693
  return new CursorAdapter({ environment: { ...context.environment } });