@civilization/deepseek-harness-skill-mcp 0.1.3 → 0.1.4

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
@@ -98,6 +98,8 @@ HTTP 示例:
98
98
 
99
99
  当前版本不接受 `env`、认证 header、带凭据或 token 查询参数的 URL。请勿把密钥放进工具参数、MCP 地址或提交到仓库。
100
100
 
101
+ MCP 对端离线、命令启动失败或首次工具发现失败不会阻止 DSH 启动。默认重连策略会在后台重试;设置页在连接恢复并发现工具后更新状态。插件加载时也会把旧版本写入的严格启动配置迁移为非致命启动策略。
102
+
101
103
  ## Agent 工具
102
104
 
103
105
  | 工具 | 作用 |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@civilization/deepseek-harness-skill-mcp",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Skill path and MCP server management for DeepSeek Harness Web",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
package/src/index.js CHANGED
@@ -20,7 +20,7 @@ const output = {
20
20
  export async function apply(ctx, config) {
21
21
  const home = process.env.DSH_HOME || join(homedir(), '.dsh')
22
22
  const store = new ExtensionStore(config.patchPath || join(home, 'profiles', 'web', 'cordis.patch.yml'))
23
- await store.read()
23
+ await store.ensureNonFatalMcpStartup()
24
24
  ctx.inject(['connection'], web => {
25
25
  web.connection.rpc.handle('/extensions', createWebHandler(store, ctx))
26
26
  })
package/src/store.js CHANGED
@@ -113,6 +113,17 @@ export class ExtensionStore {
113
113
  return markedRows(content)?.rows ?? legacyPatch(content)?.managed ?? []
114
114
  }
115
115
 
116
+ /** Migrate managed MCP rows so an unavailable server cannot reject profile startup. */
117
+ async ensureNonFatalMcpStartup() {
118
+ const rows = await this.read()
119
+ if (!rows.some(row => row.config.serverName && row.config.failOnStartupError !== false)) return
120
+ await this.update(current => {
121
+ for (const row of current) {
122
+ if (row.config.serverName) row.config.failOnStartupError = false
123
+ }
124
+ })
125
+ }
126
+
116
127
  async update(change, signal, expectedRevision) {
117
128
  signal?.throwIfAborted()
118
129
  const lockPath = `${this.path}.lock`
@@ -178,7 +189,7 @@ export class ExtensionStore {
178
189
  command: typeof input.command === 'string' ? normalizeWindowsPath(input.command) : input.command,
179
190
  cwd: typeof input.cwd === 'string' && input.cwd ? normalizeWindowsPath(input.cwd) : input.cwd,
180
191
  } : input
181
- const config = McpConfig({ ...normalized, serverName: id, failOnStartupError: true })
192
+ const config = McpConfig({ ...normalized, serverName: id, failOnStartupError: false })
182
193
  if (config.transport === 'streamable-http') {
183
194
  const url = new URL(config.url)
184
195
  if (!['http:', 'https:'].includes(url.protocol) || url.username || url.password || url.search || url.hash) throw new Error('Use an HTTP(S) endpoint without credentials, query or fragment.')