Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(daemon): report incompatible DSH bridge profiles (#10897)
Danila Katalshov848537948c68
diff --git a/apps/docs/content/docs/install-agent-runtime.fr.mdx b/apps/docs/content/docs/install-agent-runtime.fr.mdxindex 2be85262ea..f826bb6928 100644--- a/apps/docs/content/docs/install-agent-runtime.fr.mdx+++ b/apps/docs/content/docs/install-agent-runtime.fr.mdx@@ -107,6 +107,8 @@ Privilégiez un bundle que votre propre équipe publie ou compile : cette valeur**Après une mise à niveau de DSH.** Si la sonde signale des paquets cœur incompatibles dans le profil, sauvegardez le manifeste indiqué dans le diagnostic du daemon. Vérifiez les substitutions de `@deepseek-ai/dsh-agent`, `@deepseek-ai/dsh-session`, `@deepseek-ai/dsh-tools` et `@deepseek-ai/dsh-llm` : préférez les paquets fournis par l’application, ou alignez les substitutions sur la version installée de DSH. Conservez les plugins et hooks indépendants nécessaires ; ne supprimez pas toutes les dépendances. Relancez `dsh --profile multica --probe` après la réparation. Multica indique que ce refus de compatibilité confirmé nécessite une réparation manuelle et n’écrase pas le profil existant.+Si la sonde indique que DSH a ignoré `@multica-ai/dsh-runtime` car ses exigences ne correspondent pas à la version installée de DSH, sauvegardez le manifeste et mettez à jour le pont Multica vers une version compatible. Relancez ensuite `dsh --profile multica --probe`.+Le daemon enregistre DeepSeek Harness uniquement après la réussite de `dsh --profile multica --probe`. Le diagnostic de `/health` distingue un profil absent, une réparation manuelle confirmée, une incompatibilité de protocole et une sonde indisponible. En cas d’échec au démarrage, il inclut la version détectée du CLI, l’emplacement du manifeste et les diagnostics expurgés disponibles.</Accordion>diff --git a/apps/docs/content/docs/install-agent-runtime.ja.mdx b/apps/docs/content/docs/install-agent-runtime.ja.mdxindex 9f3a3f85ad..25077fca90 100644--- a/apps/docs/content/docs/install-agent-runtime.ja.mdx+++ b/apps/docs/content/docs/install-agent-runtime.ja.mdx@@ -107,6 +107,8 @@ Node.js 20+ をインストールして `npm install -g @deepseek-ai/dsh` を実**DSH のアップグレード後。** プローブがプロファイル内のコアパッケージの非互換を報告したら、デーモンの診断に示されたマニフェストをバックアップします。`@deepseek-ai/dsh-agent`、`@deepseek-ai/dsh-session`、`@deepseek-ai/dsh-tools`、`@deepseek-ai/dsh-llm` の上書きを確認し、可能ならアプリに付属するコアパッケージを使用するか、インストール済みの DSH と互換性のあるバージョンに揃えてください。必要な独立プラグインやフックは残し、依存関係をすべて削除しないでください。修復後に `dsh --profile multica --probe` を再実行します。Multica は確認済みの互換性拒否を手動修復が必要な状態として報告し、既存のプロファイルを上書きしません。+プローブが、インストール済みの DSH と要件が合わないため `@multica-ai/dsh-runtime` を読み込まなかったと報告した場合は、マニフェストをバックアップし、Multica ブリッジを互換性のあるビルドに更新してください。更新後に `dsh --profile multica --probe` を再実行します。+デーモンは `dsh --profile multica --probe` が成功した場合のみ DeepSeek Harness を登録します。`/health` の診断では、プロファイルの欠落、確認済みの手動修復、プロトコルの非互換、プローブの一時的な利用不可を区別します。起動失敗時には、検出した CLI バージョン、マニフェストの場所、取得できた機密情報を除去した診断出力を示します。</Accordion>diff --git a/apps/docs/content/docs/install-agent-runtime.ko.mdx b/apps/docs/content/docs/install-agent-runtime.ko.mdxindex 6ad7c61224..fa7cb9e34b 100644--- a/apps/docs/content/docs/install-agent-runtime.ko.mdx+++ b/apps/docs/content/docs/install-agent-runtime.ko.mdx@@ -107,6 +107,8 @@ Node.js 20+를 설치하고 `npm install -g @deepseek-ai/dsh`를 실행한 뒤 M**DSH 업그레이드 후.** 프로브가 프로필 내부 코어 패키지의 비호환성을 보고하면 데몬 진단에 표시된 매니페스트를 백업하세요. `@deepseek-ai/dsh-agent`, `@deepseek-ai/dsh-session`, `@deepseek-ai/dsh-tools`, `@deepseek-ai/dsh-llm`의 재정의를 확인하고, 가능하면 앱에 포함된 코어 패키지를 사용하거나 설치된 DSH와 호환되는 버전으로 맞추세요. 필요한 독립 플러그인과 훅은 유지하고 모든 의존성을 삭제하지 마세요. 수정 후 `dsh --profile multica --probe`를 다시 실행하세요. Multica는 확인된 호환성 거부를 수동 프로필 복구가 필요한 상태로 보고하며 기존 프로필을 덮어쓰지 않습니다.+프로브에 설치된 DSH가 요구 사항을 충족하지 않아 `@multica-ai/dsh-runtime`을 건너뛰었다고 표시되면 매니페스트를 백업하고 Multica 브리지를 호환되는 빌드로 업데이트하세요. 업데이트 후 `dsh --profile multica --probe`를 다시 실행하세요.+데몬은 `dsh --profile multica --probe`가 성공한 경우에만 DeepSeek Harness를 등록합니다. `/health` 진단은 프로필 누락, 확인된 수동 복구 필요, 프로토콜 비호환, 프로브의 일시적 사용 불가를 구분합니다. 시작 실패 시 감지된 CLI 버전, 매니페스트 위치, 가능한 경우 민감 정보를 가린 진단 출력을 포함합니다.</Accordion>diff --git a/apps/docs/content/docs/install-agent-runtime.mdx b/apps/docs/content/docs/install-agent-runtime.mdxindex 04f52cb3ea..0d35fd2826 100644--- a/apps/docs/content/docs/install-agent-runtime.mdx+++ b/apps/docs/content/docs/install-agent-runtime.mdx@@ -133,6 +133,8 @@ Prefer a bundle your own team publishes or builds: this value is installed into**After upgrading DSH.** If the probe reports incompatible profile-local core packages, back up the manifest named in the daemon diagnostic. Review overrides for `@deepseek-ai/dsh-agent`, `@deepseek-ai/dsh-session`, `@deepseek-ai/dsh-tools`, and `@deepseek-ai/dsh-llm`: use the application-supplied core packages where possible, or align overrides with the installed DSH version. Keep required independent plugins and hooks; do not delete every dependency. Run `dsh --profile multica --probe` again after repairing the profile. Multica reports this confirmed compatibility refusal as requiring manual profile repair and does not overwrite the existing profile.+If the probe says DSH skipped `@multica-ai/dsh-runtime` because its requirements do not match the installed DSH, back up the manifest and update the Multica bridge to a compatible build. Rerun `dsh --profile multica --probe` after updating the bridge.+The daemon registers DeepSeek Harness only after `dsh --profile multica --probe` succeeds. Its `/health` diagnostic distinguishes a missing profile, confirmed manual profile repair, protocol incompatibility, and an unavailable probe. Startup failures include the detected CLI version, manifest location, and redacted diagnostic output when available.</Accordion>diff --git a/apps/docs/content/docs/install-agent-runtime.zh-Hant.mdx b/apps/docs/content/docs/install-agent-runtime.zh-Hant.mdxindex e91fbf3707..72cd9f001e 100644--- a/apps/docs/content/docs/install-agent-runtime.zh-Hant.mdx+++ b/apps/docs/content/docs/install-agent-runtime.zh-Hant.mdx@@ -107,6 +107,8 @@ Multica 當前會檢測以下命令:**升級 DSH 後。** 如果探測指出 profile 中的核心套件不相容,先備份守護程序診斷中列出的設定檔。檢查 `@deepseek-ai/dsh-agent`、`@deepseek-ai/dsh-session`、`@deepseek-ai/dsh-tools` 和 `@deepseek-ai/dsh-llm` 的本機覆寫:盡量使用應用程式內附的核心套件,或讓覆寫版本與已安裝的 DSH 版本一致。保留需要的獨立外掛和鉤子,不要刪除所有相依套件。修復後重新執行 `dsh --profile multica --probe`。Multica 會將這種已確認的相容性拒絕回報為需要手動修復 profile,不會覆寫現有設定。+如果探測指出已安裝的 DSH 不符合 `@multica-ai/dsh-runtime` 的需求而略過載入,請先備份設定檔,再將 Multica 橋接外掛更新至相容的建置版本。更新後重新執行 `dsh --profile multica --probe`。+守護程序只有在 `dsh --profile multica --probe` 成功後才註冊 DeepSeek Harness。`/health` 診斷會區分 profile 缺失、已確認需要手動修復、協定不相容和探測暫時無法使用。啟動失敗時,診斷會包含偵測到的 CLI 版本、設定檔位置,以及可用的已遮蔽敏感資訊輸出。</Accordion>diff --git a/apps/docs/content/docs/install-agent-runtime.zh.mdx b/apps/docs/content/docs/install-agent-runtime.zh.mdxindex f2bdd1bf9f..e46c90885b 100644--- a/apps/docs/content/docs/install-agent-runtime.zh.mdx+++ b/apps/docs/content/docs/install-agent-runtime.zh.mdx@@ -133,6 +133,8 @@ Multica 使用 `amp --execute --stream-json --executor local`,通过标准输**升级 DSH 后。** 如果探测提示 profile 中的核心包不兼容,先备份守护进程诊断中指出的配置文件。检查 `@deepseek-ai/dsh-agent`、`@deepseek-ai/dsh-session`、`@deepseek-ai/dsh-tools` 和 `@deepseek-ai/dsh-llm` 的本地覆盖:尽量使用应用自带的核心包,或让覆盖版本与已安装的 DSH 版本匹配。保留需要的独立插件和钩子,不要删除所有依赖。修复后重新运行 `dsh --profile multica --probe`。Multica 会将这种已确认的兼容性拒绝报告为需要手动修复 profile,不会覆盖现有配置。+如果探测提示已安装的 DSH 不满足 `@multica-ai/dsh-runtime` 的要求并跳过了它,请先备份配置文件,再将 Multica 桥接插件更新到兼容的构建版本。更新后重新运行 `dsh --profile multica --probe`。+守护进程只有在 `dsh --profile multica --probe` 成功后才注册 DeepSeek Harness。`/health` 诊断会区分 profile 缺失、已确认需要手动修复、协议不兼容和探测暂时不可用。启动失败时,诊断会包含检测到的 CLI 版本、配置文件位置,以及可用的脱敏输出。</Accordion>diff --git a/server/internal/daemon/agents_probe.go b/server/internal/daemon/agents_probe.goindex 74783eccd5..cd9a5cd001 100644--- a/server/internal/daemon/agents_probe.go+++ b/server/internal/daemon/agents_probe.go@@ -562,7 +562,13 @@ func probeDshMulticaProfile(ctx context.Context, executablePath string) dshProbevar exitErr *exec.ExitErrorcompleted := runErr == nil || (errors.As(runErr, &exitErr) && exitErr.ProcessState.Exited())if ctx.Err() == nil && completed {- if summary := dshCoreCompatibilitySummary(stderr.String()); summary != "" {+ if summary := dshCompatibilitySummary(stderr.String(), dshBridgeCompatibilityRefusal); summary != "" {+ repairSummary := fmt.Sprintf(+ "%s; back up and inspect %q, update the Multica bridge to a build compatible with the installed DSH, and rerun dsh --profile multica --probe.",+ summary, dshMulticaProfileManifestPath())+ return dshProbeResult{verdict: dshProbeNeedsMigration, repairSummary: repairSummary, detail: repairSummary + " " + detail}+ }+ if summary := dshCompatibilitySummary(stderr.String(), dshCoreCompatibilityRefusal); summary != "" {repairSummary := fmt.Sprintf("%s; back up and inspect %q to align profile-local DSH core dependencies with the application packages, retain required independent plugins, and rerun dsh --profile multica --probe.",summary, dshMulticaProfileManifestPath())diff --git a/server/internal/daemon/dsh_probe_diagnostics.go b/server/internal/daemon/dsh_probe_diagnostics.goindex 746732330d..4999ddfc53 100644--- a/server/internal/daemon/dsh_probe_diagnostics.go+++ b/server/internal/daemon/dsh_probe_diagnostics.go@@ -13,9 +13,14 @@ import (// plugin-compatibility.ts in packages/boot/app-boot/src.var dshCoreCompatibilityRefusal = regexp.MustCompile(`^[^\r\n]*: disabling profile plugin [^\r\n]+: Plugin (@deepseek-ai/dsh-(?:agent|session|tools|llm))@([0-9][0-9A-Za-z.+-]{0,79}) is incompatible with dsh ([0-9][0-9A-Za-z.+-]{0,79}): requirements `)-func dshCoreCompatibilitySummary(stderr string) string {+// DSH v0.2.1-rc.5 reports this when profile loading skips the bundled bridge+// at the plugin peer-requirement check. Match the bridge in both positions;+// a skipped unrelated plugin is not evidence that the Multica bridge failed.+var dshBridgeCompatibilityRefusal = regexp.MustCompile(`^dsh(?:\.exe)?: skipping profile bundle "@multica-ai/dsh-runtime": Error: Plugin (@multica-ai/dsh-runtime)@([0-9][0-9A-Za-z.+-]{0,79}) is incompatible with dsh ([0-9][0-9A-Za-z.+-]{0,79}): requirements `)++func dshCompatibilitySummary(stderr string, refusal *regexp.Regexp) string {for _, line := range strings.Split(stderr, "\n") {- if match := dshCoreCompatibilityRefusal.FindStringSubmatch(strings.TrimSpace(line)); match != nil {+ if match := refusal.FindStringSubmatch(strings.TrimSpace(line)); match != nil {return dshDiagnosticOutput([]byte(fmt.Sprintf("%s@%s is incompatible with DSH %s", match[1], match[2], match[3])))}}diff --git a/server/internal/daemon/dsh_profile_diagnostics_test.go b/server/internal/daemon/dsh_profile_diagnostics_test.goindex 1aa2ac9dc2..c6cea08bb7 100644--- a/server/internal/daemon/dsh_profile_diagnostics_test.go+++ b/server/internal/daemon/dsh_profile_diagnostics_test.go@@ -19,6 +19,8 @@ import (// No actual DSH installation, credentials or model are used by these fixtures.const dshCoreCompatibilityFixture = `dsh: disabling profile plugin row "agents": Plugin @deepseek-ai/[email protected] is incompatible with dsh 0.2.2-rc.3: requirements {"engines.dsh":"0.2.2-rc.1"}.`+const dshBridgeCompatibilityFixture = `dsh: skipping profile bundle "@multica-ai/dsh-runtime": Error: Plugin @multica-ai/[email protected] is incompatible with dsh 0.2.1-rc.5: requirements {"@deepseek-ai/dsh-agent":"^0.1.0-rc.6"}`+func TestProbeBuiltinRuntimeDshRetainsStartupDiagnosis(t *testing.T) {if runtime.GOOS == "windows" {t.Skip("POSIX fake CLI; classification tests are platform independent")@@ -32,6 +34,7 @@ func TestProbeBuiltinRuntimeDshRetainsStartupDiagnosis(t *testing.T) {want builtinProbeVerdict}{{"confirmed core compatibility", dshCoreCompatibilityFixture, builtinProbeProfileMigration},+ {"confirmed bridge compatibility", dshBridgeCompatibilityFixture, builtinProbeProfileMigration},{"unclassified startup failure", "permission denied opening profile cache", builtinProbeUnavailable},} {t.Run(tc.name, func(t *testing.T) {@@ -75,6 +78,14 @@ func TestProbeBuiltinRuntimeDshRetainsStartupDiagnosis(t *testing.T) {t.Errorf("startup reason lost %q: %q", part, reason)}}+ if tc.stderr == dshBridgeCompatibilityFixture {+ if !strings.Contains(reason, "update the Multica bridge to a build compatible with the installed DSH") {+ t.Errorf("missing bridge repair guidance: %q", reason)+ }+ if strings.Contains(reason, "align profile-local DSH core dependencies") {+ t.Errorf("bridge refusal includes unrelated core repair guidance: %q", reason)+ }+ }if tc.want == builtinProbeProfileMigration && !builtinProbeNeedsConfirmation(verdict) {t.Error("profile repair bypassed confirmation")}@@ -106,6 +117,9 @@ func TestDshProfileDiagnosticClassification(t *testing.T) {{"core session", "", strings.ReplaceAll(dshCoreCompatibilityFixture, "dsh-agent", "dsh-session"), 1, false, dshProbeNeedsMigration},{"core tools", "", strings.ReplaceAll(dshCoreCompatibilityFixture, "dsh-agent", "dsh-tools"), 1, false, dshProbeNeedsMigration},{"core llm", "", strings.ReplaceAll(dshCoreCompatibilityFixture, "dsh-agent", "dsh-llm"), 1, false, dshProbeNeedsMigration},+ {"bridge refusal", "", dshBridgeCompatibilityFixture, 1, false, dshProbeNeedsMigration},+ {"unrelated bundle", "", strings.ReplaceAll(dshBridgeCompatibilityFixture, "@multica-ai/dsh-runtime", "@example/optional-plugin"), 1, false, dshProbeUnavailable},+ {"healthy stdout beats bridge warning", healthy, dshBridgeCompatibilityFixture, 1, false, dshProbeOK},{"core refusal exits zero", "", dshCoreCompatibilityFixture, 0, false, dshProbeNeedsMigration},{"optional plugin", "", strings.ReplaceAll(dshCoreCompatibilityFixture, "@deepseek-ai/dsh-agent", "@example/optional-plugin"), 1, false, dshProbeUnavailable},{"incidental incompatibility text", "", "Plugin @deepseek-ai/[email protected] is incompatible with dsh 0.2.2-rc.3", 1, false, dshProbeUnavailable},@@ -162,7 +176,7 @@ func TestProbeBuiltinRuntimeDshRedactsStartupDiagnosis(t *testing.T) {func TestDshCoreCompatibilitySummaryRedactsVersionTokens(t *testing.T) {secret := "sk-" + strings.Repeat("synthetic", 4)line := strings.Replace(dshCoreCompatibilityFixture, "0.2.2-rc.1", "0.2.2-"+secret, 1)- summary := dshCoreCompatibilitySummary(line)+ summary := dshCompatibilitySummary(line, dshCoreCompatibilityRefusal)if summary == "" {t.Fatal("core compatibility refusal was not recognized")}