@codexhost/cli-darwin-x64 0.9.2 → 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.
@@ -27966,10 +27966,21 @@ var harnessCommandDescriptorSchema = external_exports.object({
27966
27966
  invocation: commandInvocationSchema,
27967
27967
  label: commandLabelSchema,
27968
27968
  description: commandDescriptionSchema.optional(),
27969
- 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()
27970
27975
  }).strict();
27971
27976
  var harnessCommandCatalogSchema = external_exports.object({
27972
- 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()
27973
27984
  }).strict().superRefine((catalog, context) => {
27974
27985
  const ids = /* @__PURE__ */ new Set();
27975
27986
  for (const [index, command] of catalog.commands.entries()) {
@@ -27983,7 +27994,11 @@ var harnessCommandCatalogSchema = external_exports.object({
27983
27994
  ids.add(command.id);
27984
27995
  }
27985
27996
  });
27986
- 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();
27987
28002
  var threadCommandsInspectParamsSchema = external_exports.object({
27988
28003
  threadId: hostThreadIdSchema
27989
28004
  }).strict();
@@ -28130,56 +28145,6 @@ var updateStatusResultSchema = external_exports.strictObject({
28130
28145
  // ../../shared-contracts/dist/index.js
28131
28146
  var workspaceContractVersionSchema = external_exports.literal(WORKSPACE_CONTRACT_VERSION);
28132
28147
 
28133
- // dist/slash-commands.js
28134
- function cursorCommands(native) {
28135
- const commands = /* @__PURE__ */ new Map();
28136
- for (const command of native) {
28137
- const result = harnessCommandDescriptorSchema.safeParse({
28138
- id: `cursor.${command.name}`,
28139
- invocation: `/${command.name}`,
28140
- label: `/${command.name}`,
28141
- ...command.description.trim() ? { description: command.description.slice(0, 512) } : {},
28142
- // Cursor 2026.09.10 omits input metadata for both its administrative command
28143
- // and custom commands/skills, whose parser still accepts trailing text.
28144
- // Honor an explicit native no-input declaration without disabling those skills.
28145
- argumentMode: command.input === null || command.name === "copy-request-id" ? "none" : "text"
28146
- });
28147
- if (result.success)
28148
- commands.set(result.data.id, result.data);
28149
- }
28150
- return { commands: [...commands.values()] };
28151
- }
28152
- var CURSOR_COMMAND_CATALOG = cursorCommands([
28153
- { name: "copy-request-id", description: "Copy the current request ID", input: null }
28154
- ]);
28155
- function cursorCommandPrompt(command, catalog) {
28156
- const descriptor = catalog.commands.find(({ id }) => id === command.commandId);
28157
- if (!descriptor)
28158
- return {
28159
- ok: false,
28160
- error: {
28161
- code: "unsupported",
28162
- message: "Cursor did not advertise this command",
28163
- retryable: false
28164
- }
28165
- };
28166
- const args = command.arguments;
28167
- if (args && (Object.keys(args).some((key) => key !== "text") || args.text !== void 0 && typeof args.text !== "string" || descriptor.argumentMode === "none" && Object.keys(args).length))
28168
- return {
28169
- ok: false,
28170
- error: {
28171
- code: "invalidRequest",
28172
- message: "Invalid Cursor command arguments",
28173
- retryable: false
28174
- }
28175
- };
28176
- const text2 = typeof args?.text === "string" ? args.text.trim() : "";
28177
- return { ok: true, value: `${descriptor.invocation}${text2 ? ` ${text2}` : ""}` };
28178
- }
28179
-
28180
- // dist/adapter.js
28181
- import path7 from "node:path";
28182
-
28183
28148
  // ../../harness-adapter/dist/approval.js
28184
28149
  function invalidRequest(message) {
28185
28150
  return { code: "invalidRequest", message, retryable: false };
@@ -28389,6 +28354,135 @@ function parseHostUsage(value) {
28389
28354
  return { ...value };
28390
28355
  }
28391
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
+
28392
28486
  // dist/thinking.js
28393
28487
  var choices = (option) => option.type === "select" ? option.options.flatMap((entry) => "value" in entry ? [entry] : entry.options) : [];
28394
28488
  function cursorThinking(options) {
@@ -46128,6 +46222,7 @@ function rejected(code, message) {
46128
46222
  var CursorAdapter = class {
46129
46223
  options;
46130
46224
  commandCatalog = CURSOR_COMMAND_CATALOG;
46225
+ liveCommandCatalog = true;
46131
46226
  subagents = {
46132
46227
  readSnapshot: async ({ parent, nativeSubagentId, cwd }) => {
46133
46228
  if (parent.harnessId !== this.harnessId || this.#closed)
@@ -47473,6 +47568,7 @@ var BrokeredHarnessSession = class {
47473
47568
  var BrokeredHarnessAdapter = class {
47474
47569
  #sessions = /* @__PURE__ */ new Set();
47475
47570
  commandCatalog;
47571
+ liveCommandCatalog;
47476
47572
  harnessId;
47477
47573
  #descriptorPath;
47478
47574
  #forwardEnvironment;
@@ -47495,6 +47591,8 @@ var BrokeredHarnessAdapter = class {
47495
47591
  this.#forwardEnvironment = input.forwardDelegationEnvironment === true;
47496
47592
  if (input.commandCatalog)
47497
47593
  this.commandCatalog = input.commandCatalog;
47594
+ if (input.liveCommandCatalog)
47595
+ this.liveCommandCatalog = true;
47498
47596
  this.#descriptorPath = input.descriptorPath ?? defaultHarnessBrokerDescriptorPath(input.environment, this.harnessId);
47499
47597
  }
47500
47598
  async inspectAccount() {
@@ -47589,6 +47687,7 @@ function createHarnessAdapter(context) {
47589
47687
  harnessId: "cursor-cli",
47590
47688
  forwardDelegationEnvironment: true,
47591
47689
  commandCatalog: CURSOR_COMMAND_CATALOG,
47690
+ liveCommandCatalog: true,
47592
47691
  environment: { ...context.environment }
47593
47692
  });
47594
47693
  return new CursorAdapter({ environment: { ...context.environment } });
@@ -18985,10 +18985,21 @@ var harnessCommandDescriptorSchema = external_exports.object({
18985
18985
  invocation: commandInvocationSchema,
18986
18986
  label: commandLabelSchema,
18987
18987
  description: commandDescriptionSchema.optional(),
18988
- argumentMode: external_exports.enum(["none", "text"])
18988
+ argumentMode: external_exports.enum(["none", "text"]),
18989
+ /**
18990
+ * Native distinction reported by the Harness. Omitted when the Harness does
18991
+ * not tell skills and commands apart; consumers treat that as "command".
18992
+ */
18993
+ kind: external_exports.enum(["command", "skill"]).optional()
18989
18994
  }).strict();
18990
18995
  var harnessCommandCatalogSchema = external_exports.object({
18991
- commands: external_exports.array(harnessCommandDescriptorSchema)
18996
+ commands: external_exports.array(harnessCommandDescriptorSchema),
18997
+ /**
18998
+ * `live` when the catalog includes what a native Session reports for its
18999
+ * workspace (custom commands, skills); `static` for Adapter built-ins only.
19000
+ * Omitted by Adapters; set by the Host on inspection results.
19001
+ */
19002
+ source: external_exports.enum(["live", "static"]).optional()
18992
19003
  }).strict().superRefine((catalog, context) => {
18993
19004
  const ids = /* @__PURE__ */ new Set();
18994
19005
  for (const [index, command] of catalog.commands.entries()) {
@@ -19002,7 +19013,11 @@ var harnessCommandCatalogSchema = external_exports.object({
19002
19013
  ids.add(command.id);
19003
19014
  }
19004
19015
  });
19005
- var harnessCommandsInspectParamsSchema = external_exports.object({ harnessId: harnessIdSchema }).strict();
19016
+ var harnessCommandsInspectParamsSchema = external_exports.object({
19017
+ harnessId: harnessIdSchema,
19018
+ /** Workspace of a draft without a Thread, for its live catalog when known. */
19019
+ cwd: external_exports.string().min(1).optional()
19020
+ }).strict();
19006
19021
  var threadCommandsInspectParamsSchema = external_exports.object({
19007
19022
  threadId: hostThreadIdSchema
19008
19023
  }).strict();
@@ -19608,7 +19623,7 @@ function parseDeepSeekEndpoint(endpoint = DEFAULT_DEEPSEEK_ENDPOINT) {
19608
19623
  throw probeError("protocolError", "DeepSeek Harness endpoint must be an uncredentialed loopback HTTP root");
19609
19624
  }
19610
19625
  if (parsed.searchParams.has("token")) {
19611
- throw probeError("authenticationRequired", "DeepSeek Harness Web bootstrap URL 不可作为连接端点;请关闭该实例,让 codexhost 启动 dsh-v0.1.2-rc.1 或 dsh-v0.1.5-rc.1(仅支持这两个版本)。\nA DeepSeek Harness Web bootstrap URL cannot be used as an endpoint. Close that instance and let codexhost start dsh-v0.1.2-rc.1 or dsh-v0.1.5-rc.1; only these two versions are supported.");
19626
+ throw probeError("authenticationRequired", "DeepSeek Harness Web bootstrap URL 不可作为连接端点;请关闭该实例,让 codexhost 启动本地 DSH Web。\nA DeepSeek Harness Web bootstrap URL cannot be used as an endpoint. Close that instance and let codexhost start the local DSH Web.");
19612
19627
  }
19613
19628
  if (parsed.search !== "") {
19614
19629
  throw probeError("protocolError", "DeepSeek Harness endpoint must not contain a query");
@@ -19640,11 +19655,7 @@ function classifyDeepSeekVersionOutput(output) {
19640
19655
  if (version2 === null || !SEMVER_PATTERN.test(version2)) {
19641
19656
  throw probeError("protocolError", "DeepSeek Harness --version did not return exactly one semantic version");
19642
19657
  }
19643
- if (version2 === "0.1.2-rc.1" || version2 === "0.1.5-rc.1") {
19644
- return { generation: "modern", version: version2 };
19645
- }
19646
- throw probeError("unsupported", `当前 DeepSeek Harness 版本 ${version2} 不受支持;codexhost 仅支持 dsh-v0.1.2-rc.1 和 dsh-v0.1.5-rc.1,推荐安装 dsh-v0.1.5-rc.1。
19647
- DeepSeek Harness ${version2} is unsupported. codexhost only supports dsh-v0.1.2-rc.1 and dsh-v0.1.5-rc.1; dsh-v0.1.5-rc.1 is recommended.`);
19658
+ return { generation: "modern", version: version2 };
19648
19659
  }
19649
19660
  function appendOutput(target, value, limit) {
19650
19661
  const chunk = Buffer.isBuffer(value) ? value : Buffer.from(String(value));
@@ -22865,14 +22876,11 @@ function matchesForkTail2(expectedPrefix, childEvents) {
22865
22876
 
22866
22877
  // dist/profiles/profile.js
22867
22878
  function deepSeekModernProfile(version2) {
22868
- if (version2 === "0.1.2-rc.1")
22869
- return DEEPSEEK_V012_PROFILE;
22870
- if (version2 === "0.1.5-rc.1")
22871
- return DEEPSEEK_V015_PROFILE;
22872
- throw new TypeError("DeepSeek Harness only supports 0.1.2-rc.1 and 0.1.5-rc.1");
22879
+ const base = /^0\.1\.2(?:-|\+|$)/u.test(version2) ? DEEPSEEK_V012_PROFILE : DEEPSEEK_V015_PROFILE;
22880
+ return base.version === version2 ? base : Object.freeze({ ...base, version: version2 });
22873
22881
  }
22874
22882
  function isDeepSeekV015(profile) {
22875
- return profile.version === "0.1.5-rc.1";
22883
+ return profile.sessionFormatVersion === 3;
22876
22884
  }
22877
22885
 
22878
22886
  // dist/modern/commands.js
@@ -30984,7 +30992,15 @@ function parseModernForkInput(input, profile) {
30984
30992
  function sessionLocatorMatches(locator, profile) {
30985
30993
  if (locator === void 0)
30986
30994
  return true;
30987
- return isDeepSeekV015(profile) && profileLocatorMatches(locator, profile);
30995
+ if (!isDeepSeekV015(profile) || !isRecord8(locator) || Reflect.ownKeys(locator).length !== 1 || typeof locator.dshVersion !== "string") {
30996
+ return false;
30997
+ }
30998
+ try {
30999
+ const { version: version2 } = classifyDeepSeekVersionOutput(locator.dshVersion);
31000
+ return isDeepSeekV015(deepSeekModernProfile(version2));
31001
+ } catch {
31002
+ return false;
31003
+ }
30988
31004
  }
30989
31005
  function checkpointLocatorMatches(locator, profile) {
30990
31006
  return isDeepSeekV015(profile) ? profileLocatorMatches(locator, profile) : locator === void 0;
@@ -31198,7 +31214,7 @@ var DeepSeekHarnessAdapter = class {
31198
31214
  harnessId: this.harnessId,
31199
31215
  nativeSessionId,
31200
31216
  formatVersion: 1,
31201
- ...this.#delegate?.version === "0.1.5-rc.1" ? { locator: { dshVersion: "0.1.5-rc.1" } } : {}
31217
+ ...this.#delegate && isDeepSeekV015(deepSeekModernProfile(this.#delegate.version)) ? { locator: { dshVersion: this.#delegate.version } } : {}
31202
31218
  })
31203
31219
  }
31204
31220
  };
@@ -31350,9 +31366,6 @@ var DeepSeekHarnessAdapter = class {
31350
31366
  durationMs: Math.max(0, Date.now() - startedAt)
31351
31367
  };
31352
31368
  }
31353
- if (executableFailure?.code === "unsupported") {
31354
- throw new DelegateSelectionError(executableFailure);
31355
- }
31356
31369
  if (await hasDeepSeekModernAuthenticationFingerprint(endpoint, signal)) {
31357
31370
  throw new DelegateSelectionError({
31358
31371
  code: "authenticationRequired",
@@ -31368,7 +31381,7 @@ var DeepSeekHarnessAdapter = class {
31368
31381
  if (!executable) {
31369
31382
  throw new DelegateSelectionError(executableFailure ? { ...executableFailure, durationMs: Math.max(0, Date.now() - startedAt) } : {
31370
31383
  code: "notInstalled",
31371
- message: "No supported local DeepSeek Harness executable was found",
31384
+ message: "No local DeepSeek Harness executable was found",
31372
31385
  retryable: false,
31373
31386
  stage: "resolve-executable",
31374
31387
  durationMs: Math.max(0, Date.now() - startedAt)
@@ -14,6 +14,7 @@
14
14
  "cursor-cli",
15
15
  "hermes",
16
16
  "qoder",
17
- "qoder-cn"
17
+ "qoder-cn",
18
+ "kimi-code"
18
19
  ]
19
20
  }