From ca91031fd02f4210d4215969ed803e0f874297eb Mon Sep 17 00:00:00 2001 From: oliver Date: Fri, 4 Sep 2026 22:51:50 +0800 Subject: [PATCH] Register settings via installSettingsSection for shipped dsh. SettingsProvider.installSection is not on 0.1.1-rc.2; without the standalone helper the netxops namespace never appears on the Plugins tab. Co-authored-by: Cursor --- lib/index.js | 17 ++++++++--------- package.json | 2 +- src/index.ts | 20 +++++++++++--------- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/lib/index.js b/lib/index.js index 1d2ff51..ba51575 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,6 +1,7 @@ // src/index.ts import z from "@deepseek-ai/schemastery"; import { credentialRef } from "@deepseek-ai/dsh-credentials"; +import { installSettingsSection } from "@deepseek-ai/dsh-settings"; import * as McpClient from "@deepseek-ai/dsh-mcp-client"; var name = "netxops"; var inject = ["tools"]; @@ -69,15 +70,13 @@ function apply(ctx, config = Config2({})) { }); }; remount(); - ctx.inject(["settings"], (settingsCtx) => { - settingsCtx.settings.installSection(ctx, NETXOPS_SETTINGS_NAMESPACE, Config2, config, { - setSource: (current) => { - source = current; - }, - onChange: () => { - remount(); - } - }); + installSettingsSection(ctx, NETXOPS_SETTINGS_NAMESPACE, Config2, config, { + setSource: (current) => { + source = current; + }, + onChange: () => { + remount(); + } }); ctx.on("credentials/reference-updated", (ref) => { if (String(ref) === source().tokenCredentialRef) diff --git a/package.json b/package.json index ca2d43b..776d8fe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dsh-netxops", - "version": "0.1.8", + "version": "0.1.9", "description": "DeepSeek Harness Netx Ops: host bridge + Plugins settings card + agent preset", "license": "MIT", "type": "module", diff --git a/src/index.ts b/src/index.ts index d8455fc..c0707d3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -13,6 +13,7 @@ import type { Context, Fiber } from '@deepseek-ai/cordis' import z from '@deepseek-ai/schemastery' import { credentialRef } from '@deepseek-ai/dsh-credentials' import type {} from '@deepseek-ai/dsh-credentials' +import { installSettingsSection } from '@deepseek-ai/dsh-settings' import type {} from '@deepseek-ai/dsh-settings' import * as McpClient from '@deepseek-ai/dsh-mcp-client' @@ -118,15 +119,16 @@ export function apply(ctx: Context, config: Config = Config({})): void { // Composition defaults first (works even when settings provider is absent). remount() - ctx.inject(['settings'], (settingsCtx) => { - settingsCtx.settings.installSection(ctx, NETXOPS_SETTINGS_NAMESPACE, Config, config, { - setSource: (current) => { - source = current - }, - onChange: () => { - remount() - }, - }) + // Shipped dsh 0.1.1-rc.2 exports the standalone helper; SettingsProvider has + // no `.installSection` method there. Newer cookbooks moved it onto the + // provider — keep the helper call so the Plugins tab can see `netxops`. + installSettingsSection(ctx, NETXOPS_SETTINGS_NAMESPACE, Config, config, { + setSource: (current) => { + source = current + }, + onChange: () => { + remount() + }, }) ctx.on('credentials/reference-updated', (ref) => {