@machina.ai/cell-harness 0.1.5-alpha.1.c2 → 0.2.0-rc2.c1
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 +11 -0
- package/README.zh.md +11 -0
- package/config/cell-harness.cordis.patch.yml +19 -0
- package/lib/bin.js +1 -1
- package/lib/index.js +2 -2
- package/lib/{launcher-L7O6YMd1.js → launcher-aPsfwypr.js} +406 -3
- package/lib/profile-boot.js +79 -130
- package/package.json +102 -84
- package/presets/cell-harness/agent.cordis.yml +0 -48
- package/presets/cell-harness/preset.yml +0 -3
package/README.md
CHANGED
|
@@ -18,3 +18,14 @@ From the repository root, `pnpm cell-harness <args...>` (or `pnpm ch <args...>`)
|
|
|
18
18
|
Both planes are covered by `apps/cell-harness/tests/launcher.spec.ts`, and a built binary that is missing `lib/profile-boot.js` fails with the rebuild command instead of importing TypeScript.
|
|
19
19
|
|
|
20
20
|
The `web` profile overwrites the built `@deepseek-ai/dsh-web-frontend` favicon, HTML title, and PWA manifest name at boot (`src/web-branding.ts`): the favicon becomes the Nova Solutions Systems mark, and both the tab title and the `manifest.webmanifest` `name`/`short_name` (the PWA window title `web-runtime`'s `openBrowser` uses for its `display: "fullscreen"` window) become "Cell". This patches the built `dist/favicon.svg`, `dist/index.html`, and `dist/manifest.webmanifest` artifacts only; the upstream package's source tree (`apps/web/public/favicon.svg`, `apps/web/public/manifest.webmanifest`, `apps/web/index.html`, `apps/web/vite.config.ts`) is never touched.
|
|
21
|
+
|
|
22
|
+
## Upstream Plugins and Intentional Exclusions (ADR Alignment)
|
|
23
|
+
|
|
24
|
+
All standard upstream plugins, tool implementations, and preset dependencies from `@deepseek-ai/dsh-*` (such as `@deepseek-ai/dsh-tool-present`, `@deepseek-ai/dsh-agent-presets`, LSP tools, terminal tools, and session query tools) are declared in `package.json` so that upstream agent presets (`standard`, `ptc`, `cordis`, `minimal`) resolve cleanly without missing dependency errors.
|
|
25
|
+
|
|
26
|
+
Selected upstream plugins are intentionally disabled in `apps/cell-harness/config/cell-harness.cordis.patch.yml` per established ADRs to preserve Cell Harness architecture:
|
|
27
|
+
|
|
28
|
+
1. **`@deepseek-ai/dsh-client-ui-brand-official`** (`ui-brand-official`): Disabled via `disabled: true`. Replaced by `@machina.ai/ch-client-ui-brand-nova` to display Nova Solutions Systems / Cell Harness branding. Single slots (`sidebar.brand.mark`, `sidebar.brand.name`, `conversation.hero.brand.mark`) reject duplicate registrations; disabling the official occupant ensures Nova branding is the sole occupant. *(ADR: `conductor/tracks/cell_harness_rebrand_20260908/spec.md`)*.
|
|
29
|
+
2. **`@deepseek-ai/dsh-llm-deepseek`** (`llm-deepseek`): Disabled via `disabled: true`. Replaced by `@machina.ai/ch-llm-reboot` to provide Reboot Zero-API-Key multi-model routing across Gemini, Anthropic, OpenAI, and xAI families. *(ADR: `conductor/tracks/reboot_llm_20260908/spec.md`)*.
|
|
30
|
+
3. **`@deepseek-ai/dsh-client-ui-settings-models`** (`ui-settings-models`): Disabled via `disabled: true`. Replaced by `@machina.ai/ch-client-ui-settings-cell-models` to render the Cell Models configuration panel and local provider routing instead of DeepSeek official onboarding. *(ADR: `conductor/tracks/model_settings_20260912/spec.md`)*.
|
|
31
|
+
4. **`@deepseek-ai/dsh-web-search-deepseek`** (`web-search-deepseek`): Disabled via `disabled: true`. Replaced by `@machina.ai/ch-web-search-gemini` (Gemini Search Grounding through Reboot AI Gateway). *(ADR: `conductor/tracks/web_search_gemini_20260913/spec.md`)*.
|
package/README.zh.md
CHANGED
|
@@ -18,3 +18,14 @@ Nova Solutions 出品的 Cell Harness CLI 可执行程序。
|
|
|
18
18
|
源码平面与产物平面都由 `apps/cell-harness/tests/launcher.spec.ts` 覆盖;构建产物若缺少 `lib/profile-boot.js`,会直接失败并给出重新构建命令,而不是去导入 TypeScript。
|
|
19
19
|
|
|
20
20
|
`web` profile 会在启动时覆盖已构建的 `@deepseek-ai/dsh-web-frontend` favicon、HTML 标题与 PWA manifest 名称(`src/web-branding.ts`):favicon 变为 Nova Solutions Systems 标记,标签页标题与 `manifest.webmanifest` 的 `name`/`short_name`(即 `web-runtime` 的 `openBrowser` 为其 `display: "fullscreen"` 窗口所使用的 PWA 窗口标题)都变为 "Cell"。这只修补构建后的 `dist/favicon.svg`、`dist/index.html` 与 `dist/manifest.webmanifest` 产物;上游包的源码树(`apps/web/public/favicon.svg`、`apps/web/public/manifest.webmanifest`、`apps/web/index.html`、`apps/web/vite.config.ts`)绝不被触碰。
|
|
21
|
+
|
|
22
|
+
## 上游插件与有意排除说明(ADR 对齐)
|
|
23
|
+
|
|
24
|
+
所有来自 `@deepseek-ai/dsh-*` 的标准上游插件、工具实现与 preset 依赖(例如 `@deepseek-ai/dsh-tool-present`、`@deepseek-ai/dsh-agent-presets`、LSP 工具、terminal 工具和 session query 工具)均在 `package.json` 中声明,确保上游 agent preset(`standard`、`ptc`、`cordis`、`minimal`)能够正常解析,避免缺失依赖错误。
|
|
25
|
+
|
|
26
|
+
根据已确立的 ADR,以下选定的上游插件在 `apps/cell-harness/config/cell-harness.cordis.patch.yml` 中通过 `disabled: true` 被显式禁用,以保持 Cell Harness 架构特性:
|
|
27
|
+
|
|
28
|
+
1. **`@deepseek-ai/dsh-client-ui-brand-official`** (`ui-brand-official`): 禁用。由 `@machina.ai/ch-client-ui-brand-nova` 替代以展示 Nova Solutions Systems / Cell Harness 品牌。单占位插槽(`sidebar.brand.mark`、`sidebar.brand.name`、`conversation.hero.brand.mark`)拒绝重复注册;禁用官方占位确保 Nova 品牌为唯一挂载。*(ADR: `conductor/tracks/cell_harness_rebrand_20260908/spec.md`)*。
|
|
29
|
+
2. **`@deepseek-ai/dsh-llm-deepseek`** (`llm-deepseek`): 禁用。由 `@machina.ai/ch-llm-reboot` 替代,提供跨 Gemini、Anthropic、OpenAI 与 xAI 系列的免 API Key 多模型路由。*(ADR: `conductor/tracks/reboot_llm_20260908/spec.md`)*。
|
|
30
|
+
3. **`@deepseek-ai/dsh-client-ui-settings-models`** (`ui-settings-models`): 禁用。由 `@machina.ai/ch-client-ui-settings-cell-models` 替代,展示 Cell 模型设置面板而非 DeepSeek 官方接入引导。*(ADR: `conductor/tracks/model_settings_20260912/spec.md`)*。
|
|
31
|
+
4. **`@deepseek-ai/dsh-web-search-deepseek`** (`web-search-deepseek`): 禁用。由 `@machina.ai/ch-web-search-gemini`(通过 Reboot AI Gateway 的 Gemini 搜索落地)替代。*(ADR: `conductor/tracks/web_search_gemini_20260913/spec.md`)*.
|
|
@@ -71,3 +71,22 @@
|
|
|
71
71
|
# the DeepSeek official-key welcome/onboarding modal from the Cell Harness UX.
|
|
72
72
|
- id: llm-deepseek
|
|
73
73
|
disabled: true
|
|
74
|
+
|
|
75
|
+
# ui-brand-official is disabled explicitly: the upstream profile bundle
|
|
76
|
+
# (packages/bundle/web-app/cordis.patch.yml) inserts ui-brand-official, and the
|
|
77
|
+
# CLI overlay mounts ui-brand-nova. Because slots like sidebar.brand.mark and
|
|
78
|
+
# sidebar.brand.name are single slots, having both plugins active causes collision
|
|
79
|
+
# errors or displays the upstream DeepSeek branding. Disabling ui-brand-official
|
|
80
|
+
# ensures client-ui-brand-nova is the only brand plugin mounted.
|
|
81
|
+
- id: ui-brand-official
|
|
82
|
+
disabled: true
|
|
83
|
+
|
|
84
|
+
# DeepSeek session telemetry is disabled: prevents sending session records,
|
|
85
|
+
# feedback, or telemetry logs to upstream DeepSeek or third-party endpoints.
|
|
86
|
+
- id: session-telemetry-otel
|
|
87
|
+
disabled: true
|
|
88
|
+
|
|
89
|
+
# Agent presets: defaults to standard coding preset
|
|
90
|
+
- id: agent-presets
|
|
91
|
+
config:
|
|
92
|
+
default: standard
|
package/lib/bin.js
CHANGED
package/lib/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { CELL_HARNESS_PATCH, PROFILE_BOOT_ARTIFACT_URL, PROFILE_BOOT_SOURCE_URL, ensureAuthenticatedSession, ensureCellHarnessDshHome, findEAddrInUseError, getBrandBanner, installConsoleRebrand, parseCellHarnessArgs, resolveCellHarnessDshHome, resolveCellHarnessSessionPath, resolveProfileBootUrl, runCellHarnessCli };
|
|
1
|
+
import { a as ensureAuthenticatedSession, c as findEAddrInUseError, d as parseCellHarnessArgs, f as resolveCellHarnessDshHome, h as runCellHarnessCli, i as PROFILE_BOOT_SOURCE_URL, l as getBrandBanner, m as resolveProfileBootUrl, n as CELL_HARNESS_VERSION, o as ensureCellHarnessDshHome, p as resolveCellHarnessSessionPath, r as PROFILE_BOOT_ARTIFACT_URL, s as ensureCellHarnessTelemetryDisabled, t as CELL_HARNESS_PATCH, u as installConsoleRebrand } from "./launcher-aPsfwypr.js";
|
|
2
|
+
export { CELL_HARNESS_PATCH, CELL_HARNESS_VERSION, PROFILE_BOOT_ARTIFACT_URL, PROFILE_BOOT_SOURCE_URL, ensureAuthenticatedSession, ensureCellHarnessDshHome, ensureCellHarnessTelemetryDisabled, findEAddrInUseError, getBrandBanner, installConsoleRebrand, parseCellHarnessArgs, resolveCellHarnessDshHome, resolveCellHarnessSessionPath, resolveProfileBootUrl, runCellHarnessCli };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
2
3
|
import { homedir } from "node:os";
|
|
3
4
|
import { dirname, join, resolve } from "node:path";
|
|
4
5
|
import { fileURLToPath } from "node:url";
|
|
@@ -6,6 +7,7 @@ import { Context } from "@deepseek-ai/cordis";
|
|
|
6
7
|
import { loadLayeredEnv } from "@deepseek-ai/dsh-app-boot";
|
|
7
8
|
import { DSH_HOME_ENV } from "@deepseek-ai/dsh-home-paths";
|
|
8
9
|
import { RebootAuthService, RebootSessionStore, decodeJwtPayload, ensureCellHarnessConfigFile, loadCellHarnessConfig, loadCellHarnessConfigSync } from "@machina.ai/ch-auth-reboot-sso";
|
|
10
|
+
import { spawn } from "node:child_process";
|
|
9
11
|
//#region lib/types/web-branding.js
|
|
10
12
|
/**
|
|
11
13
|
* Best-effort browser-tab / PWA-window branding overlay for Cell Harness's own
|
|
@@ -143,6 +145,375 @@ function ensureCellHarnessWebBranding(resolve) {
|
|
|
143
145
|
ensureCellHarnessWebManifestName(resolve);
|
|
144
146
|
}
|
|
145
147
|
//#endregion
|
|
148
|
+
//#region lib/types/updater.js
|
|
149
|
+
/**
|
|
150
|
+
* Default npm package name for the Cell Harness CLI.
|
|
151
|
+
*/
|
|
152
|
+
const CELL_HARNESS_PACKAGE_NAME = "@machina.ai/cell-harness";
|
|
153
|
+
/**
|
|
154
|
+
* 1 hour throttle interval between npm registry version checks.
|
|
155
|
+
*/
|
|
156
|
+
const DEFAULT_CHECK_INTERVAL_MS = 3600 * 1e3;
|
|
157
|
+
const DEFAULT_STATE = {
|
|
158
|
+
lastCheckTimestamp: 0,
|
|
159
|
+
installedVersion: "",
|
|
160
|
+
latestVersion: null,
|
|
161
|
+
status: "idle",
|
|
162
|
+
lastError: null,
|
|
163
|
+
notifiedVersion: null
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* Manages reading, writing, and validating the CLI update state file ($DSH_HOME/.update-state.json).
|
|
167
|
+
*/
|
|
168
|
+
var UpdateStateStore = class {
|
|
169
|
+
homeDir;
|
|
170
|
+
stateFilePath;
|
|
171
|
+
constructor(homeDir) {
|
|
172
|
+
this.homeDir = homeDir;
|
|
173
|
+
this.stateFilePath = join(homeDir, ".update-state.json");
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Reads the current update state. If missing or corrupted, returns a clean default state.
|
|
177
|
+
*/
|
|
178
|
+
read() {
|
|
179
|
+
try {
|
|
180
|
+
if (!existsSync(this.stateFilePath)) return { ...DEFAULT_STATE };
|
|
181
|
+
const raw = readFileSync(this.stateFilePath, "utf-8");
|
|
182
|
+
const parsed = JSON.parse(raw);
|
|
183
|
+
return {
|
|
184
|
+
lastCheckTimestamp: typeof parsed.lastCheckTimestamp === "number" ? parsed.lastCheckTimestamp : 0,
|
|
185
|
+
installedVersion: typeof parsed.installedVersion === "string" ? parsed.installedVersion : "",
|
|
186
|
+
latestVersion: typeof parsed.latestVersion === "string" ? parsed.latestVersion : null,
|
|
187
|
+
status: parsed.status === "updating" || parsed.status === "completed" || parsed.status === "failed" ? parsed.status : "idle",
|
|
188
|
+
lastError: parsed.lastError && typeof parsed.lastError.message === "string" ? {
|
|
189
|
+
message: parsed.lastError.message,
|
|
190
|
+
timestamp: typeof parsed.lastError.timestamp === "number" ? parsed.lastError.timestamp : 0
|
|
191
|
+
} : null,
|
|
192
|
+
notifiedVersion: typeof parsed.notifiedVersion === "string" ? parsed.notifiedVersion : null
|
|
193
|
+
};
|
|
194
|
+
} catch {
|
|
195
|
+
return { ...DEFAULT_STATE };
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Persists the update state safely to disk.
|
|
200
|
+
*/
|
|
201
|
+
write(state) {
|
|
202
|
+
try {
|
|
203
|
+
const dir = dirname(this.stateFilePath);
|
|
204
|
+
if (!existsSync(dir)) mkdirSync(dir, { recursive: true });
|
|
205
|
+
writeFileSync(this.stateFilePath, JSON.stringify(state, null, 2), "utf-8");
|
|
206
|
+
} catch {}
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Determines whether an update check should be performed given the current timestamp.
|
|
210
|
+
* Throttles checks to 1 hour, enforces a 1 hour cooldown on failures, and avoids concurrent runs.
|
|
211
|
+
*/
|
|
212
|
+
shouldCheck(now = Date.now()) {
|
|
213
|
+
const state = this.read();
|
|
214
|
+
if (state.status === "updating") return false;
|
|
215
|
+
if (state.lastError && now - state.lastError.timestamp < 36e5) return false;
|
|
216
|
+
return now - state.lastCheckTimestamp >= DEFAULT_CHECK_INTERVAL_MS;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Returns true if a newly completed update has not yet been acknowledged / surfaced to the user.
|
|
220
|
+
*/
|
|
221
|
+
shouldNotify(currentOrNewVersion) {
|
|
222
|
+
const state = this.read();
|
|
223
|
+
return state.status === "completed" && state.latestVersion === currentOrNewVersion && state.notifiedVersion !== currentOrNewVersion;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Acknowledges that the user has seen the update notification for this version.
|
|
227
|
+
*/
|
|
228
|
+
acknowledgeNotification(version) {
|
|
229
|
+
const state = this.read();
|
|
230
|
+
this.write({
|
|
231
|
+
...state,
|
|
232
|
+
notifiedVersion: version
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
/**
|
|
237
|
+
* Parses and breaks a semver string into numeric and prerelease components.
|
|
238
|
+
*/
|
|
239
|
+
function parseSemver(v) {
|
|
240
|
+
if (!v || typeof v !== "string") return null;
|
|
241
|
+
const match = v.trim().replace(/^v/, "").match(/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);
|
|
242
|
+
if (!match) return null;
|
|
243
|
+
const majorStr = match[1];
|
|
244
|
+
const minorStr = match[2];
|
|
245
|
+
const patchStr = match[3];
|
|
246
|
+
if (majorStr === void 0 || minorStr === void 0 || patchStr === void 0) return null;
|
|
247
|
+
const major = parseInt(majorStr, 10);
|
|
248
|
+
const minor = parseInt(minorStr, 10);
|
|
249
|
+
const patch = parseInt(patchStr, 10);
|
|
250
|
+
const prereleaseStr = match[4];
|
|
251
|
+
return {
|
|
252
|
+
major,
|
|
253
|
+
minor,
|
|
254
|
+
patch,
|
|
255
|
+
prerelease: prereleaseStr ? prereleaseStr.split(".").map((part) => {
|
|
256
|
+
const num = parseInt(part, 10);
|
|
257
|
+
return isNaN(num) ? part : num;
|
|
258
|
+
}) : []
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Compares two versions. Returns true if candidateVersion > currentVersion.
|
|
263
|
+
*/
|
|
264
|
+
function isNewerVersion(currentVersion, candidateVersion) {
|
|
265
|
+
if (!currentVersion || !currentVersion.trim()) return Boolean(candidateVersion && candidateVersion.trim());
|
|
266
|
+
const current = parseSemver(currentVersion);
|
|
267
|
+
const candidate = parseSemver(candidateVersion);
|
|
268
|
+
if (!current || !candidate) return false;
|
|
269
|
+
if (candidate.major !== current.major) return candidate.major > current.major;
|
|
270
|
+
if (candidate.minor !== current.minor) return candidate.minor > current.minor;
|
|
271
|
+
if (candidate.patch !== current.patch) return candidate.patch > current.patch;
|
|
272
|
+
if (current.prerelease.length === 0 && candidate.prerelease.length > 0) return false;
|
|
273
|
+
if (current.prerelease.length > 0 && candidate.prerelease.length === 0) return true;
|
|
274
|
+
const maxLen = Math.max(current.prerelease.length, candidate.prerelease.length);
|
|
275
|
+
for (let i = 0; i < maxLen; i++) {
|
|
276
|
+
const p1 = current.prerelease[i];
|
|
277
|
+
const p2 = candidate.prerelease[i];
|
|
278
|
+
if (p1 === void 0) return true;
|
|
279
|
+
if (p2 === void 0) return false;
|
|
280
|
+
if (p1 === p2) continue;
|
|
281
|
+
const t1 = typeof p1;
|
|
282
|
+
const t2 = typeof p2;
|
|
283
|
+
if (t1 === "number" && t2 === "number") return p2 > p1;
|
|
284
|
+
if (t1 === "number" && t2 === "string") return false;
|
|
285
|
+
if (t1 === "string" && t2 === "number") return true;
|
|
286
|
+
return String(p2).localeCompare(String(p1)) > 0;
|
|
287
|
+
}
|
|
288
|
+
return false;
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Fetches the latest published version of a package from the npm registry.
|
|
292
|
+
* Fails gracefully and returns null on any error or timeout.
|
|
293
|
+
*/
|
|
294
|
+
async function fetchLatestNpmVersion(packageName = CELL_HARNESS_PACKAGE_NAME, options = {}) {
|
|
295
|
+
const timeoutMs = options.timeoutMs ?? 3e3;
|
|
296
|
+
const url = `${(options.registryUrl ?? "https://registry.npmjs.org").replace(/\/$/, "")}/${packageName}/latest`;
|
|
297
|
+
try {
|
|
298
|
+
const controller = new AbortController();
|
|
299
|
+
const timer = setTimeout(() => {
|
|
300
|
+
controller.abort();
|
|
301
|
+
}, timeoutMs);
|
|
302
|
+
const response = await fetch(url, {
|
|
303
|
+
signal: controller.signal,
|
|
304
|
+
headers: { Accept: "application/json" }
|
|
305
|
+
});
|
|
306
|
+
clearTimeout(timer);
|
|
307
|
+
if (!response.ok) return null;
|
|
308
|
+
const data = await response.json();
|
|
309
|
+
if (typeof data.version === "string" && data.version.trim().length > 0) return data.version.trim();
|
|
310
|
+
return null;
|
|
311
|
+
} catch {
|
|
312
|
+
return null;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Asynchronously checks for the latest release on npm registry, respecting throttling
|
|
317
|
+
* and the opt-out environment variable CELL_HARNESS_NO_AUTO_UPDATE=1.
|
|
318
|
+
*/
|
|
319
|
+
async function checkLatestRelease(options) {
|
|
320
|
+
if (process.env.CELL_HARNESS_NO_AUTO_UPDATE === "1") return {
|
|
321
|
+
checked: false,
|
|
322
|
+
hasUpdate: false,
|
|
323
|
+
latestVersion: null,
|
|
324
|
+
reason: "disabled_by_env"
|
|
325
|
+
};
|
|
326
|
+
const now = options.now ?? Date.now();
|
|
327
|
+
if (!options.store.shouldCheck(now)) return {
|
|
328
|
+
checked: false,
|
|
329
|
+
hasUpdate: false,
|
|
330
|
+
latestVersion: null,
|
|
331
|
+
reason: "throttled"
|
|
332
|
+
};
|
|
333
|
+
const latest = await (options.fetchFn ?? fetchLatestNpmVersion)(options.packageName ?? "@machina.ai/cell-harness");
|
|
334
|
+
if (!latest) return {
|
|
335
|
+
checked: true,
|
|
336
|
+
hasUpdate: false,
|
|
337
|
+
latestVersion: null,
|
|
338
|
+
reason: "fetch_failed"
|
|
339
|
+
};
|
|
340
|
+
const hasUpdate = isNewerVersion(options.currentVersion, latest);
|
|
341
|
+
const currentState = options.store.read();
|
|
342
|
+
options.store.write({
|
|
343
|
+
...currentState,
|
|
344
|
+
lastCheckTimestamp: now,
|
|
345
|
+
installedVersion: options.currentVersion,
|
|
346
|
+
latestVersion: latest
|
|
347
|
+
});
|
|
348
|
+
return {
|
|
349
|
+
checked: true,
|
|
350
|
+
hasUpdate,
|
|
351
|
+
latestVersion: latest,
|
|
352
|
+
reason: hasUpdate ? "new_version_available" : "up_to_date"
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Detects the package manager used to install/run Cell Harness.
|
|
357
|
+
* Inspects process environment, binary path, and supports explicit CELL_HARNESS_UPDATE_RUNNER override.
|
|
358
|
+
*/
|
|
359
|
+
function detectPackageManager(options = {}) {
|
|
360
|
+
const env = options.env ?? process.env;
|
|
361
|
+
const override = env.CELL_HARNESS_UPDATE_RUNNER?.trim().toLowerCase();
|
|
362
|
+
if (override === "pnpm" || override === "npm") return override;
|
|
363
|
+
const pathToCheck = (options.execPath !== void 0 ? options.execPath : process.argv[1] ?? "").toLowerCase();
|
|
364
|
+
if (pathToCheck.length > 0) {
|
|
365
|
+
const isVirtualPnpmStore = pathToCheck.includes("/.pnpm/") || pathToCheck.includes("\\.pnpm\\");
|
|
366
|
+
if (options.execPath !== void 0 || !isVirtualPnpmStore) {
|
|
367
|
+
if (pathToCheck.includes("pnpm")) return "pnpm";
|
|
368
|
+
if (pathToCheck.includes("npm") || pathToCheck.includes("node_modules")) return "npm";
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
if ((env.npm_config_user_agent?.toLowerCase())?.startsWith("pnpm")) return "pnpm";
|
|
372
|
+
return "npm";
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* Spawns an unreferenced, detached background subprocess to run the update worker.
|
|
376
|
+
* Prevents concurrent runs by transitioning state to 'updating' prior to spawn.
|
|
377
|
+
*/
|
|
378
|
+
function spawnBackgroundUpdate(options) {
|
|
379
|
+
options.store.write({
|
|
380
|
+
...options.store.read(),
|
|
381
|
+
status: "updating",
|
|
382
|
+
latestVersion: options.targetVersion
|
|
383
|
+
});
|
|
384
|
+
try {
|
|
385
|
+
const pm = options.packageManager ?? detectPackageManager();
|
|
386
|
+
const homeDir = options.store.homeDir;
|
|
387
|
+
const targetVersion = options.targetVersion;
|
|
388
|
+
const workerScript = `
|
|
389
|
+
const { spawnSync } = require('node:child_process');
|
|
390
|
+
const { existsSync, readFileSync, writeFileSync } = require('node:fs');
|
|
391
|
+
const { join } = require('node:path');
|
|
392
|
+
|
|
393
|
+
const homeDir = ${JSON.stringify(homeDir)};
|
|
394
|
+
const targetVersion = ${JSON.stringify(targetVersion)};
|
|
395
|
+
const pm = ${JSON.stringify(pm)};
|
|
396
|
+
const stateFile = join(homeDir, '.update-state.json');
|
|
397
|
+
|
|
398
|
+
const isWin = process.platform === 'win32';
|
|
399
|
+
const ext = isWin ? '.cmd' : '';
|
|
400
|
+
const bin = (pm === 'pnpm' ? 'pnpm' : 'npm') + ext;
|
|
401
|
+
const args = pm === 'pnpm' ? ['add', '-g', '@machina.ai/cell-harness@' + targetVersion] : ['install', '-g', '@machina.ai/cell-harness@' + targetVersion];
|
|
402
|
+
|
|
403
|
+
try {
|
|
404
|
+
const res = spawnSync(bin, args, { stdio: 'ignore', windowsHide: true });
|
|
405
|
+
let state = {};
|
|
406
|
+
try {
|
|
407
|
+
if (existsSync(stateFile)) {
|
|
408
|
+
state = JSON.parse(readFileSync(stateFile, 'utf8'));
|
|
409
|
+
}
|
|
410
|
+
} catch {}
|
|
411
|
+
|
|
412
|
+
if (res.error || (res.status !== 0 && res.status !== null)) {
|
|
413
|
+
state.status = 'failed';
|
|
414
|
+
state.lastError = {
|
|
415
|
+
message: res.error ? res.error.message : ('Exit code ' + res.status),
|
|
416
|
+
timestamp: Date.now()
|
|
417
|
+
};
|
|
418
|
+
} else {
|
|
419
|
+
state.status = 'completed';
|
|
420
|
+
state.latestVersion = targetVersion;
|
|
421
|
+
state.lastError = null;
|
|
422
|
+
}
|
|
423
|
+
writeFileSync(stateFile, JSON.stringify(state, null, 2), 'utf8');
|
|
424
|
+
} catch (err) {
|
|
425
|
+
try {
|
|
426
|
+
let state = {};
|
|
427
|
+
if (existsSync(stateFile)) state = JSON.parse(readFileSync(stateFile, 'utf8'));
|
|
428
|
+
state.status = 'failed';
|
|
429
|
+
state.lastError = { message: err.message, timestamp: Date.now() };
|
|
430
|
+
writeFileSync(stateFile, JSON.stringify(state, null, 2), 'utf8');
|
|
431
|
+
} catch {}
|
|
432
|
+
}
|
|
433
|
+
`.trim();
|
|
434
|
+
let child;
|
|
435
|
+
if (options.spawnFn) child = options.spawnFn(process.execPath, ["--eval", workerScript], {
|
|
436
|
+
detached: true,
|
|
437
|
+
stdio: "ignore"
|
|
438
|
+
});
|
|
439
|
+
else child = spawn(process.execPath, ["--eval", workerScript], {
|
|
440
|
+
detached: true,
|
|
441
|
+
stdio: "ignore"
|
|
442
|
+
});
|
|
443
|
+
if (typeof child.unref === "function") child.unref();
|
|
444
|
+
return {
|
|
445
|
+
started: true,
|
|
446
|
+
pid: child.pid
|
|
447
|
+
};
|
|
448
|
+
} catch (err) {
|
|
449
|
+
const errMsg = err instanceof Error ? err.message : String(err);
|
|
450
|
+
options.store.write({
|
|
451
|
+
...options.store.read(),
|
|
452
|
+
status: "failed",
|
|
453
|
+
lastError: {
|
|
454
|
+
message: errMsg,
|
|
455
|
+
timestamp: Date.now()
|
|
456
|
+
}
|
|
457
|
+
});
|
|
458
|
+
return {
|
|
459
|
+
started: false,
|
|
460
|
+
error: errMsg
|
|
461
|
+
};
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* Formats a terminal notification banner announcing that Cell Harness has been updated.
|
|
466
|
+
*/
|
|
467
|
+
function formatUpdateNotificationBanner(version, locale = "es-MX") {
|
|
468
|
+
if (locale.toLowerCase().startsWith("es")) return `\n\x1b[32m✨ Cell Harness se actualizó automáticamente a v${version}\x1b[0m\n`;
|
|
469
|
+
return `\n\x1b[32m✨ Cell Harness was automatically updated to v${version}\x1b[0m\n`;
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* Formats a terminal hint for manual update when background install encountered errors.
|
|
473
|
+
*/
|
|
474
|
+
function formatManualUpdateHint(version, pm = "npm", locale = "es-MX") {
|
|
475
|
+
const isSpanish = locale.toLowerCase().startsWith("es");
|
|
476
|
+
const cmd = pm === "pnpm" ? "pnpm add -g @machina.ai/cell-harness" : "npm install -g @machina.ai/cell-harness";
|
|
477
|
+
if (isSpanish) return `\x1b[33mℹ️ Nueva versión v${version} disponible. Ejecuta: ${cmd}\x1b[0m\n`;
|
|
478
|
+
return `\x1b[33mℹ️ New version v${version} available. Run: ${cmd}\x1b[0m\n`;
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Checks update state and renders notifications or hints if needed.
|
|
482
|
+
* Acknowledges the notification so it is only surfaced once.
|
|
483
|
+
*/
|
|
484
|
+
function checkAndRenderUpdateNotifications(options) {
|
|
485
|
+
const store = options.store;
|
|
486
|
+
const state = store.read();
|
|
487
|
+
const write = options.stdoutWriteFn ?? ((str) => process.stdout.write(str));
|
|
488
|
+
const locale = options.locale ?? "es-MX";
|
|
489
|
+
if (state.status === "completed" && state.latestVersion && store.shouldNotify(state.latestVersion)) {
|
|
490
|
+
write(formatUpdateNotificationBanner(state.latestVersion, locale));
|
|
491
|
+
store.acknowledgeNotification(state.latestVersion);
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
494
|
+
if (state.status === "failed" && state.latestVersion && isNewerVersion(options.currentVersion, state.latestVersion)) {
|
|
495
|
+
const pm = detectPackageManager();
|
|
496
|
+
write(formatManualUpdateHint(state.latestVersion, pm, locale));
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Triggers an asynchronous, non-blocking check for new releases and spawns the detached
|
|
501
|
+
* installer if an update is found. Fails completely silently without throwing.
|
|
502
|
+
*/
|
|
503
|
+
async function triggerBackgroundUpdateCheck(options) {
|
|
504
|
+
try {
|
|
505
|
+
const result = await (options.checkFn ?? checkLatestRelease)({
|
|
506
|
+
currentVersion: options.currentVersion,
|
|
507
|
+
store: options.store,
|
|
508
|
+
packageName: options.packageName
|
|
509
|
+
});
|
|
510
|
+
if (result.checked && result.hasUpdate && result.latestVersion) (options.spawnFn ?? spawnBackgroundUpdate)({
|
|
511
|
+
targetVersion: result.latestVersion,
|
|
512
|
+
store: options.store
|
|
513
|
+
});
|
|
514
|
+
} catch {}
|
|
515
|
+
}
|
|
516
|
+
//#endregion
|
|
146
517
|
//#region lib/types/launcher.js
|
|
147
518
|
/**
|
|
148
519
|
* Launcher and branding logic for Cell Harness (Nova Solutions Systems).
|
|
@@ -154,6 +525,20 @@ var __rewriteRelativeImportExtension = function(path, preserveJsx) {
|
|
|
154
525
|
});
|
|
155
526
|
return path;
|
|
156
527
|
};
|
|
528
|
+
const require = createRequire(import.meta.url);
|
|
529
|
+
/** Current published version of Cell Harness CLI, loaded dynamically from package manifest */
|
|
530
|
+
const CELL_HARNESS_VERSION = (function resolveVersion() {
|
|
531
|
+
try {
|
|
532
|
+
const pkg = require("../package.json");
|
|
533
|
+
if (pkg.version) return pkg.version;
|
|
534
|
+
} catch {
|
|
535
|
+
try {
|
|
536
|
+
const pkg = require("../../package.json");
|
|
537
|
+
if (pkg.version) return pkg.version;
|
|
538
|
+
} catch {}
|
|
539
|
+
}
|
|
540
|
+
return "0.2.0-rc2.c1";
|
|
541
|
+
})();
|
|
157
542
|
/** Path to the canonical Cell Harness Cordis patch overlay */
|
|
158
543
|
const CELL_HARNESS_PATCH = fileURLToPath(new URL("../config/cell-harness.cordis.patch.yml", import.meta.url));
|
|
159
544
|
/** Bundled upstream profile boot emitted beside the built launcher chunk in this app's `lib`. */
|
|
@@ -199,6 +584,13 @@ function ensureCellHarnessDshHome() {
|
|
|
199
584
|
if (current === void 0 || current.trim().length === 0) process.env[DSH_HOME_ENV] = resolveCellHarnessDshHome();
|
|
200
585
|
}
|
|
201
586
|
/**
|
|
587
|
+
* Ensures that DeepSeek and third-party session telemetry is strictly disabled
|
|
588
|
+
* across Cell Harness runtime executions.
|
|
589
|
+
*/
|
|
590
|
+
function ensureCellHarnessTelemetryDisabled() {
|
|
591
|
+
process.env.DSH_TELEMETRY_DISABLED = "1";
|
|
592
|
+
}
|
|
593
|
+
/**
|
|
202
594
|
* Resolves the canonical path to the Cell Harness session file (~/.cell-harness/session.json).
|
|
203
595
|
* @returns absolute path to session.json.
|
|
204
596
|
*/
|
|
@@ -399,6 +791,7 @@ function installConsoleRebrand() {
|
|
|
399
791
|
*/
|
|
400
792
|
async function runCellHarnessCli(argv = process.argv.slice(2)) {
|
|
401
793
|
ensureCellHarnessDshHome();
|
|
794
|
+
ensureCellHarnessTelemetryDisabled();
|
|
402
795
|
const invocation = parseCellHarnessArgs(argv);
|
|
403
796
|
if (process.env.DSH_CELL_HARNESS_SKIP_PREAUTH !== "true") await ensureCellHarnessConfigFile();
|
|
404
797
|
const cellConfig = loadCellHarnessConfigSync();
|
|
@@ -406,7 +799,7 @@ async function runCellHarnessCli(argv = process.argv.slice(2)) {
|
|
|
406
799
|
const resolvedLocale = invocation.locale || cellConfig.locale.default || envLang || "es-MX";
|
|
407
800
|
const isSpanish = resolvedLocale.toLowerCase().startsWith("es");
|
|
408
801
|
if (invocation.mode === "version") {
|
|
409
|
-
process.stdout.write(
|
|
802
|
+
process.stdout.write(`Cell Harness (Nova Solutions Systems) v${CELL_HARNESS_VERSION}\n`);
|
|
410
803
|
return;
|
|
411
804
|
}
|
|
412
805
|
if (invocation.mode === "help") {
|
|
@@ -421,6 +814,16 @@ async function runCellHarnessCli(argv = process.argv.slice(2)) {
|
|
|
421
814
|
return;
|
|
422
815
|
}
|
|
423
816
|
process.stdout.write(getBrandBanner(resolvedLocale) + "\n");
|
|
817
|
+
const updateStore = new UpdateStateStore(resolveCellHarnessDshHome());
|
|
818
|
+
checkAndRenderUpdateNotifications({
|
|
819
|
+
currentVersion: CELL_HARNESS_VERSION,
|
|
820
|
+
store: updateStore,
|
|
821
|
+
locale: resolvedLocale
|
|
822
|
+
});
|
|
823
|
+
triggerBackgroundUpdateCheck({
|
|
824
|
+
currentVersion: CELL_HARNESS_VERSION,
|
|
825
|
+
store: updateStore
|
|
826
|
+
}).catch(() => {});
|
|
424
827
|
installConsoleRebrand();
|
|
425
828
|
if (invocation.profile === "web") ensureCellHarnessWebBranding();
|
|
426
829
|
await ensureAuthenticatedSession({ locale: resolvedLocale });
|
|
@@ -460,4 +863,4 @@ async function runCellHarnessCli(argv = process.argv.slice(2)) {
|
|
|
460
863
|
}
|
|
461
864
|
}
|
|
462
865
|
//#endregion
|
|
463
|
-
export {
|
|
866
|
+
export { ensureAuthenticatedSession as a, findEAddrInUseError as c, parseCellHarnessArgs as d, resolveCellHarnessDshHome as f, runCellHarnessCli as h, PROFILE_BOOT_SOURCE_URL as i, getBrandBanner as l, resolveProfileBootUrl as m, CELL_HARNESS_VERSION as n, ensureCellHarnessDshHome as o, resolveCellHarnessSessionPath as p, PROFILE_BOOT_ARTIFACT_URL as r, ensureCellHarnessTelemetryDisabled as s, CELL_HARNESS_PATCH as t, installConsoleRebrand as u };
|
package/lib/profile-boot.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, rmSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { dirname, join, resolve } from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
|
-
import { PROFILE_PATCH_FILENAME, PROFILE_TEMPLATES,
|
|
4
|
+
import { PROFILE_PATCH_FILENAME, PROFILE_TEMPLATES, PluginPackages, boot, createRuntimeResolution, initProfile, installFailLoud, loadOverlayPatches, loadProfile, readProfilePatches, reportSkippedBundles, resolveProfileDir } from "@deepseek-ai/dsh-app-boot";
|
|
5
5
|
import { resolveDshHome } from "@deepseek-ai/dsh-home-paths";
|
|
6
6
|
import { installProxyFromEnvironment } from "@deepseek-ai/dsh-http-proxy";
|
|
7
7
|
import { DSH_LAUNCH_ENVIRONMENT_KEY } from "@deepseek-ai/dsh-launch-environment";
|
|
@@ -75,8 +75,7 @@ function createProcessShutdown(dispose, forceExit = (code) => {
|
|
|
75
75
|
* Shared profile boot for every `dsh` surface: resolve the profile, stack its
|
|
76
76
|
* patch layers (bundle layers in `dsh.profile.bundles` order, the profile's
|
|
77
77
|
* own `cordis.patch.yml`, `--patch` overlays, the telemetry switch), mount the
|
|
78
|
-
* tree over the profile's empty root config,
|
|
79
|
-
* lifecycle, and wire fail-loud plus bounded shutdown.
|
|
78
|
+
* tree over the profile's empty root config, and wire fail-loud plus bounded shutdown.
|
|
80
79
|
*
|
|
81
80
|
* App flags are not the launcher's business: the invocation's inner arguments
|
|
82
81
|
* are provided to the tree through `ctx.cmdlineArgs`, where any injected app
|
|
@@ -118,8 +117,6 @@ function homePatchPath() {
|
|
|
118
117
|
}
|
|
119
118
|
/** Absolute path of this dsh installation's package.json (both anchors: src/ and lib/ sit one level under apps/cli). */
|
|
120
119
|
const INSTALL_ANCHOR = fileURLToPath(new URL("../package.json", import.meta.url));
|
|
121
|
-
/** The session-telemetry row id the DSH_TELEMETRY_DISABLED switch targets. */
|
|
122
|
-
const TELEMETRY_ROW_ID = "session-telemetry-otel";
|
|
123
120
|
/** The empty root entry list every profile tree patches over. */
|
|
124
121
|
const PROFILE_ROOT_CONFIG = `# dsh profile root — an empty entry list. The tree is composed as patches:
|
|
125
122
|
# each bundle in package.json's dsh.profile.bundles, then cordis.patch.yml, then any
|
|
@@ -130,7 +127,7 @@ const PROFILE_ROOT_CONFIG = `# dsh profile root — an empty entry list. The tre
|
|
|
130
127
|
const PROFILE_ROOT_FILENAME = "cordis.yml";
|
|
131
128
|
/**
|
|
132
129
|
* Initialize a missing profile from one shipped template. This copies only
|
|
133
|
-
* the template's bundle list
|
|
130
|
+
* the template's bundle list; local state from the
|
|
134
131
|
* same-named shipped profile is not read, and no inheritance metadata is
|
|
135
132
|
* persisted. Shipped profile names are reserved, and the target directory is
|
|
136
133
|
* claimed exclusively so existing or concurrent state is never reused.
|
|
@@ -157,7 +154,7 @@ function initializeProfileFromDefault(name, fromDefaultProfile, home = resolveDs
|
|
|
157
154
|
throw new Error(`${NAME}: profile directory ${dir} already exists; choose an unused profile name`);
|
|
158
155
|
}
|
|
159
156
|
try {
|
|
160
|
-
initProfile(dir, template.bundles
|
|
157
|
+
initProfile(dir, template.bundles);
|
|
161
158
|
} catch (error) {
|
|
162
159
|
try {
|
|
163
160
|
rmSync(dir, {
|
|
@@ -171,24 +168,6 @@ function initializeProfileFromDefault(name, fromDefaultProfile, home = resolveDs
|
|
|
171
168
|
}
|
|
172
169
|
}
|
|
173
170
|
/**
|
|
174
|
-
* Resolve the telemetry opt-out switch into its boot patch. ANY non-empty
|
|
175
|
-
* value (including `'0'`/`'false'`) disables: a privacy switch prefers
|
|
176
|
-
* off-by-mistake over on-by-mistake. A composition without the telemetry row
|
|
177
|
-
* exports nothing, so the switch is then trivially satisfied and no patch is
|
|
178
|
-
* generated — custom profiles need not mount telemetry to run with the
|
|
179
|
-
* switch set.
|
|
180
|
-
* @param disabledEnv - the raw `DSH_TELEMETRY_DISABLED` value (`undefined` when unset).
|
|
181
|
-
* @param hasRow - whether the composition carries the telemetry row.
|
|
182
|
-
* @returns the disable patch, or `undefined` when no hard-disable patch is required.
|
|
183
|
-
*/
|
|
184
|
-
function resolveTelemetryPatch(disabledEnv, hasRow) {
|
|
185
|
-
if ((disabledEnv ?? "") === "" || !hasRow) return void 0;
|
|
186
|
-
return {
|
|
187
|
-
id: TELEMETRY_ROW_ID,
|
|
188
|
-
disabled: true
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
171
|
* Load a resolved profile for `name` and (re)write the empty root config. The
|
|
193
172
|
* root is always rewritten: the whole composition is patch layers, and the
|
|
194
173
|
* vendored Loader's tree write-back (a plugin self-disposing persists the
|
|
@@ -206,18 +185,10 @@ function resolveTelemetryPatch(disabledEnv, hasRow) {
|
|
|
206
185
|
function prepareProfile(name, userLayer = true, fromDefaultProfile) {
|
|
207
186
|
if (fromDefaultProfile !== void 0) initializeProfileFromDefault(name, fromDefaultProfile);
|
|
208
187
|
const profile = loadProfile(NAME, name, INSTALL_ANCHOR, void 0, { userLayer });
|
|
188
|
+
reportSkippedBundles(NAME, profile);
|
|
209
189
|
writeFileSync(join(profile.dir, PROFILE_ROOT_FILENAME), PROFILE_ROOT_CONFIG);
|
|
210
190
|
return profile;
|
|
211
191
|
}
|
|
212
|
-
/** The full patch stack of one composed profile, in application order. */
|
|
213
|
-
function allPatches(composed) {
|
|
214
|
-
return [
|
|
215
|
-
...composed.bundlePatches,
|
|
216
|
-
...composed.profile.patches,
|
|
217
|
-
...composed.homePatches,
|
|
218
|
-
...composed.overlays
|
|
219
|
-
];
|
|
220
|
-
}
|
|
221
192
|
/**
|
|
222
193
|
* Load `name` and compose its effective patch stack: bundle layers in
|
|
223
194
|
* `dsh.profile.bundles` order (a base-backed profile gets the base bundle's
|
|
@@ -227,123 +198,101 @@ function allPatches(composed) {
|
|
|
227
198
|
* then the telemetry switch.
|
|
228
199
|
* @param name - the profile name.
|
|
229
200
|
* @param patchFiles - `--patch` overlay paths, in argv order.
|
|
201
|
+
* @param fromDefaultProfile - shipped template for a missing named profile.
|
|
202
|
+
* @param resolvedProfile - application-owned profile and installation.
|
|
230
203
|
* @returns the profile and its patch layers.
|
|
231
204
|
*/
|
|
232
|
-
async function composeProfile(name, patchFiles, fromDefaultProfile) {
|
|
233
|
-
const profile = prepareProfile(name, true, fromDefaultProfile);
|
|
234
|
-
|
|
235
|
-
installAnchor: INSTALL_ANCHOR,
|
|
236
|
-
profile
|
|
237
|
-
});
|
|
238
|
-
const homePatches = loadOptionalPatches(NAME, homePatchPath()) ?? [];
|
|
239
|
-
const overlays = patchFiles.flatMap((file) => loadOverlayPatches(NAME, resolve(file)));
|
|
240
|
-
const bundlePatches = profile.layers.flatMap((layer) => layer.patches);
|
|
241
|
-
const rows = /* @__PURE__ */ new Map();
|
|
242
|
-
for (const row of composeEntries([
|
|
243
|
-
bundlePatches,
|
|
244
|
-
profile.patches,
|
|
245
|
-
homePatches,
|
|
246
|
-
overlays
|
|
247
|
-
])) if (typeof row.id === "string") rows.set(row.id, row);
|
|
248
|
-
const composedOverlays = [...overlays];
|
|
249
|
-
const telemetryPatch = resolveTelemetryPatch(process.env.DSH_TELEMETRY_DISABLED, rows.has(TELEMETRY_ROW_ID));
|
|
250
|
-
if (telemetryPatch !== void 0) composedOverlays.push(telemetryPatch);
|
|
205
|
+
async function composeProfile(name, patchFiles, fromDefaultProfile, resolvedProfile) {
|
|
206
|
+
const profile = resolvedProfile?.profile ?? prepareProfile(name, true, fromDefaultProfile);
|
|
207
|
+
if (resolvedProfile !== void 0) writeFileSync(join(profile.dir, PROFILE_ROOT_FILENAME), PROFILE_ROOT_CONFIG);
|
|
251
208
|
return {
|
|
252
209
|
profile,
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
210
|
+
resolution: await createRuntimeResolution({
|
|
211
|
+
installAnchor: resolvedProfile?.installAnchor ?? INSTALL_ANCHOR,
|
|
212
|
+
profile
|
|
213
|
+
}),
|
|
214
|
+
overlays: patchFiles.flatMap((file) => loadOverlayPatches(NAME, resolve(file)))
|
|
256
215
|
};
|
|
257
216
|
}
|
|
258
217
|
/**
|
|
259
|
-
* Re-throw a watcher-setup failure unless a shutdown already owns the tree:
|
|
260
|
-
* a signal aborted this invocation, or an app requested exit (`ctx.appExit`
|
|
261
|
-
* from a fast one-shot) and the root's disposal rejected the in-flight setup
|
|
262
|
-
* await. Either way the failure describes a tree that is exiting as asked,
|
|
263
|
-
* not a broken watch.
|
|
264
|
-
* @param ctx - the booted root context.
|
|
265
|
-
* @param signal - this invocation's signal-shutdown fact.
|
|
266
|
-
* @param error - the setup failure.
|
|
267
|
-
*/
|
|
268
|
-
function suppressShutdownError(ctx, signal, error) {
|
|
269
|
-
if (signal.aborted) return;
|
|
270
|
-
if (ctx.fiber.state !== 2 || ctx.get("loader") === void 0) return;
|
|
271
|
-
throw error;
|
|
272
|
-
}
|
|
273
|
-
/**
|
|
274
218
|
* Boot one profile invocation end to end and leave process lifetime to the
|
|
275
219
|
* mounted plugins (or to a one-shot runner the composition mounts).
|
|
276
220
|
* @param options - environment snapshot, profile name, overlays, and the booted app's own arguments.
|
|
277
221
|
* @returns the settled root context and the shutdown controller.
|
|
222
|
+
* @throws after disposing startup resources; cleanup failures retain the original error.
|
|
278
223
|
*/
|
|
279
224
|
async function runProfile(options) {
|
|
280
225
|
const disposeProxy = await installProxyFromEnvironment(options.environment, (message) => {
|
|
281
226
|
process.stderr.write(`${NAME}: ${message}\n`);
|
|
282
227
|
});
|
|
283
|
-
const composed = await composeProfile(options.profile, options.patchFiles, options.fromDefaultProfile);
|
|
284
228
|
const app = {};
|
|
285
|
-
|
|
286
|
-
const
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
signalShutdown.abort();
|
|
293
|
-
shutdown.interrupt(code);
|
|
294
|
-
};
|
|
295
|
-
process.on("SIGTERM", () => {
|
|
296
|
-
interrupt(0);
|
|
297
|
-
});
|
|
298
|
-
process.on("SIGINT", () => {
|
|
299
|
-
interrupt(130);
|
|
300
|
-
});
|
|
301
|
-
installFailLoud(NAME, process, async () => {
|
|
302
|
-
await app.current?.fiber.dispose();
|
|
303
|
-
});
|
|
304
|
-
const rootConfig = join(composed.profile.dir, PROFILE_ROOT_FILENAME);
|
|
305
|
-
const composeLive = () => structuredClone([
|
|
306
|
-
...composed.bundlePatches,
|
|
307
|
-
...loadOptionalPatches(NAME, composed.profile.patchPath) ?? [],
|
|
308
|
-
...loadOptionalPatches(NAME, homePatchPath()) ?? [],
|
|
309
|
-
...composed.overlays
|
|
310
|
-
]);
|
|
311
|
-
const ctx = await boot(NAME, rootConfig, structuredClone(allPatches(composed)), (hostCtx) => {
|
|
312
|
-
app.current = hostCtx;
|
|
313
|
-
hostCtx.provide(DSH_LAUNCH_ENVIRONMENT_KEY, options.environment);
|
|
314
|
-
provideCmdline(hostCtx, {
|
|
315
|
-
args: options.args,
|
|
316
|
-
exit: (code) => void shutdown.shutdown(code),
|
|
317
|
-
ready: appReady.service
|
|
318
|
-
});
|
|
319
|
-
});
|
|
320
|
-
app.current = ctx;
|
|
321
|
-
if (composed.profile.patchReload === "live" && !signalShutdown.signal.aborted && ctx.fiber.state === 2 && ctx.get("loader") !== void 0) try {
|
|
322
|
-
if (ctx.get("hmr") === void 0) {
|
|
323
|
-
if (ctx.get("timer") === void 0) await ctx.loader.create({ name: "@deepseek-ai/cordis-plugin-timer" });
|
|
324
|
-
await ctx.loader.create({
|
|
325
|
-
name: "@deepseek-ai/cordis-plugin-hmr",
|
|
326
|
-
config: { root: [] }
|
|
327
|
-
});
|
|
229
|
+
let disposal;
|
|
230
|
+
const dispose = () => disposal ??= (async () => {
|
|
231
|
+
const failures = [];
|
|
232
|
+
for (const release of [() => app.current?.fiber.dispose(), disposeProxy]) try {
|
|
233
|
+
await release();
|
|
234
|
+
} catch (error) {
|
|
235
|
+
failures.push(error);
|
|
328
236
|
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
237
|
+
if (failures.length === 1) throw failures[0];
|
|
238
|
+
if (failures.length > 1) throw new AggregateError(failures, "dsh: profile cleanup failed");
|
|
239
|
+
})();
|
|
240
|
+
try {
|
|
241
|
+
const composed = await composeProfile(options.profile, options.patchFiles, options.fromDefaultProfile, options.resolvedProfile);
|
|
242
|
+
const appReady = createAppReady();
|
|
243
|
+
const shutdown = createProcessShutdown(dispose);
|
|
244
|
+
const signalShutdown = new AbortController();
|
|
245
|
+
const interrupt = (code) => {
|
|
246
|
+
signalShutdown.abort();
|
|
247
|
+
shutdown.interrupt(code);
|
|
248
|
+
};
|
|
249
|
+
process.on("SIGTERM", () => {
|
|
250
|
+
interrupt(0);
|
|
251
|
+
});
|
|
252
|
+
process.on("SIGINT", () => {
|
|
253
|
+
interrupt(130);
|
|
254
|
+
});
|
|
255
|
+
installFailLoud(NAME, process, async () => {
|
|
256
|
+
await app.current?.fiber.dispose();
|
|
333
257
|
});
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
258
|
+
const rootConfig = join(composed.profile.dir, PROFILE_ROOT_FILENAME);
|
|
259
|
+
const profileContext = {
|
|
260
|
+
name: options.profile,
|
|
261
|
+
...options.packageManager === void 0 ? {} : { packageManager: options.packageManager },
|
|
262
|
+
dir: composed.profile.dir,
|
|
263
|
+
patchPath: composed.profile.patchPath,
|
|
264
|
+
installAnchor: options.resolvedProfile?.installAnchor ?? INSTALL_ANCHOR,
|
|
265
|
+
startedBundles: composed.profile.layers.map((layer) => layer.packageName),
|
|
266
|
+
cwd: process.cwd(),
|
|
267
|
+
home: resolveDshHome(),
|
|
268
|
+
overlays: composed.overlays,
|
|
269
|
+
telemetryDisabledEnv: process.env.DSH_TELEMETRY_DISABLED
|
|
270
|
+
};
|
|
271
|
+
const ctx = await boot(NAME, rootConfig, readProfilePatches(NAME, profileContext, composed.profile), async (hostCtx) => {
|
|
272
|
+
app.current = hostCtx;
|
|
273
|
+
hostCtx.provide("profileContext", profileContext);
|
|
274
|
+
hostCtx.provide(DSH_LAUNCH_ENVIRONMENT_KEY, options.environment);
|
|
275
|
+
await hostCtx.plugin(PluginPackages, { resolution: composed.resolution });
|
|
276
|
+
provideCmdline(hostCtx, {
|
|
277
|
+
args: options.args,
|
|
278
|
+
exit: (code) => void shutdown.shutdown(code),
|
|
279
|
+
ready: appReady.service
|
|
280
|
+
});
|
|
338
281
|
});
|
|
282
|
+
app.current = ctx;
|
|
283
|
+
if (!signalShutdown.signal.aborted && ctx.fiber.state === 2 && ctx.get("loader") !== void 0) appReady.commit();
|
|
284
|
+
return {
|
|
285
|
+
ctx,
|
|
286
|
+
shutdown
|
|
287
|
+
};
|
|
339
288
|
} catch (error) {
|
|
340
|
-
|
|
289
|
+
try {
|
|
290
|
+
await dispose();
|
|
291
|
+
} catch (cleanupError) {
|
|
292
|
+
throw new AggregateError([error, cleanupError], "dsh: profile startup and cleanup failed");
|
|
293
|
+
}
|
|
294
|
+
throw error;
|
|
341
295
|
}
|
|
342
|
-
if (!signalShutdown.signal.aborted && ctx.fiber.state === 2 && ctx.get("loader") !== void 0) appReady.commit();
|
|
343
|
-
return {
|
|
344
|
-
ctx,
|
|
345
|
-
shutdown
|
|
346
|
-
};
|
|
347
296
|
}
|
|
348
297
|
//#endregion
|
|
349
|
-
export { INSTALL_ANCHOR, PROFILE_ROOT_FILENAME, homePatchPath, initializeProfileFromDefault, prepareProfile,
|
|
298
|
+
export { INSTALL_ANCHOR, PROFILE_ROOT_FILENAME, homePatchPath, initializeProfileFromDefault, prepareProfile, runProfile };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@machina.ai/cell-harness",
|
|
3
3
|
"description": "Cell Harness CLI: Nova Solutions",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0-rc2.c1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -17,100 +17,118 @@
|
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
19
|
"lib/*.js",
|
|
20
|
-
"config/cell-harness.cordis.patch.yml"
|
|
21
|
-
"presets/cell-harness"
|
|
20
|
+
"config/cell-harness.cordis.patch.yml"
|
|
22
21
|
],
|
|
23
22
|
"license": "MIT",
|
|
24
23
|
"dependencies": {
|
|
25
24
|
"commander": "^15.0.0",
|
|
26
25
|
"js-yaml": "^4.2.0",
|
|
27
26
|
"node-addon-require-builtin": "^0.1.4",
|
|
28
|
-
"@deepseek-ai/cordis": "
|
|
29
|
-
"@deepseek-ai/cordis
|
|
30
|
-
"@deepseek-ai/cordis-plugin-
|
|
31
|
-
"@deepseek-ai/cordis-plugin-
|
|
32
|
-
"@deepseek-ai/cordis-plugin-timer": "1.1.
|
|
33
|
-
"@deepseek-ai/cordis-plugin-
|
|
34
|
-
"@deepseek-ai/dsh-
|
|
35
|
-
"@deepseek-ai/dsh-
|
|
36
|
-
"@deepseek-ai/dsh-agent-
|
|
37
|
-
"@deepseek-ai/dsh-
|
|
38
|
-
"@deepseek-ai/dsh-
|
|
39
|
-
"@deepseek-ai/dsh-client-ui-
|
|
40
|
-
"@deepseek-ai/dsh-
|
|
41
|
-
"@deepseek-ai/dsh-
|
|
42
|
-
"@deepseek-ai/dsh-
|
|
43
|
-
"@deepseek-ai/dsh-
|
|
44
|
-
"@deepseek-ai/dsh-
|
|
45
|
-
"@deepseek-ai/dsh-compaction-
|
|
46
|
-
"@deepseek-ai/dsh-
|
|
47
|
-
"@deepseek-ai/dsh-
|
|
48
|
-
"@deepseek-ai/dsh-goal": "0.
|
|
49
|
-
"@deepseek-ai/dsh-
|
|
50
|
-
"@deepseek-ai/dsh-
|
|
51
|
-
"@deepseek-ai/dsh-
|
|
52
|
-
"@deepseek-ai/dsh-
|
|
53
|
-
"@deepseek-ai/dsh-
|
|
54
|
-
"@deepseek-ai/dsh-
|
|
55
|
-
"@deepseek-ai/dsh-http-proxy": "0.
|
|
56
|
-
"@deepseek-ai/dsh-
|
|
57
|
-
"@deepseek-ai/dsh-
|
|
58
|
-
"@deepseek-ai/dsh-
|
|
59
|
-
"@deepseek-ai/dsh-
|
|
60
|
-
"@deepseek-ai/dsh-
|
|
61
|
-
"@deepseek-ai/dsh-
|
|
62
|
-
"@deepseek-ai/dsh-
|
|
63
|
-
"@deepseek-ai/dsh-
|
|
64
|
-
"@deepseek-ai/dsh-
|
|
65
|
-
"@deepseek-ai/dsh-
|
|
66
|
-
"@deepseek-ai/dsh-
|
|
67
|
-
"@deepseek-ai/dsh-
|
|
68
|
-
"@deepseek-ai/dsh-
|
|
69
|
-
"@deepseek-ai/dsh-
|
|
70
|
-
"@deepseek-ai/dsh-
|
|
71
|
-
"@deepseek-ai/dsh-
|
|
72
|
-
"@deepseek-ai/dsh-
|
|
73
|
-
"@deepseek-ai/dsh-
|
|
74
|
-
"@deepseek-ai/dsh-
|
|
75
|
-
"@deepseek-ai/dsh-
|
|
76
|
-
"@deepseek-ai/dsh-
|
|
77
|
-
"@deepseek-ai/dsh-
|
|
78
|
-
"@deepseek-ai/dsh-
|
|
79
|
-
"@deepseek-ai/dsh-
|
|
80
|
-
"@deepseek-ai/dsh-
|
|
81
|
-
"@deepseek-ai/dsh-
|
|
82
|
-
"@deepseek-ai/dsh-
|
|
83
|
-
"@deepseek-ai/dsh-
|
|
84
|
-
"@deepseek-ai/dsh-
|
|
85
|
-
"@deepseek-ai/dsh-
|
|
86
|
-
"@deepseek-ai/dsh-tool-
|
|
87
|
-
"@deepseek-ai/dsh-tool-
|
|
88
|
-
"@deepseek-ai/dsh-tool-
|
|
89
|
-
"@deepseek-ai/dsh-tool-
|
|
90
|
-
"@deepseek-ai/dsh-tool-
|
|
91
|
-
"@deepseek-ai/dsh-
|
|
92
|
-
"@deepseek-ai/dsh-
|
|
93
|
-
"@deepseek-ai/dsh-
|
|
94
|
-
"@deepseek-ai/dsh-tool-
|
|
95
|
-
"@deepseek-ai/dsh-
|
|
96
|
-
"@deepseek-ai/dsh-
|
|
97
|
-
"@
|
|
98
|
-
"@deepseek-ai/
|
|
99
|
-
"@
|
|
100
|
-
"@
|
|
101
|
-
"@
|
|
102
|
-
"@
|
|
103
|
-
"@
|
|
104
|
-
"@
|
|
105
|
-
"@
|
|
106
|
-
"@
|
|
107
|
-
"@
|
|
27
|
+
"@deepseek-ai/cordis-plugin-group": "~1.0.4",
|
|
28
|
+
"@deepseek-ai/cordis": "~4.0.4",
|
|
29
|
+
"@deepseek-ai/cordis-plugin-include": "~1.0.9",
|
|
30
|
+
"@deepseek-ai/cordis-plugin-loader": "~1.0.5",
|
|
31
|
+
"@deepseek-ai/cordis-plugin-timer": "~1.1.6",
|
|
32
|
+
"@deepseek-ai/cordis-plugin-hmr": "~1.0.19",
|
|
33
|
+
"@deepseek-ai/dsh-agent-instructions": "0.2.0-rc.2",
|
|
34
|
+
"@deepseek-ai/dsh-acp-app": "0.2.0-rc.2",
|
|
35
|
+
"@deepseek-ai/dsh-agent-preset": "0.2.0-rc.2",
|
|
36
|
+
"@deepseek-ai/dsh-agent-tool-presentation": "0.2.0-rc.2",
|
|
37
|
+
"@deepseek-ai/dsh-app-boot": "0.2.0-rc.2",
|
|
38
|
+
"@deepseek-ai/dsh-client-ui-cordis": "0.2.0-rc.2",
|
|
39
|
+
"@deepseek-ai/dsh-base": "0.2.0-rc.2",
|
|
40
|
+
"@deepseek-ai/dsh-client-ui-agent-preset": "0.2.0-rc.2",
|
|
41
|
+
"@deepseek-ai/dsh-agent-preset-registry": "0.2.0-rc.2",
|
|
42
|
+
"@deepseek-ai/dsh-cmdline": "0.2.0-rc.2",
|
|
43
|
+
"@deepseek-ai/dsh-command-compact": "0.2.0-rc.2",
|
|
44
|
+
"@deepseek-ai/dsh-compaction-basic": "0.2.0-rc.2",
|
|
45
|
+
"@deepseek-ai/dsh-command-goal": "0.2.0-rc.2",
|
|
46
|
+
"@deepseek-ai/dsh-compaction-tool-result-pruner": "0.2.0-rc.2",
|
|
47
|
+
"@deepseek-ai/dsh-goal-round-driver": "0.2.0-rc.2",
|
|
48
|
+
"@deepseek-ai/dsh-fs-local": "0.2.0-rc.2",
|
|
49
|
+
"@deepseek-ai/dsh-headless": "0.2.0-rc.2",
|
|
50
|
+
"@deepseek-ai/dsh-cordis-client-runner": "0.2.0-rc.2",
|
|
51
|
+
"@deepseek-ai/dsh-goal": "0.2.0-rc.2",
|
|
52
|
+
"@deepseek-ai/dsh-home-paths": "0.2.0-rc.2",
|
|
53
|
+
"@deepseek-ai/dsh-hooks-claude-code": "0.2.0-rc.2",
|
|
54
|
+
"@deepseek-ai/dsh-http-proxy": "0.2.0-rc.2",
|
|
55
|
+
"@deepseek-ai/dsh-launch-environment": "0.2.0-rc.2",
|
|
56
|
+
"@deepseek-ai/dsh-hooks-codex": "0.2.0-rc.2",
|
|
57
|
+
"@deepseek-ai/dsh-jobs-local": "0.2.0-rc.2",
|
|
58
|
+
"@deepseek-ai/dsh-llm-pi-ai": "0.2.0-rc.2",
|
|
59
|
+
"@deepseek-ai/dsh-lsp-stdio": "0.2.0-rc.2",
|
|
60
|
+
"@deepseek-ai/dsh-mcp-client": "0.2.0-rc.2",
|
|
61
|
+
"@deepseek-ai/dsh-persona": "0.2.0-rc.2",
|
|
62
|
+
"@deepseek-ai/dsh-plan-mode": "0.2.0-rc.2",
|
|
63
|
+
"@deepseek-ai/dsh-pwsh-local": "0.2.0-rc.2",
|
|
64
|
+
"@deepseek-ai/dsh-pwsh-sandbox": "0.2.0-rc.2",
|
|
65
|
+
"@deepseek-ai/dsh-repeat-tool-reminder": "0.2.0-rc.2",
|
|
66
|
+
"@deepseek-ai/dsh-schedule": "0.2.0-rc.2",
|
|
67
|
+
"@deepseek-ai/dsh-sdk-app": "0.2.0-rc.2",
|
|
68
|
+
"@deepseek-ai/dsh-sdk-minimal": "0.2.0-rc.2",
|
|
69
|
+
"@deepseek-ai/dsh-session-reference": "0.2.0-rc.2",
|
|
70
|
+
"@deepseek-ai/dsh-session-projection": "0.2.0-rc.2",
|
|
71
|
+
"@deepseek-ai/dsh-skill": "0.2.0-rc.2",
|
|
72
|
+
"@deepseek-ai/dsh-skill-filesystem": "0.2.0-rc.2",
|
|
73
|
+
"@deepseek-ai/dsh-subagent": "0.2.0-rc.2",
|
|
74
|
+
"@deepseek-ai/dsh-subagent-acp": "0.2.0-rc.2",
|
|
75
|
+
"@deepseek-ai/dsh-subagent-claude-code": "0.2.0-rc.2",
|
|
76
|
+
"@deepseek-ai/dsh-subagent-dsh-sdk": "0.2.0-rc.2",
|
|
77
|
+
"@deepseek-ai/dsh-subagent-codex": "0.2.0-rc.2",
|
|
78
|
+
"@deepseek-ai/dsh-subagent-spawn-in-process": "0.2.0-rc.2",
|
|
79
|
+
"@deepseek-ai/dsh-terminal-bash": "0.2.0-rc.2",
|
|
80
|
+
"@deepseek-ai/dsh-terminal": "0.2.0-rc.2",
|
|
81
|
+
"@deepseek-ai/dsh-subagent-fork-in-process": "0.2.0-rc.2",
|
|
82
|
+
"@deepseek-ai/dsh-time-context": "0.2.0-rc.2",
|
|
83
|
+
"@deepseek-ai/dsh-tmux-context": "0.2.0-rc.2",
|
|
84
|
+
"@deepseek-ai/dsh-token-meter": "0.2.0-rc.2",
|
|
85
|
+
"@deepseek-ai/dsh-tool-ask-user": "0.2.0-rc.2",
|
|
86
|
+
"@deepseek-ai/dsh-tool-bash": "0.2.0-rc.2",
|
|
87
|
+
"@deepseek-ai/dsh-tool-bash-persistent": "0.2.0-rc.2",
|
|
88
|
+
"@deepseek-ai/dsh-tool-call-timeout-policy": "0.2.0-rc.2",
|
|
89
|
+
"@deepseek-ai/dsh-tool-cordis": "0.2.0-rc.2",
|
|
90
|
+
"@deepseek-ai/dsh-tool-fs": "0.2.0-rc.2",
|
|
91
|
+
"@deepseek-ai/dsh-tool-fs-search": "0.2.0-rc.2",
|
|
92
|
+
"@deepseek-ai/dsh-tool-jobs": "0.2.0-rc.2",
|
|
93
|
+
"@deepseek-ai/dsh-tool-lsp": "0.2.0-rc.2",
|
|
94
|
+
"@deepseek-ai/dsh-tool-goal": "0.2.0-rc.2",
|
|
95
|
+
"@deepseek-ai/dsh-tool-present": "0.2.0-rc.2",
|
|
96
|
+
"@deepseek-ai/dsh-tool-pwsh": "0.2.0-rc.2",
|
|
97
|
+
"@deepseek-ai/dsh-tool-pwsh-persistent": "0.2.0-rc.2",
|
|
98
|
+
"@deepseek-ai/dsh-tool-ralph": "0.2.0-rc.2",
|
|
99
|
+
"@deepseek-ai/dsh-tool-session-query": "0.2.0-rc.2",
|
|
100
|
+
"@deepseek-ai/dsh-tool-skill": "0.2.0-rc.2",
|
|
101
|
+
"@deepseek-ai/dsh-tool-str-replace-editor": "0.2.0-rc.2",
|
|
102
|
+
"@deepseek-ai/dsh-tool-subagent": "0.2.0-rc.2",
|
|
103
|
+
"@deepseek-ai/dsh-tool-subagent-control": "0.2.0-rc.2",
|
|
104
|
+
"@deepseek-ai/dsh-tool-terminal": "0.2.0-rc.2",
|
|
105
|
+
"@deepseek-ai/dsh-tool-todo": "0.2.0-rc.2",
|
|
106
|
+
"@deepseek-ai/dsh-tool-web": "0.2.0-rc.2",
|
|
107
|
+
"@deepseek-ai/dsh-tool-workflow": "0.2.0-rc.2",
|
|
108
|
+
"@deepseek-ai/dsh-web-app": "0.2.0-rc.2",
|
|
109
|
+
"@deepseek-ai/dsh-web-search-perplexity": "0.2.0-rc.2",
|
|
110
|
+
"@deepseek-ai/dsh-web-frontend": "0.2.0-rc.2",
|
|
111
|
+
"@deepseek-ai/dsh-webhook": "0.2.0-rc.2",
|
|
112
|
+
"@deepseek-ai/dsh-web-search-exa": "0.2.0-rc.2",
|
|
113
|
+
"@deepseek-ai/dsh-workflow-ptc": "0.2.0-rc.2",
|
|
114
|
+
"@deepseek-ai/dsh-webhook-github": "0.2.0-rc.2",
|
|
115
|
+
"@deepseek-ai/schemastery": "~3.18.4",
|
|
116
|
+
"@machina.ai/ch-auth-reboot-sso": "^0.2.0-rc2.c1",
|
|
117
|
+
"@machina.ai/ch-client-locale-es-mx": "^0.2.0-rc2.c1",
|
|
118
|
+
"@machina.ai/ch-client-ui-brand-nova": "^0.2.0-rc2.c1",
|
|
119
|
+
"@machina.ai/ch-image": "^0.2.0-rc2.c1",
|
|
120
|
+
"@machina.ai/ch-client-ui-settings-cell-models": "^0.2.0-rc2.c1",
|
|
121
|
+
"@machina.ai/ch-image-gemini-reboot": "^0.2.0-rc2.c1",
|
|
122
|
+
"@machina.ai/ch-llm-reboot": "^0.2.0-rc2.c1",
|
|
123
|
+
"@machina.ai/ch-skill-conductor": "^0.2.0-rc2.c1",
|
|
124
|
+
"@machina.ai/ch-tool-image": "^0.2.0-rc2.c1",
|
|
125
|
+
"@machina.ai/ch-web-search-gemini": "^0.2.0-rc2.c1"
|
|
108
126
|
},
|
|
109
127
|
"devDependencies": {
|
|
110
128
|
"@types/js-yaml": "^4.0.9",
|
|
111
129
|
"@types/node": "^22.0.0",
|
|
112
130
|
"js-yaml": "^4.1.0",
|
|
113
|
-
"@deepseek-ai/cordis-plugin-include": "
|
|
131
|
+
"@deepseek-ai/cordis-plugin-include": "~1.0.9"
|
|
114
132
|
},
|
|
115
133
|
"scripts": {
|
|
116
134
|
"bundle": "tsdown",
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# Cell Harness (Nova Solutions Systems) agent preset
|
|
2
|
-
- id: persona
|
|
3
|
-
name: '@deepseek-ai/dsh-persona'
|
|
4
|
-
config:
|
|
5
|
-
suffix: Your working directory is {{cwd}}.
|
|
6
|
-
prefix: >-
|
|
7
|
-
You are Cell Harness, an advanced coding and automation agent developed by Nova Solutions Systems powered by {{model}}.
|
|
8
|
-
|
|
9
|
-
- id: agent-instructions
|
|
10
|
-
name: '@deepseek-ai/dsh-agent-instructions'
|
|
11
|
-
config:
|
|
12
|
-
maxBytes: 65536
|
|
13
|
-
|
|
14
|
-
- id: tool-bash
|
|
15
|
-
name: '@deepseek-ai/dsh-tool-bash'
|
|
16
|
-
disabled: !!js process.platform === 'win32'
|
|
17
|
-
|
|
18
|
-
- id: tool-pwsh
|
|
19
|
-
name: '@deepseek-ai/dsh-tool-pwsh'
|
|
20
|
-
|
|
21
|
-
- id: tool-fs
|
|
22
|
-
name: '@deepseek-ai/dsh-tool-fs'
|
|
23
|
-
|
|
24
|
-
- id: tool-fs-search
|
|
25
|
-
name: '@deepseek-ai/dsh-tool-fs-search'
|
|
26
|
-
|
|
27
|
-
- id: tool-str-replace-editor
|
|
28
|
-
name: '@deepseek-ai/dsh-tool-str-replace-editor'
|
|
29
|
-
|
|
30
|
-
- id: tool-web
|
|
31
|
-
name: '@deepseek-ai/dsh-tool-web'
|
|
32
|
-
config:
|
|
33
|
-
fetch: true
|
|
34
|
-
|
|
35
|
-
- id: tool-skill
|
|
36
|
-
name: '@deepseek-ai/dsh-tool-skill'
|
|
37
|
-
|
|
38
|
-
- id: tool-subagent
|
|
39
|
-
name: '@deepseek-ai/dsh-tool-subagent'
|
|
40
|
-
|
|
41
|
-
- id: tool-todo
|
|
42
|
-
name: '@deepseek-ai/dsh-tool-todo'
|
|
43
|
-
|
|
44
|
-
- id: plan-mode
|
|
45
|
-
name: '@deepseek-ai/dsh-plan-mode'
|
|
46
|
-
|
|
47
|
-
- id: goal
|
|
48
|
-
name: '@deepseek-ai/dsh-goal'
|