@liberseek/boft-cli-linux-x64 0.8.1 → 0.8.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.
@@ -18842,6 +18842,15 @@ var harnessDisplaySetSchema = external_exports.strictObject({
18842
18842
  initializeOnly: external_exports.boolean().optional()
18843
18843
  });
18844
18844
 
18845
+ // ../../shared-contracts/dist/harness-presentation.js
18846
+ var localeSchema = external_exports.string().max(64).regex(/^[a-z]{2,3}(?:-[A-Za-z0-9]{2,8})*$/u);
18847
+ var displayText = (maximum) => external_exports.string().min(1).max(maximum).refine((text) => text.trim().length > 0);
18848
+ var harnessLocalizationsSchema = external_exports.record(localeSchema, external_exports.object({
18849
+ label: displayText(256).optional(),
18850
+ description: displayText(1024).optional()
18851
+ }).strict()).refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
18852
+ var harnessLocalizedTextSchema = external_exports.record(localeSchema, displayText(4096)).refine((entries) => typeof entries.en === "string", "English fallback is required").refine((entries) => Object.keys(entries).length <= 16, "Too many locales");
18853
+
18845
18854
  // ../../shared-contracts/dist/model-price-overrides.js
18846
18855
  var usdPerMillionTokens = external_exports.number().finite().nonnegative();
18847
18856
  var modelPriceOverrideSchema = external_exports.strictObject({
@@ -19262,8 +19271,24 @@ var threadUsageSnapshotSchema = external_exports.object({
19262
19271
  }
19263
19272
  });
19264
19273
  var usagePercentSchema = external_exports.number().finite().min(0).max(100);
19274
+ var accountCreditsPeriodSchema = external_exports.enum([
19275
+ "weekly",
19276
+ "monthly",
19277
+ "five_hour",
19278
+ "seven_day",
19279
+ "unknown"
19280
+ ]);
19281
+ var accountCreditsScopeSchema = external_exports.object({
19282
+ id: external_exports.string().min(1).max(256),
19283
+ label: external_exports.string().min(1).max(256),
19284
+ localizations: harnessLocalizationsSchema.optional()
19285
+ }).strict();
19265
19286
  var accountCreditsProductUsageSchema = external_exports.object({
19266
19287
  product: external_exports.string().min(1),
19288
+ /** Native period and scope, never inferred from the display name. */
19289
+ periodType: accountCreditsPeriodSchema.optional(),
19290
+ scope: accountCreditsScopeSchema.optional(),
19291
+ localizations: harnessLocalizationsSchema.optional(),
19267
19292
  used: external_exports.number().finite().nonnegative().optional(),
19268
19293
  // Zero is a real empty cap, not an absent field.
19269
19294
  limit: external_exports.number().finite().nonnegative().optional(),
@@ -19285,8 +19310,10 @@ var accountCreditsSnapshotSchema = external_exports.object({
19285
19310
  label: external_exports.string().min(1).optional(),
19286
19311
  usedPercent: usagePercentSchema.optional(),
19287
19312
  remaining: external_exports.number().finite().optional(),
19313
+ scope: accountCreditsScopeSchema.optional(),
19314
+ localizations: harnessLocalizationsSchema.optional(),
19288
19315
  resetsAt: external_exports.string().min(1).optional(),
19289
- periodType: external_exports.enum(["weekly", "monthly", "five_hour", "seven_day", "unknown"]),
19316
+ periodType: accountCreditsPeriodSchema,
19290
19317
  productUsage: external_exports.array(accountCreditsProductUsageSchema).min(1).optional(),
19291
19318
  resetCredits: accountResetCreditsSchema.optional()
19292
19319
  }).strict().superRefine((credits, context) => {
@@ -19311,7 +19338,9 @@ var threadUsageInspectionParamsSchema = external_exports.object({
19311
19338
  var threadUsageInspectionSchema = external_exports.object({
19312
19339
  threadId: hostThreadIdSchema,
19313
19340
  usage: threadUsageSnapshotSchema.nullable(),
19314
- accountCredits: accountCreditsSnapshotSchema.optional()
19341
+ accountCredits: accountCreditsSnapshotSchema.optional(),
19342
+ /** Whether this source can provide cached account quota independently of usage. */
19343
+ accountCreditsSupported: external_exports.boolean().optional()
19315
19344
  }).strict();
19316
19345
 
19317
19346
  // ../../shared-contracts/dist/harness-accounts.js
@@ -19438,7 +19467,8 @@ var harnessPermissionModeSchema = external_exports.object({
19438
19467
  id: harnessPermissionModeIdSchema,
19439
19468
  label: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_LABEL_MAX_LENGTH),
19440
19469
  description: nonBlankTextSchema.max(HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH).optional(),
19441
- dangerous: external_exports.boolean().optional()
19470
+ dangerous: external_exports.boolean().optional(),
19471
+ localizations: harnessLocalizationsSchema.optional()
19442
19472
  }).strict();
19443
19473
  var harnessPermissionModeCatalogSchema = external_exports.object({
19444
19474
  modes: external_exports.array(harnessPermissionModeSchema).min(1).max(HARNESS_PERMISSION_MODE_CATALOG_MAX_LENGTH),
@@ -19761,6 +19791,8 @@ var harnessInstallationStateSchema = external_exports.object({
19761
19791
  // Adapter-owned diagnostic text; UI uses messageCode rather than displaying it verbatim.
19762
19792
  message: external_exports.string().max(2048).optional(),
19763
19793
  messageCode: external_exports.string().min(1).max(128).optional(),
19794
+ /** Safe plugin-owned explanation, distinct from raw diagnostic message. */
19795
+ notice: harnessLocalizedTextSchema.optional(),
19764
19796
  latestVersionKind: external_exports.enum(["unknown", "tracking-branch"]).optional()
19765
19797
  }).strict();
19766
19798
 
@@ -19903,6 +19935,7 @@ var harnessCommandDescriptorSchema = external_exports.object({
19903
19935
  invocation: commandInvocationSchema,
19904
19936
  label: commandLabelSchema,
19905
19937
  description: commandDescriptionSchema.optional(),
19938
+ localizations: harnessLocalizationsSchema.optional(),
19906
19939
  argumentMode: external_exports.enum(["none", "text"]),
19907
19940
  /**
19908
19941
  * Native distinction reported by the Harness. Omitted when the Harness does
@@ -21943,7 +21976,7 @@ function validateV4Event(event) {
21943
21976
  break;
21944
21977
  case "subagent/catalog":
21945
21978
  requiredOptionalKeys(data, ["version", "childId", "childCreatedAt", "mode"], ["label"]);
21946
- if (data.version !== 0 || data.mode !== "one-shot" && data.mode !== "continuable")
21979
+ if (!(data.version === 0 && (data.mode === "one-shot" || data.mode === "continuable") || data.version === 2 && data.mode === "external"))
21947
21980
  throw invalid("subagent catalog");
21948
21981
  identifier(data.childId, "subagent catalog childId");
21949
21982
  nonNegativeInteger2(data.childCreatedAt, "subagent catalog childCreatedAt");
@@ -22248,6 +22281,7 @@ var commandDefinitions = [
22248
22281
  {
22249
22282
  id: "dsh.compact",
22250
22283
  invocation: "/compact",
22284
+ localizations: { "zh-CN": { label: "压缩上下文", description: "压缩当前对话上下文" } },
22251
22285
  label: "Compact context",
22252
22286
  description: "Compact the current conversation context",
22253
22287
  argumentMode: "none"
@@ -22476,14 +22510,16 @@ var MAX_TIMER_MILLISECONDS = 2147483647;
22476
22510
  var NUMERIC_IDENTIFIER = String.raw`(?:0|[1-9]\d*)`;
22477
22511
  var PRERELEASE_IDENTIFIER = String.raw`(?:0|[1-9]\d*|\d*[A-Za-z-][0-9A-Za-z-]*)`;
22478
22512
  var SEMVER_PATTERN = new RegExp(String.raw`^${NUMERIC_IDENTIFIER}\.${NUMERIC_IDENTIFIER}\.${NUMERIC_IDENTIFIER}` + String.raw`(?:-${PRERELEASE_IDENTIFIER}(?:\.${PRERELEASE_IDENTIFIER})*)?` + String.raw`(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$`, "u");
22479
- var DEEPSEEK_NEWEST_VERIFIED_VERSION = "0.2.0-rc.2";
22513
+ var DEEPSEEK_NEWEST_VERIFIED_VERSION = "0.2.1-rc.2";
22480
22514
  var DEEPSEEK_VERIFIED_VERSIONS = [
22481
22515
  "0.1.7-rc.1",
22482
22516
  "0.1.7-rc.2",
22483
22517
  "0.2.0-rc.1",
22518
+ "0.2.0-rc.2",
22519
+ "0.2.1-rc.1",
22484
22520
  DEEPSEEK_NEWEST_VERIFIED_VERSION
22485
22521
  ];
22486
- var DEEPSEEK_UPGRADE_COMMAND = `npm install -g @deepseek-ai/dsh@${DEEPSEEK_NEWEST_VERIFIED_VERSION}`;
22522
+ var DEEPSEEK_UPGRADE_COMMAND = "npm install -g @deepseek-ai/dsh@latest";
22487
22523
  var DEFAULT_DEEPSEEK_ENDPOINT = "http://127.0.0.1:3080/";
22488
22524
  var MODERN_AUTHENTICATION_FINGERPRINT = Buffer.from("dsh web authentication required; reopen the URL printed by dsh web.\n");
22489
22525
  var MODERN_AUTHENTICATION_PROBE_TIMEOUT_MS = 1e3;
@@ -23533,14 +23569,20 @@ var ModernRemoteConnection = class {
23533
23569
  throw this.#protocolFailure(messageOf(error51));
23534
23570
  }
23535
23571
  }
23536
- #managedExit = () => {
23572
+ #managedExit = (exitCode, signal) => {
23537
23573
  if (this.#closing || this.#stoppingChild)
23538
23574
  return;
23539
23575
  const child = this.#child;
23540
23576
  if (child) {
23541
23577
  void this.#stopManagedProcess(child).catch(() => void 0);
23542
23578
  }
23543
- this.#publishFault(new ModernRemoteConnectionError("processExited", "DeepSeek Harness Web exited unexpectedly"));
23579
+ const details = [
23580
+ child?.pid === void 0 ? void 0 : `pid=${String(child.pid)}`,
23581
+ `exitCode=${String(exitCode)}`,
23582
+ `signal=${signal ?? "none"}`,
23583
+ this.#origin ? `endpoint=${this.#origin.origin}` : void 0
23584
+ ].filter((value) => value !== void 0);
23585
+ this.#publishFault(new ModernRemoteConnectionError("processExited", `DeepSeek Harness Web exited unexpectedly (${details.join(", ")})`));
23544
23586
  };
23545
23587
  #managedError = (error51) => {
23546
23588
  if (this.#closing || this.#stoppingChild)
@@ -24970,6 +25012,15 @@ var AUTO_PERMISSION_MODE_ID = "auto";
24970
25012
  var MAX_CATALOG_BYTES2 = 16 * 1024 * 1024;
24971
25013
  var MAX_CATALOG_DEPTH2 = 64;
24972
25014
  var MAX_CATALOG_NODES2 = 2e5;
25015
+ var presetLabels = /* @__PURE__ */ new Map([
25016
+ ["Auto", { en: "Auto", zh: "自动" }],
25017
+ ["read-only", { en: "Read only", zh: "只读" }],
25018
+ ["workspace-write", { en: "Workspace write", zh: "工作区写入" }],
25019
+ ["danger-full-access", { en: "Full access (dangerous)", zh: "完全访问(危险)" }],
25020
+ ["Read only", { en: "Read only", zh: "只读" }],
25021
+ ["Workspace write", { en: "Workspace write", zh: "工作区写入" }],
25022
+ ["Full access (dangerous)", { en: "Full access (dangerous)", zh: "完全访问(危险)" }]
25023
+ ]);
24973
25024
  var ModernPermissionModeError = class extends Error {
24974
25025
  code;
24975
25026
  nativeCode;
@@ -25071,9 +25122,11 @@ function presetOptions(value, area) {
25071
25122
  if (description !== void 0 && (typeof description !== "string" || description.length > HARNESS_PERMISSION_MODE_DESCRIPTION_MAX_LENGTH)) {
25072
25123
  throw permissionError("protocolError", "DeepSeek Harness returned an invalid permission option description");
25073
25124
  }
25125
+ const presentation = presetLabels.get(label);
25074
25126
  return {
25075
25127
  id: id.data,
25076
25128
  label,
25129
+ ...presentation ? { localizations: { en: { label: presentation.en }, "zh-CN": { label: presentation.zh } } } : {},
25077
25130
  ...description?.trim() ? { description } : {}
25078
25131
  };
25079
25132
  });
@@ -27064,6 +27117,8 @@ var KNOWN_EVENT_TYPES = /* @__PURE__ */ new Set([
27064
27117
  "hook/invoked",
27065
27118
  "hook/result",
27066
27119
  "image/offload",
27120
+ "job/registered",
27121
+ "job/settled",
27067
27122
  "llm/retry",
27068
27123
  "llm/retry-started",
27069
27124
  "model/selection",
@@ -27100,6 +27155,7 @@ var KNOWN_EVENT_TYPES = /* @__PURE__ */ new Set([
27100
27155
  "turn/start",
27101
27156
  "user/message",
27102
27157
  "web/deepseek-search-llm-request",
27158
+ "working-directory/change",
27103
27159
  "workspace/changes"
27104
27160
  ]);
27105
27161
  var SURFACE_EVENT_TYPES = /* @__PURE__ */ new Set([
@@ -27273,6 +27329,14 @@ var ModernEventValidator = class {
27273
27329
  return;
27274
27330
  case "workspace/changes":
27275
27331
  return;
27332
+ case "working-directory/change":
27333
+ exactKeys(data, ["cwd"]);
27334
+ requiredString(data.cwd, "working-directory/change cwd");
27335
+ return;
27336
+ case "job/registered":
27337
+ case "job/settled":
27338
+ validateJobLifecycle(event.type, data);
27339
+ return;
27276
27340
  case "agent-preset/selected":
27277
27341
  exactKeys(data, ["agentPreset"]);
27278
27342
  requiredString(data.agentPreset, "agent-preset/selected agentPreset");
@@ -28256,7 +28320,7 @@ function validateSessionTitle(data) {
28256
28320
  }
28257
28321
  }
28258
28322
  function validateSessionTitleRequest(data) {
28259
- exactKeys(data, ["titleProvider", "messageSeqs", "route", "system", "messages", "maxTokens"]);
28323
+ requiredOptionalKeys(data, ["titleProvider", "messageSeqs", "route", "system", "messages", "maxTokens"], ["reasoningEffort"]);
28260
28324
  requiredString(data.titleProvider, "session/title request provider");
28261
28325
  validateSeqArray(data.messageSeqs, "session/title request messageSeqs");
28262
28326
  validateModelRoute(data.route, "session/title request route");
@@ -28270,6 +28334,9 @@ function validateSessionTitleRequest(data) {
28270
28334
  }
28271
28335
  }
28272
28336
  positiveInteger(data.maxTokens, "session/title request maxTokens");
28337
+ if (data.reasoningEffort !== void 0 && !nonBlankString(data.reasoningEffort)) {
28338
+ fail("Modern history session/title request reasoningEffort is invalid");
28339
+ }
28273
28340
  }
28274
28341
  function validateTodoWrite(data) {
28275
28342
  exactKeys(data, ["todos"]);
@@ -28313,12 +28380,47 @@ function validateWorkflow(type, data) {
28313
28380
  requiredString(data.runId, "workflow runId");
28314
28381
  enumValue(data.stopReason, ["completed", "cancelled", "error"], "workflow stopReason");
28315
28382
  }
28383
+ function validateJobLifecycle(type, data) {
28384
+ const settled = type === "job/settled";
28385
+ requiredOptionalKeys(data, [
28386
+ "jobId",
28387
+ "owner",
28388
+ "kind",
28389
+ "label",
28390
+ "startedAt",
28391
+ ...settled ? ["finishedAt", "status", "cause", "producerReported"] : []
28392
+ ], settled ? ["toolCall", "detail"] : ["toolCall"]);
28393
+ requiredString(data.jobId, `${type} jobId`);
28394
+ requiredString(data.owner, `${type} owner`);
28395
+ requiredString(data.kind, `${type} kind`);
28396
+ if (typeof data.label !== "string")
28397
+ fail(`Modern history ${type} label is invalid`);
28398
+ nonNegativeInteger(data.startedAt, `${type} startedAt`);
28399
+ if (data.toolCall !== void 0) {
28400
+ if (!isRecord4(data.toolCall))
28401
+ fail(`Modern history ${type} toolCall is malformed`);
28402
+ exactKeys(data.toolCall, ["callId", "rootCallId"]);
28403
+ requiredString(data.toolCall.callId, `${type} toolCall callId`);
28404
+ requiredString(data.toolCall.rootCallId, `${type} toolCall rootCallId`);
28405
+ }
28406
+ if (!settled)
28407
+ return;
28408
+ nonNegativeInteger(data.finishedAt, "job/settled finishedAt");
28409
+ enumValue(data.status, ["completed", "killed", "failed"], "job/settled status");
28410
+ enumValue(data.cause, ["producer", "kill", "teardown"], "job/settled cause");
28411
+ if (typeof data.producerReported !== "boolean") {
28412
+ fail("Modern history job/settled producerReported is invalid");
28413
+ }
28414
+ if (data.detail !== void 0 && typeof data.detail !== "string") {
28415
+ fail("Modern history job/settled detail is invalid");
28416
+ }
28417
+ }
28316
28418
  function validatePtcDispatch(type, data, profile) {
28317
28419
  const settle = type === "tool/ptc-dispatch";
28318
28420
  const required2 = ["rootCallId", "parentCallId", "subCallId", "name", "arguments"];
28319
28421
  if (settle)
28320
28422
  required2.push("isError", "content");
28321
- requiredOptionalKeys(data, required2, settle ? ["error"] : []);
28423
+ requiredOptionalKeys(data, required2, settle ? ["error", "meta"] : []);
28322
28424
  for (const key of ["rootCallId", "parentCallId", "subCallId", "name"]) {
28323
28425
  requiredString(data[key], `tool/ptc-dispatch ${key}`);
28324
28426
  }
@@ -28467,12 +28569,20 @@ function validateSearchRequest(data) {
28467
28569
  requiredString(data.apiVersion, "search request apiVersion");
28468
28570
  if (!isRecord4(data.body))
28469
28571
  fail("Modern history search request body is malformed");
28470
- requiredOptionalKeys(data.body, ["model", "max_tokens", "messages", "tools"], []);
28572
+ requiredOptionalKeys(data.body, ["model", "max_tokens", "messages", "tools"], ["thinking"]);
28471
28573
  requiredString(data.body.model, "search request model");
28472
28574
  positiveInteger(data.body.max_tokens, "search request max_tokens");
28473
28575
  if (!Array.isArray(data.body.messages) || !Array.isArray(data.body.tools)) {
28474
28576
  fail("Modern history search request arrays are malformed");
28475
28577
  }
28578
+ if (data.body.thinking !== void 0) {
28579
+ const { thinking } = data.body;
28580
+ if (!isRecord4(thinking))
28581
+ fail("Modern history search request thinking is malformed");
28582
+ exactKeys(thinking, ["type"]);
28583
+ if (thinking.type !== "disabled")
28584
+ fail("Modern history search request thinking is invalid");
28585
+ }
28476
28586
  }
28477
28587
  function validateModelRoute(value, label) {
28478
28588
  if (!isRecord4(value))
@@ -31144,7 +31254,8 @@ function titleFromProjections(value) {
31144
31254
  return typeof title === "string" && title.trim().length > 0 && title.length <= DEEPSEEK_MODERN_SESSION_TITLE_MAX_LENGTH && !title.includes("\0") ? title : null;
31145
31255
  }
31146
31256
  function parseSummary(value) {
31147
- if (!isPlainRecord7(value) || !exactKeys5(value, ["sessionId", "updatedAt", "agentAvailable", "running", "blank"], ["parentSessionId", "origin", "cwd", "projections"]) || typeof value.running !== "boolean" || typeof value.blank !== "boolean" || typeof value.agentAvailable !== "boolean" || !validUpdatedAt(value.updatedAt)) {
31257
+ if (!isPlainRecord7(value) || !exactKeys5(value, ["sessionId", "updatedAt", "agentAvailable", "running", "blank"], ["parentSessionId", "origin", "cwd", "projections", "formatStatus"]) || // DSH 0.2.1 marks rows whose stored log still awaits migration on open.
31258
+ value.formatStatus !== void 0 && value.formatStatus !== "current" && value.formatStatus !== "migration-required" || typeof value.running !== "boolean" || typeof value.blank !== "boolean" || typeof value.agentAvailable !== "boolean" || !validUpdatedAt(value.updatedAt)) {
31148
31259
  throw sessionListError("protocolError", "DeepSeek Harness returned an invalid Session row");
31149
31260
  }
31150
31261
  const sessionId = boundedId(value.sessionId, "Session id");
@@ -32210,8 +32321,22 @@ var DeepSeekHarnessAdapter = class {
32210
32321
  async inspect(input = {}) {
32211
32322
  if (this.#closed)
32212
32323
  return { status: "unavailable", error: closedError2() };
32213
- if (this.#delegate)
32214
- return this.#delegate.adapter.inspect(input);
32324
+ if (this.#delegate) {
32325
+ const selected = this.#delegate;
32326
+ const inspection = await selected.adapter.inspect(input);
32327
+ if (!shouldRecoverDelegate(inspection))
32328
+ return inspection;
32329
+ await this.#retireFaultedDelegate(selected);
32330
+ try {
32331
+ return (await this.#select(true)).inspection;
32332
+ } catch (error51) {
32333
+ const failure = this.#selectionError(error51);
32334
+ return {
32335
+ status: failure.code === "notInstalled" ? "notInstalled" : "unavailable",
32336
+ error: failure
32337
+ };
32338
+ }
32339
+ }
32215
32340
  try {
32216
32341
  return (await this.#select(input.refresh === true)).inspection;
32217
32342
  } catch (error51) {
@@ -32227,7 +32352,12 @@ var DeepSeekHarnessAdapter = class {
32227
32352
  const selected = await this.#select(false);
32228
32353
  if (this.#closed)
32229
32354
  return { ok: false, error: closedError2() };
32230
- return selected.adapter.open(input);
32355
+ const opened = await selected.adapter.open(input);
32356
+ if (opened.ok || !shouldRecoverDelegate(opened))
32357
+ return opened;
32358
+ await this.#retireFaultedDelegate(selected);
32359
+ const replacement = await this.#select(true);
32360
+ return replacement.adapter.open(input);
32231
32361
  } catch (error51) {
32232
32362
  return { ok: false, error: this.#selectionError(error51) };
32233
32363
  }
@@ -32241,23 +32371,48 @@ var DeepSeekHarnessAdapter = class {
32241
32371
  const selected = await this.#select(false);
32242
32372
  if (this.#closed)
32243
32373
  return { ok: false, error: closedError2() };
32244
- return selected.adapter.sessionImport.listCandidates();
32374
+ const listed = await selected.adapter.sessionImport.listCandidates();
32375
+ if (listed.ok || !shouldRecoverDelegate(listed))
32376
+ return listed;
32377
+ await this.#retireFaultedDelegate(selected);
32378
+ const replacement = await this.#select(true);
32379
+ return replacement.adapter.sessionImport.listCandidates();
32245
32380
  } catch (error51) {
32246
32381
  return { ok: false, error: this.#selectionError(error51) };
32247
32382
  }
32248
32383
  }
32249
- #openWebUi() {
32384
+ async #openWebUi() {
32250
32385
  if (this.#closed)
32251
- return Promise.resolve({ ok: false, error: closedError2() });
32252
- const webUi = this.#delegate?.adapter.webUi;
32253
- return webUi ? webUi.open() : Promise.resolve({
32254
- ok: false,
32255
- error: {
32256
- code: "unsupported",
32257
- message: "DeepSeek Harness Web is not managed by this codexhost instance",
32258
- retryable: false
32386
+ return { ok: false, error: closedError2() };
32387
+ try {
32388
+ const selected = this.#delegate;
32389
+ const webUi = selected?.adapter.webUi;
32390
+ if (!selected || !webUi) {
32391
+ return {
32392
+ ok: false,
32393
+ error: {
32394
+ code: "unsupported",
32395
+ message: "DeepSeek Harness Web is not managed by this codexhost instance",
32396
+ retryable: false
32397
+ }
32398
+ };
32259
32399
  }
32260
- });
32400
+ const opened = await webUi.open();
32401
+ if (opened.ok || !shouldRecoverDelegate(opened))
32402
+ return opened;
32403
+ await this.#retireFaultedDelegate(selected);
32404
+ const replacement = await this.#select(true);
32405
+ return replacement.adapter.webUi ? replacement.adapter.webUi.open() : {
32406
+ ok: false,
32407
+ error: {
32408
+ code: "unsupported",
32409
+ message: "DeepSeek Harness Web is not managed by this codexhost instance",
32410
+ retryable: false
32411
+ }
32412
+ };
32413
+ } catch (error51) {
32414
+ return { ok: false, error: this.#selectionError(error51) };
32415
+ }
32261
32416
  }
32262
32417
  #select(refresh) {
32263
32418
  if (this.#closed)
@@ -32419,6 +32574,15 @@ var DeepSeekHarnessAdapter = class {
32419
32574
  owner.closePromise ??= owner.adapter.close();
32420
32575
  return owner.closePromise;
32421
32576
  }
32577
+ async #retireFaultedDelegate(owner) {
32578
+ if (this.#delegate !== owner)
32579
+ return;
32580
+ await this.#closeOwner(owner);
32581
+ if (this.#delegate === owner) {
32582
+ this.#delegate = void 0;
32583
+ this.#failure = void 0;
32584
+ }
32585
+ }
32422
32586
  async #closeFailedCandidate(owner) {
32423
32587
  try {
32424
32588
  await this.#closeOwner(owner);
@@ -32539,6 +32703,10 @@ function closedError2() {
32539
32703
  retryable: false
32540
32704
  };
32541
32705
  }
32706
+ function shouldRecoverDelegate(result) {
32707
+ const error51 = "ok" in result ? result.ok ? void 0 : result.error : result.status === "ready" ? void 0 : result.error;
32708
+ return error51?.code === "processExited" && error51.retryable;
32709
+ }
32542
32710
 
32543
32711
  // dist/installation.js
32544
32712
  function createDeepSeekInstallation(environment, command) {
@@ -32569,6 +32737,10 @@ function createDeepSeekInstallation(environment, command) {
32569
32737
  canUpdate,
32570
32738
  ...!canUpdate ? {
32571
32739
  messageCode: "deepseek-original-installer",
32740
+ notice: {
32741
+ en: "Update with the original installer. Python, desktop, and project-local installations are not upgraded through global npm.",
32742
+ "zh-CN": "请使用原安装方式更新。Python、桌面应用及项目内安装不会通过全局 npm 更新。"
32743
+ },
32572
32744
  message: "Update with the original installer. Python, desktop, and project-local installations are not upgraded through global npm."
32573
32745
  } : {}
32574
32746
  };