@michengai/dsh-codex-ui 0.2.64 → 0.2.66

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.
package/README.md CHANGED
@@ -69,6 +69,17 @@ Conversation menu: rename, pin, unread, archive, fork, copy, and delete.
69
69
 
70
70
  Do not install the suite and the individual plugins in the same profile. The two patch sets conflict.
71
71
 
72
+ ## DSH product ecosystem
73
+
74
+ Codex UI can be installed independently or used through the desktop app or Web suite. They share the same DSH core but serve different ways of working:
75
+
76
+ | Product | Relationship to Codex UI |
77
+ | --- | --- |
78
+ | [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) | The host runtime that provides models, sessions, tools, and the plugin system |
79
+ | [DSH Codex Desktop](https://github.com/MichengAI/dsh-codex-desktop) | A ready-to-install desktop product with Codex UI and the other five feature products built in |
80
+ | [DSH Codex Suite](https://github.com/MichengAI/dsh-codex-ui/tree/main/packages/dsh-codex-suite) | A one-click suite for existing DSH Web environments that installs Codex UI and the other five feature products |
81
+ | Six feature products | [Codex UI](https://github.com/MichengAI/dsh-codex-ui) · [IM Connect](https://github.com/MichengAI/dsh-im-connect) · [Automation](https://github.com/MichengAI/dsh-automation) · [Skills Manager](https://github.com/MichengAI/dsh-skills-manager) · [Archive Manager](https://github.com/MichengAI/dsh-archive-manager) · [Agency Agents](https://github.com/MichengAI/dsh-agency-agents) |
82
+
72
83
  ## Installation
73
84
 
74
85
  `dsh plugin add` forwards to `pnpm add` in the profile directory. Without a version and official registry, a local mirror or minimum-release-age policy can leave you on an older build.
package/README.zh-CN.md CHANGED
@@ -69,6 +69,17 @@
69
69
 
70
70
  套件安装和单独安装互斥。同一 profile 不要同时安装两者,两套 patch 会冲突。
71
71
 
72
+ ## DSH 产品生态
73
+
74
+ Codex UI 既可以独立安装,也可以随桌面端或 Web 套件一起使用。它们共享同一个 DSH 核心,但面向不同的使用方式:
75
+
76
+ | 产品 | 与 Codex UI 的关系 |
77
+ | --- | --- |
78
+ | [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) | Codex UI 的运行宿主,提供模型、会话、工具和插件系统 |
79
+ | [DSH Codex Desktop](https://github.com/MichengAI/dsh-codex-desktop) | 下载安装即用的桌面产品,已内置 Codex UI 和其他 5 个功能产品 |
80
+ | [DSH Codex Suite](https://github.com/MichengAI/dsh-codex-ui/tree/main/packages/dsh-codex-suite) | 面向已有 DSH Web 环境的一键套件,会安装 Codex UI 和其他 5 个功能产品 |
81
+ | 6 个功能产品 | [Codex UI](https://github.com/MichengAI/dsh-codex-ui) · [IM Connect](https://github.com/MichengAI/dsh-im-connect) · [Automation](https://github.com/MichengAI/dsh-automation) · [Skills Manager](https://github.com/MichengAI/dsh-skills-manager) · [Archive Manager](https://github.com/MichengAI/dsh-archive-manager) · [Agency Agents](https://github.com/MichengAI/dsh-agency-agents) |
82
+
72
83
  ## 安装
73
84
 
74
85
  `dsh plugin add` 会转发到 profile 目录里的 `pnpm add`。不写版本、不指定官方源时,本机镜像和最短发布间隔可能让你停在旧版。
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { spawn } from "node:child_process";
2
2
  import { readFile, writeFile } from "node:fs/promises";
3
3
  import { homedir } from "node:os";
4
- import { resolve } from "node:path";
4
+ import { resolve, sep } from "node:path";
5
5
  import { fileURLToPath } from "node:url";
6
6
  //#region src/dependencies.ts
7
7
  const SUITE_PACKAGE = "@michengai/dsh-codex-suite";
@@ -83,9 +83,30 @@ function resolveDshPluginTarget(installing, _declared = []) {
83
83
  function isOfficialRuntimePackage(packageName) {
84
84
  return packageName === "@deepseek-ai/dsh" || packageName.startsWith("@deepseek-ai/dsh-");
85
85
  }
86
+ /** 从全局 npm 安装的 dsh CLI 入口反推出包含 node_modules 的运行时目录;源码启动不匹配该目录结构。 */
87
+ function resolveDshRuntimeRoot(entry = process.argv[1], cwd = process.cwd()) {
88
+ if (entry === void 0 || entry === "") return void 0;
89
+ const cliEntry = resolveDshCliEntry(entry, cwd);
90
+ const marker = [
91
+ "node_modules",
92
+ "@deepseek-ai",
93
+ "dsh"
94
+ ].join(sep);
95
+ const index = cliEntry.toLowerCase().lastIndexOf(marker.toLowerCase());
96
+ if (index === -1) return void 0;
97
+ const end = index + marker.length;
98
+ if (end !== cliEntry.length && cliEntry[end] !== sep) return void 0;
99
+ const root = cliEntry.slice(0, index);
100
+ return root.endsWith(sep) ? root.slice(0, -1) : root;
101
+ }
86
102
  function packageLookupRoots(packageName) {
87
- if (isOfficialRuntimePackage(packageName) && process.env.DSH_RUNTIME_DIR !== void 0 && process.env.DSH_RUNTIME_DIR !== "") return [process.env.DSH_RUNTIME_DIR, profileDirectory()];
88
- return [profileDirectory()];
103
+ if (!isOfficialRuntimePackage(packageName)) return [profileDirectory()];
104
+ const runtimeDir = process.env.DSH_RUNTIME_DIR;
105
+ return [...new Set([
106
+ runtimeDir,
107
+ resolveDshRuntimeRoot(),
108
+ profileDirectory()
109
+ ].filter((root) => root !== void 0 && root !== ""))];
89
110
  }
90
111
  async function installedPackageVersion(packageName) {
91
112
  for (const root of packageLookupRoots(packageName)) try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@michengai/dsh-codex-ui",
3
- "version": "0.2.64",
3
+ "version": "0.2.66",
4
4
  "description": "以 Codex 风格重构 DSH Web 侧栏的独立客户端插件",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {