@foggy-projects/deepseek-harness-plugin 0.4.5-rc.2 → 0.4.5-rc.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
@@ -10,7 +10,11 @@ when the plugin package is upgraded.
10
10
  The Foggy settings tab includes a **Tutorial** entry linking to
11
11
  [Foggy AI Data tutorials](https://ai-data.qlfloor.com/).
12
12
 
13
- The `0.4.5-rc.2` compatibility candidate targets DeepSeek Harness `0.2.2-rc.3`
13
+ The settings page also includes **Uninstall Foggy components**. It stops the
14
+ managed Runtime and removes Foggy's component directory after confirmation. The
15
+ local data directory and the DeepSeek Harness plugin package are preserved.
16
+
17
+ The `0.4.5-rc.4` compatibility candidate targets DeepSeek Harness `0.2.2-rc.3`
14
18
  and requires a system Node.js `>=24.9.0`. Foggy's Java Launcher uses a system
15
19
  Java 17+. Foggy manages its own pinned Python 3.12 runtime
16
20
  inside the per-user component directory; it does not require a system Python,
@@ -20,7 +24,7 @@ modify `PATH`, or register Python globally. Advanced users may explicitly set
20
24
  ## Local release-candidate installation
21
25
 
22
26
  ```powershell
23
- dsh plugin --profile web add --workspace-root ./foggy-projects-deepseek-harness-plugin-0.4.5-rc.2.tgz
27
+ dsh plugin --profile web add --workspace-root ./foggy-projects-deepseek-harness-plugin-0.4.5-rc.4.tgz
24
28
  ```
25
29
 
26
30
  Restart `dsh web`, use the browser it opens (or the complete printed URL,
@@ -31,7 +35,7 @@ After the version is available on npm, install the exact DSH 0.2.2-rc.3
31
35
  compatibility candidate so the stable `beta` channel is not changed:
32
36
 
33
37
  ```powershell
34
- dsh plugin --profile web add --workspace-root @foggy-projects/deepseek-harness-plugin@0.4.5-rc.2
38
+ dsh plugin --profile web add --workspace-root @foggy-projects/deepseek-harness-plugin@0.4.5-rc.4
35
39
  ```
36
40
 
37
41
  DSH 0.2.2 candidates use the `dsh022` npm dist-tag. Check that the tag resolves
@@ -197,13 +201,15 @@ rollback plan.
197
201
  See [`docs/PUBLIC-BETA-READINESS.md`](./docs/PUBLIC-BETA-READINESS.md) for the
198
202
  tested public Beta scope, release gates, and stable-release blockers.
199
203
  Initialization downloads the pinned private Python archive before the CLI,
200
- Launcher, and Skills. Network failures now show the sanitized download URL,
201
- available failing-host and network-code details, and conditional proxy/VPN
202
- guidance. HTTP errors include the response status so users can distinguish a
203
- blocked connection from a missing or denied release asset.
204
+ Launcher, and Skills. Download diagnostics show the sanitized URL, available
205
+ failing-host and network-code details, and specific guidance for HTTPS
206
+ certificate verification failures. They distinguish certificate trust errors
207
+ from blocked connections and HTTP error responses.
204
208
 
205
209
  The current DSH 0.2.2-rc.3 compatibility candidate is documented in
206
- [`docs/RELEASE-CANDIDATE-0.4.5-DSH-0.2.2-RC.2.md`](./docs/RELEASE-CANDIDATE-0.4.5-DSH-0.2.2-RC.2.md).
210
+ [`docs/RELEASE-CANDIDATE-0.4.5-DSH-0.2.2-RC.4.md`](./docs/RELEASE-CANDIDATE-0.4.5-DSH-0.2.2-RC.4.md).
211
+ The previous DSH 0.2.2-rc.3 candidate is documented in
212
+ [`docs/RELEASE-CANDIDATE-0.4.5-DSH-0.2.2-RC.3.md`](./docs/RELEASE-CANDIDATE-0.4.5-DSH-0.2.2-RC.3.md).
207
213
  The previous DSH 0.2.1-rc.2 compatibility candidate is documented in
208
214
  [`docs/RELEASE-CANDIDATE-0.4.4-DSH-0.2.1-RC.1.md`](./docs/RELEASE-CANDIDATE-0.4.4-DSH-0.2.1-RC.1.md).
209
215
  The previous DSH 0.1.7-rc.2 candidate is documented in
@@ -0,0 +1,36 @@
1
+ # Foggy DeepSeek Harness plugin 0.4.5-rc.3
2
+
3
+ This candidate keeps the DeepSeek Harness `0.2.2-rc.3` compatibility target and
4
+ clarifies TLS certificate errors reported during component downloads.
5
+
6
+ An `SSLCertVerificationError` is now described as a certificate trust failure,
7
+ not a generic network connection failure. The message identifies the download
8
+ URL and advises checking the system clock, HTTPS inspection by proxies or
9
+ security software, and the trusted CA chain. For Python downloads it explains
10
+ that `SSL_CERT_FILE` can point to an organization-provided PEM certificate; for
11
+ Node.js downloads it mentions `NODE_EXTRA_CA_CERTS`. It explicitly says that
12
+ changing networks or using a VPN only helps when it avoids the problematic TLS
13
+ inspection, and that certificate verification should not be disabled.
14
+
15
+ Other DNS, timeout, and connection errors continue to show the sanitized
16
+ request URL, available failing host, and network error code. HTTP responses
17
+ continue to display their status separately.
18
+
19
+ The compatibility target remains DeepSeek Harness `0.2.2-rc.3`, with system
20
+ Node.js `>=24.9.0`, Java 17+, managed Python `3.12.13`, Launcher `0.1.46`, CLI
21
+ `0.1.25`, and Foggy Skills `0.1.18`.
22
+
23
+ Install the exact candidate in a clean Harness profile:
24
+
25
+ ```powershell
26
+ dsh plugin --profile web add --workspace-root @foggy-projects/deepseek-harness-plugin@0.4.5-rc.3
27
+ ```
28
+
29
+ For the DSH `0.2.2-rc.3` channel, `@dsh022` points to this candidate after
30
+ publication.
31
+
32
+ ## Verification
33
+
34
+ This document records the source change only. Do not treat the candidate as
35
+ accepted until package and compatibility checks are run on the target Harness
36
+ version and a clean Windows initialization confirms the diagnostic text.
@@ -0,0 +1,35 @@
1
+ # Foggy DeepSeek Harness plugin 0.4.5-rc.4
2
+
3
+ This candidate adds an uninstall action to the Foggy settings page for DeepSeek
4
+ Harness `0.2.2-rc.3`.
5
+
6
+ After the user confirms, the plugin validates the managed installation, stops
7
+ the recorded Foggy Runtime, and removes the managed component directory after
8
+ the stop command succeeds. It keeps the local data directory, including CLI
9
+ profiles and operation records. It also leaves the DeepSeek Harness plugin
10
+ package installed; the user can remove that separately through the Harness
11
+ plugin manager.
12
+
13
+ If the installation cannot be validated, managed Python is unavailable, or the
14
+ Runtime stop command fails, the operation reports a failure and leaves the
15
+ component directory in place. It does not purge local data.
16
+
17
+ The compatibility target remains DeepSeek Harness `0.2.2-rc.3`, with system
18
+ Node.js `>=24.9.0`, Java 17+, managed Python `3.12.13`, Launcher `0.1.46`, CLI
19
+ `0.1.25`, and Foggy Skills `0.1.18`.
20
+
21
+ Install the exact candidate in a clean Harness profile:
22
+
23
+ ```powershell
24
+ dsh plugin --profile web add --workspace-root @foggy-projects/deepseek-harness-plugin@0.4.5-rc.4
25
+ ```
26
+
27
+ For the DSH `0.2.2-rc.3` channel, `@dsh022` points to this candidate after
28
+ publication.
29
+
30
+ ## Verification
31
+
32
+ This candidate has not yet received a clean-machine UI acceptance run. Review
33
+ the uninstall confirmation and verify that the local data directory and Harness
34
+ plugin remain available after removing Foggy components before considering the
35
+ flow accepted.
@@ -3,7 +3,7 @@ set -euo pipefail
3
3
 
4
4
  DSH_VERSION="0.2.2-rc.3"
5
5
  PNPM_VERSION="11.7.0"
6
- PLUGIN_VERSION="0.4.5-rc.2"
6
+ PLUGIN_VERSION="0.4.5-rc.4"
7
7
  PLUGIN_REF="v${PLUGIN_VERSION}"
8
8
  PLUGIN_REPOSITORY="https://github.com/foggy-projects/foggy-deepseek-harness-plugin.git"
9
9
 
package/lib/client.js CHANGED
@@ -56,7 +56,7 @@ window.__ModuleLoader__.load({
56
56
  descriptors: [
57
57
  ...[
58
58
  'status', 'plan', 'initialize', 'initializeAndStart', 'repair', 'updateComponents', 'repairPython', 'repairCli', 'repairLauncher', 'repairAnalysisSkill', 'repairSemanticQuerySkill',
59
- 'migrateProfiles', 'diagnostics', 'runtimeStart', 'runtimeStop',
59
+ 'migrateProfiles', 'diagnostics', 'runtimeStart', 'runtimeStop', 'uninstallComponents',
60
60
  'componentVersions', 'checkComponentVersions',
61
61
  ].map((method) => descriptor(method)),
62
62
  descriptor('useComponentVersion', [{
@@ -160,6 +160,12 @@ window.__ModuleLoader__.load({
160
160
  diagnosticsSaved: '诊断报告已保存',
161
161
  start: '启动 Runtime',
162
162
  stop: '停止 Runtime',
163
+ uninstallComponents: '卸载 Foggy 组件',
164
+ uninstallTitle: '确认卸载 Foggy 组件?',
165
+ uninstallPrompt: '这会先停止 Runtime,再删除托管的 Python、CLI、Launcher、Skills 和组件文件。DeepSeek Harness 插件包仍会保留;如需移除插件,请到 Harness 插件管理器操作。',
166
+ uninstallDataNote: '本地数据目录会保留,包括数据库连接配置、CLI Profiles、操作记录和诊断报告。',
167
+ uninstallConfirm: '确认卸载',
168
+ uninstallCancel: '取消',
163
169
  updateBlockedRunning: 'Runtime 运行中,停止后才能更新组件。',
164
170
  updateReady: '检测到组件更新;可点击“更新并启动”一次完成更新。',
165
171
  updateNone: '所有托管组件均为当前版本。',
@@ -188,6 +194,10 @@ window.__ModuleLoader__.load({
188
194
  progressRuntimeCapabilities: '验证 Runtime 能力',
189
195
  progressRuntimeState: '保存 Runtime 状态',
190
196
  progressRuntimeComplete: 'Runtime 已就绪',
197
+ progressUninstallPreflight: '检查托管组件',
198
+ progressUninstallStop: '停止 Foggy Runtime',
199
+ progressUninstallRemove: '删除托管组件',
200
+ progressUninstallComplete: 'Foggy 组件已卸载,数据已保留',
191
201
  progressFiles: '文件',
192
202
  progressElapsed: '已等待',
193
203
  progressTimeout: '最长',
@@ -334,6 +344,12 @@ window.__ModuleLoader__.load({
334
344
  diagnosticsSaved: 'Diagnostics saved',
335
345
  start: 'Start Runtime',
336
346
  stop: 'Stop Runtime',
347
+ uninstallComponents: 'Uninstall Foggy components',
348
+ uninstallTitle: 'Uninstall Foggy components?',
349
+ uninstallPrompt: 'Runtime will stop first, then managed Python, CLI, Launcher, Skills, and component files will be removed. The DeepSeek Harness plugin package stays installed; remove it in the Harness plugin manager if needed.',
350
+ uninstallDataNote: 'The local data directory stays intact, including database connection settings, CLI profiles, operation records, and diagnostics.',
351
+ uninstallConfirm: 'Confirm uninstall',
352
+ uninstallCancel: 'Cancel',
337
353
  updateBlockedRunning: 'Runtime is running. Stop it before updating components.',
338
354
  updateReady: 'Component updates are available. Use “Update and start” to finish in one step.',
339
355
  updateNone: 'All managed components are up to date.',
@@ -362,6 +378,10 @@ window.__ModuleLoader__.load({
362
378
  progressRuntimeCapabilities: 'Verifying Runtime capabilities',
363
379
  progressRuntimeState: 'Saving Runtime state',
364
380
  progressRuntimeComplete: 'Runtime ready',
381
+ progressUninstallPreflight: 'Checking managed components',
382
+ progressUninstallStop: 'Stopping Foggy Runtime',
383
+ progressUninstallRemove: 'Removing managed components',
384
+ progressUninstallComplete: 'Foggy components uninstalled; data preserved',
365
385
  progressFiles: 'files',
366
386
  progressElapsed: 'elapsed',
367
387
  progressTimeout: 'timeout',
@@ -440,6 +460,8 @@ window.__ModuleLoader__.load({
440
460
  }
441
461
 
442
462
  const css = `
463
+ .foggy-settings .foggy-button-danger{border-color:var(--dsw-alias-state-error-primary);color:var(--dsw-alias-state-error-primary)}.foggy-settings .foggy-button-danger:hover{background:color-mix(in srgb,var(--dsw-alias-state-error-primary) 9%,var(--dsw-alias-bg-layer-1))}.foggy-settings .foggy-button-danger-solid{background:var(--dsw-alias-state-error-primary);color:white}.foggy-settings .foggy-button-danger-solid:hover{background:color-mix(in srgb,var(--dsw-alias-state-error-primary) 82%,black)}
464
+ .foggy-settings .foggy-uninstall-confirm h4{margin:0 0 8px;font-size:14px;color:var(--dsw-alias-state-warning-primary)}.foggy-settings .foggy-uninstall-confirm p{margin:6px 0;color:var(--dsw-alias-label-primary);font-size:13px;line-height:20px}
443
465
  .foggy-settings{width:100%;max-width:820px;color:var(--dsw-alias-label-primary);display:flex;flex-direction:column;gap:16px}
444
466
  .foggy-hero{border:1px solid var(--dsw-alias-border-l2);background:linear-gradient(135deg,color-mix(in srgb,var(--dsw-alias-state-business-primary) 10%,var(--dsw-alias-bg-layer-3)),var(--dsw-alias-bg-layer-3));border-radius:12px;padding:18px}
445
467
  .foggy-title-row{display:flex;align-items:center;gap:10px}.foggy-title-row h3{margin:0;font-size:18px;line-height:26px}.foggy-beta{font-size:11px;padding:2px 7px;border-radius:999px;background:color-mix(in srgb,var(--dsw-alias-state-business-primary) 14%,transparent);color:var(--dsw-alias-state-business-primary)}
@@ -544,12 +566,13 @@ window.__ModuleLoader__.load({
544
566
  }, [api])
545
567
 
546
568
  useEffect(() => {
569
+ if (busy) return undefined
547
570
  let mounted = true
548
571
  const active = () => mounted
549
572
  checkVersions(false, active)
550
573
  const timer = setInterval(() => checkVersions(false, active), 15 * 60 * 1000)
551
574
  return () => { mounted = false; clearInterval(timer) }
552
- }, [checkVersions, status.components?.launcher?.installedVersion, status.components?.cli?.installedVersion])
575
+ }, [busy, checkVersions, status.components?.launcher?.installedVersion, status.components?.cli?.installedVersion])
553
576
 
554
577
  const notices = (Array.isArray(catalog?.warnings) ? catalog.warnings : [])
555
578
  .map((warning) => typeof warning === 'string' ? warning : warning?.message || '')
@@ -641,6 +664,10 @@ window.__ModuleLoader__.load({
641
664
  'runtime-capabilities': 'progressRuntimeCapabilities',
642
665
  'runtime-state': 'progressRuntimeState',
643
666
  'runtime-complete': 'progressRuntimeComplete',
667
+ 'uninstall-preflight': 'progressUninstallPreflight',
668
+ 'uninstall-stop': 'progressUninstallStop',
669
+ 'uninstall-remove': 'progressUninstallRemove',
670
+ 'uninstall-complete': 'progressUninstallComplete',
644
671
  }
645
672
  const phaseKey = phaseKeys[progress.phase]
646
673
  const phase = t(phaseKey || 'progressWorking')
@@ -748,6 +775,7 @@ window.__ModuleLoader__.load({
748
775
  const [portDraft, setPortDraft] = useState('')
749
776
  const [portDirty, setPortDirty] = useState(false)
750
777
  const [sequenceBusy, setSequenceBusy] = useState(false)
778
+ const [uninstallConfirm, setUninstallConfirm] = useState(false)
751
779
 
752
780
  const refresh = useCallback(async () => {
753
781
  setView((current) => ({ ...current, phase: current.status ? 'ready' : 'loading', error: false }))
@@ -933,9 +961,21 @@ window.__ModuleLoader__.load({
933
961
  status.state !== 'not-installed' && !status.running && hasPendingUpdates
934
962
  ? jsx('button', { className: 'foggy-button', type: 'button', disabled: busy, onClick: () => run('updateComponents'), children: t('updateComponents') })
935
963
  : null,
964
+ status.state !== 'not-installed'
965
+ ? jsx('button', { className: 'foggy-button foggy-button-danger', type: 'button', disabled: busy, onClick: () => setUninstallConfirm(true), children: t('uninstallComponents') })
966
+ : null,
936
967
  ] }),
937
968
  ] }),
938
969
  errorPanel(alertTitle, alertMessage, alertHelp),
970
+ uninstallConfirm && status.state !== 'not-installed' ? jsxs('div', { className: 'foggy-warning foggy-uninstall-confirm', role: 'alert', 'aria-labelledby': 'foggy-uninstall-title', children: [
971
+ jsx('h4', { id: 'foggy-uninstall-title', children: t('uninstallTitle') }),
972
+ jsx('p', { children: t('uninstallPrompt') }),
973
+ jsx('p', { children: t('uninstallDataNote') }),
974
+ jsxs('div', { className: 'foggy-section-actions', children: [
975
+ jsx('button', { className: 'foggy-button', type: 'button', disabled: busy, onClick: () => setUninstallConfirm(false), children: t('uninstallCancel') }),
976
+ jsx('button', { className: 'foggy-button foggy-button-danger foggy-button-danger-solid', type: 'button', disabled: busy, onClick: () => { setUninstallConfirm(false); run('uninstallComponents') }, children: t('uninstallConfirm') }),
977
+ ] }),
978
+ ] }) : null,
939
979
  progress,
940
980
  busy ? jsx('p', { className: 'foggy-message', children: t('working') }) : null,
941
981
  !busy && view.message && !view.error && !operationError ? jsx('p', { className: 'foggy-message', children: view.message }) : null,
package/lib/index.js CHANGED
@@ -238,6 +238,8 @@ export class FoggyIntegrationGateway extends TypertRemoteService {
238
238
 
239
239
  operation = null
240
240
  skillProviderControl = null
241
+ componentVersionReadCount = 0
242
+ componentVersionReadWaiters = []
241
243
 
242
244
  constructor(ctx) {
243
245
  super(ctx, 'foggyIntegration')
@@ -263,6 +265,7 @@ export class FoggyIntegrationGateway extends TypertRemoteService {
263
265
  // A completed operation must not be combined with files read before it
264
266
  // completed. Keeping the entry snapshot running guarantees one fresh poll.
265
267
  let operation = operationView(this.operation)
268
+ const uninstalling = operation?.kind === 'uninstall-components' && operation.state === 'running'
266
269
  const roots = defaultRoots()
267
270
  const statePath = join(roots.installRoot, 'install-state.json')
268
271
  const runtimeStatePath = join(roots.dataRoot, 'runtime-state.json')
@@ -272,7 +275,9 @@ export class FoggyIntegrationGateway extends TypertRemoteService {
272
275
  const runtimeSettings = await readRuntimeSettings(roots.dataRoot, {
273
276
  defaultPort: manifest.defaults?.port ?? DEFAULT_RUNTIME_PORT,
274
277
  })
275
- const python = await probePythonRuntime({ installRoot: roots.installRoot, manifest })
278
+ const python = uninstalling
279
+ ? { available: false, source: 'managed', managed: true, path: null, version: null, output: 'Uninstalling managed components' }
280
+ : await probePythonRuntime({ installRoot: roots.installRoot, manifest })
276
281
  const java = compatible(await commandVersion(process.env.JAVA_EXE || 'java', ['-version']), '17.0')
277
282
  let state = null
278
283
  let runtime = null
@@ -282,7 +287,7 @@ export class FoggyIntegrationGateway extends TypertRemoteService {
282
287
  try { lastRuntimePortConflict = await readJson(portConflictPath) } catch {}
283
288
  let onboarding = { success: true, profiles: [], profileCount: 0 }
284
289
  let profileMigration = { success: true, entries: [], pendingCount: 0, conflictCount: 0, profileStore: roots.profileStore }
285
- if (state) {
290
+ if (state && !uninstalling) {
286
291
  try { onboarding = await runOnboarding(['onboard-list']) } catch (error) {
287
292
  onboarding = { success: false, profiles: [], profileCount: 0, error: String(error.message ?? error) }
288
293
  }
@@ -430,13 +435,43 @@ export class FoggyIntegrationGateway extends TypertRemoteService {
430
435
  }
431
436
 
432
437
  async componentVersions() {
433
- const roots = defaultRoots()
434
- return componentVersions({ roots, bundled: await readJson(versionsFile), state: await readOptionalJson(join(roots.installRoot, 'install-state.json')) })
438
+ return this.readComponentVersions(false)
435
439
  }
436
440
 
437
441
  async checkComponentVersions() {
438
- const roots = defaultRoots()
439
- return componentVersions({ roots, bundled: await readJson(versionsFile), state: await readOptionalJson(join(roots.installRoot, 'install-state.json')), force: true })
442
+ return this.readComponentVersions(true)
443
+ }
444
+
445
+ async readComponentVersions(force) {
446
+ if (this.operation?.kind === 'uninstall-components' && this.operation.state === 'running') {
447
+ return {
448
+ checkedAt: null,
449
+ stale: true,
450
+ error: { code: 'FOGGY_UNINSTALL_IN_PROGRESS', message: 'Component versions are unavailable while Foggy is being uninstalled.' },
451
+ components: { launcher: { releases: [] }, cli: { releases: [] } },
452
+ warnings: [],
453
+ }
454
+ }
455
+ this.componentVersionReadCount += 1
456
+ try {
457
+ const roots = defaultRoots()
458
+ return await componentVersions({
459
+ roots,
460
+ bundled: await readJson(versionsFile),
461
+ state: await readOptionalJson(join(roots.installRoot, 'install-state.json')),
462
+ force,
463
+ })
464
+ } finally {
465
+ this.componentVersionReadCount -= 1
466
+ if (this.componentVersionReadCount === 0) {
467
+ for (const resolveWaiter of this.componentVersionReadWaiters.splice(0)) resolveWaiter()
468
+ }
469
+ }
470
+ }
471
+
472
+ async waitForComponentVersionReads() {
473
+ if (this.componentVersionReadCount === 0) return
474
+ await new Promise((resolveWaiter) => this.componentVersionReadWaiters.push(resolveWaiter))
440
475
  }
441
476
 
442
477
  async useComponentVersion(input) {
@@ -625,6 +660,62 @@ export class FoggyIntegrationGateway extends TypertRemoteService {
625
660
  ])
626
661
  }
627
662
 
663
+ async uninstallComponents() {
664
+ const roots = defaultRoots()
665
+ if (!await readOptionalJson(join(roots.installRoot, 'install-state.json'))) {
666
+ return {
667
+ success: false,
668
+ accepted: false,
669
+ error: { code: 'FOGGY_NOT_INITIALIZED', message: 'There are no managed Foggy components to uninstall.' },
670
+ }
671
+ }
672
+ const manifest = await readJson(versionsFile)
673
+ return this.startOperation('uninstall-components', false, ['uninstall-components'], async ({ operation, progressPath }) => {
674
+ await this.waitForComponentVersionReads()
675
+ const updateProgress = async (phase, message, percent) => {
676
+ operation.progress = {
677
+ ...operation.progress,
678
+ phase,
679
+ message,
680
+ percent,
681
+ updatedAt: new Date().toISOString(),
682
+ }
683
+ await writeJsonAtomic(progressPath, operation.progress)
684
+ }
685
+
686
+ await updateProgress('uninstall-preflight', 'Checking the managed Foggy installation', 5)
687
+ const plan = await runOnboarding(['uninstall', '--dry-run', '--install-root', roots.installRoot], 60_000, {
688
+ manifest,
689
+ ensurePython: false,
690
+ })
691
+ if (plan.success === false) return plan
692
+ const dataRoot = plan.plan?.dataRoot
693
+ if (typeof dataRoot !== 'string' || !dataRoot) {
694
+ return {
695
+ success: false,
696
+ error: { code: 'FOGGY_UNINSTALL_PLAN_INVALID', message: 'The managed installation did not provide a valid local data directory; nothing was removed.' },
697
+ }
698
+ }
699
+
700
+ await updateProgress('uninstall-stop', 'Stopping Foggy Runtime', 25)
701
+ const stopped = await runOnboarding([
702
+ 'runtime-stop', '--install-root', roots.installRoot, '--data-root', dataRoot,
703
+ ], 60_000, { manifest, ensurePython: false })
704
+ if (stopped.success === false) return stopped
705
+
706
+ await updateProgress('uninstall-remove', 'Removing managed Foggy components; preserving local data', 65)
707
+ await rm(roots.installRoot, { recursive: true, force: false, maxRetries: 5, retryDelay: 200 })
708
+ await updateProgress('uninstall-complete', 'Foggy components were uninstalled; local data was preserved', 100)
709
+ return {
710
+ success: true,
711
+ schemaVersion: 'foggy-deepseek-harness-uninstall/v1',
712
+ stopped: stopped.action,
713
+ removedInstallRoot: roots.installRoot,
714
+ preservedDataRoot: dataRoot,
715
+ }
716
+ })
717
+ }
718
+
628
719
  async saveRuntimeSettings(input) {
629
720
  const roots = defaultRoots()
630
721
  if (this.operation?.state === 'running') {
@@ -680,11 +771,13 @@ export class FoggyIntegrationGateway extends TypertRemoteService {
680
771
  operationId: id,
681
772
  kind,
682
773
  state: 'running',
683
- phase: 'preflight',
684
- message: runtimeStart ? 'Starting Foggy Runtime' : 'Starting Foggy initialization',
774
+ phase: kind === 'uninstall-components' ? 'uninstall-preflight' : 'preflight',
775
+ message: kind === 'uninstall-components'
776
+ ? 'Preparing to uninstall managed Foggy components'
777
+ : runtimeStart ? 'Starting Foggy Runtime' : 'Starting Foggy initialization',
685
778
  currentFile: null,
686
779
  percent: 0,
687
- step: { index: 1, total: runtimeStart ? 6 : 7 },
780
+ step: { index: 1, total: kind === 'uninstall-components' ? 3 : runtimeStart ? 6 : 7 },
688
781
  } : null,
689
782
  promise: null,
690
783
  }
@@ -714,10 +807,16 @@ export class FoggyIntegrationGateway extends TypertRemoteService {
714
807
  operation.progress = {
715
808
  ...operation.progress,
716
809
  state: operation.state,
717
- phase: operation.state === 'succeeded' ? (runtimeStart ? 'runtime-complete' : 'complete') : operation.progress.phase,
810
+ phase: operation.state === 'succeeded'
811
+ ? kind === 'uninstall-components' ? 'uninstall-complete' : runtimeStart ? 'runtime-complete' : 'complete'
812
+ : operation.progress.phase,
718
813
  message: operation.state === 'succeeded'
719
- ? (runtimeStart ? 'Foggy Runtime is ready' : 'Foggy initialization completed')
720
- : (runtimeStart ? 'Foggy Runtime startup failed' : 'Foggy initialization failed'),
814
+ ? kind === 'uninstall-components'
815
+ ? 'Foggy components were uninstalled; local data was preserved'
816
+ : runtimeStart ? 'Foggy Runtime is ready' : 'Foggy initialization completed'
817
+ : kind === 'uninstall-components'
818
+ ? 'Foggy component uninstall failed'
819
+ : runtimeStart ? 'Foggy Runtime startup failed' : 'Foggy initialization failed',
721
820
  percent: operation.state === 'succeeded' ? 100 : operation.progress.percent,
722
821
  }
723
822
  }
@@ -731,7 +830,9 @@ export class FoggyIntegrationGateway extends TypertRemoteService {
731
830
  operation.progress = {
732
831
  ...operation.progress,
733
832
  state: 'failed',
734
- message: runtimeStart ? 'Foggy Runtime startup failed' : 'Foggy initialization failed',
833
+ message: kind === 'uninstall-components'
834
+ ? 'Foggy component uninstall failed'
835
+ : runtimeStart ? 'Foggy Runtime startup failed' : 'Foggy initialization failed',
735
836
  }
736
837
  }
737
838
  })
@@ -743,7 +844,7 @@ export class FoggyIntegrationGateway extends TypertRemoteService {
743
844
  const markerInitializers = []
744
845
  for (const method of [
745
846
  'status', 'plan', 'initialize', 'initializeAndStart', 'repair', 'updateComponents', 'repairPython', 'repairCli', 'repairLauncher', 'repairAnalysisSkill', 'repairSemanticQuerySkill',
746
- 'migrateProfiles', 'diagnostics', 'runtimeStart', 'runtimeStop',
847
+ 'migrateProfiles', 'diagnostics', 'runtimeStart', 'runtimeStop', 'uninstallComponents',
747
848
  'saveRuntimeSettings',
748
849
  'createViewerPreview',
749
850
  'componentVersions', 'checkComponentVersions', 'useComponentVersion',
@@ -21,12 +21,16 @@ function networkDetails(error) {
21
21
  let current = error
22
22
  let code = null
23
23
  let host = null
24
+ let certificateVerification = false
24
25
  while (current && typeof current === 'object' && !seen.has(current)) {
25
26
  seen.add(current)
26
27
  const candidateCode = current.code ?? current.errno
27
28
  if (!code && (typeof candidateCode === 'string' || typeof candidateCode === 'number')) {
28
29
  code = String(candidateCode).slice(0, 80)
29
30
  }
31
+ if (/SSLCertVerificationError|CERTIFICATE_VERIFY|CERT_HAS_EXPIRED|SELF_SIGNED_CERT|UNABLE_TO_VERIFY|ERR_TLS_CERT_ALTNAME_INVALID|self[- ]signed|certificate.*(?:verify|chain|expired|authority|altname)|unable to verify/i.test(`${current.name ?? ''} ${current.code ?? ''} ${current.message ?? ''}`)) {
32
+ certificateVerification = true
33
+ }
30
34
  if (!host) host = parsedHost(current.hostname) ?? parsedHost(current.host)
31
35
  if (!host && typeof current.message === 'string') {
32
36
  host = current.message.match(/(?:ENOTFOUND|getaddrinfo|name or service not known)\s+([a-z0-9.-]+\.[a-z]{2,})/i)?.[1] ?? null
@@ -34,17 +38,20 @@ function networkDetails(error) {
34
38
  current = current.cause
35
39
  }
36
40
  if (!code && error?.name === 'AbortError') code = 'TIMEOUT'
37
- return { code: code ?? 'FETCH_FAILED', host }
41
+ return { code: code ?? 'FETCH_FAILED', host, certificateVerification }
38
42
  }
39
43
 
40
44
  export function networkFailureMessage(action, value, error) {
41
45
  const target = safeNetworkUrl(value)
42
46
  const targetHost = parsedHost(target)
43
- const { code, host } = networkDetails(error)
47
+ const { code, host, certificateVerification } = networkDetails(error)
44
48
  const failedHost = host ?? targetHost ?? 'the requested host'
45
49
  const redirect = host && targetHost && host !== targetHost
46
50
  ? `检测到连接失败主机:${host}。`
47
51
  : ''
52
+ if (certificateVerification) {
53
+ return `${action}失败。请求地址:${target}。${redirect}HTTPS 证书校验失败(${code}):客户端收到了证书,但无法验证证书链。请检查系统日期/时间,以及代理或杀毒软件是否在检查 HTTPS;需要时将可信根证书正确加入系统证书库,Node.js 也可用 NODE_EXTRA_CA_CERTS 指定 PEM 证书。只有切换网络/VPN 能避开错误的 HTTPS 检查时才有帮助;不要关闭证书校验。`
54
+ }
48
55
  return `${action}失败。请求地址:${target}。${redirect}网络错误码:${code}。请检查网络、代理和防火墙是否允许访问 ${failedHost};如果当前网络限制 GitHub,可能需要配置代理/VPN 或切换到可访问该域名的网络。`
49
56
  }
50
57
 
@@ -59,6 +59,7 @@ export const descriptors = [
59
59
  descriptor('diagnostics'),
60
60
  descriptor('runtimeStart'),
61
61
  descriptor('runtimeStop'),
62
+ descriptor('uninstallComponents'),
62
63
  descriptor('saveRuntimeSettings', [{
63
64
  name: 'input',
64
65
  wire: 'input',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foggy-projects/deepseek-harness-plugin",
3
- "version": "0.4.5-rc.2",
3
+ "version": "0.4.5-rc.4",
4
4
  "description": "Foggy Java data analysis engine integration for DeepSeek Harness",
5
5
  "keywords": [
6
6
  "deepseek-harness",
@@ -52,7 +52,9 @@
52
52
  "docs/RELEASE-CANDIDATE-0.4.3-DSH-0.2.0-RC.1.md",
53
53
  "docs/RELEASE-CANDIDATE-0.4.4-DSH-0.2.1-RC.1.md",
54
54
  "docs/RELEASE-CANDIDATE-0.4.5-DSH-0.2.2-RC.1.md",
55
- "docs/RELEASE-CANDIDATE-0.4.5-DSH-0.2.2-RC.2.md"
55
+ "docs/RELEASE-CANDIDATE-0.4.5-DSH-0.2.2-RC.2.md",
56
+ "docs/RELEASE-CANDIDATE-0.4.5-DSH-0.2.2-RC.3.md",
57
+ "docs/RELEASE-CANDIDATE-0.4.5-DSH-0.2.2-RC.4.md"
56
58
  ],
57
59
  "license": "Apache-2.0",
58
60
  "engines": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": "foggy-deepseek-onboarding-versions/v1",
3
- "packageVersion": "0.4.5-rc.2",
4
- "validatedAt": "2026-11-15",
3
+ "packageVersion": "0.4.5-rc.4",
4
+ "validatedAt": "2026-11-16",
5
5
  "components": {
6
6
  "deepseekHarness": {
7
7
  "version": "0.2.2-rc.3",
@@ -15,6 +15,7 @@ import re
15
15
  import shutil
16
16
  import signal
17
17
  import socket
18
+ import ssl
18
19
  import subprocess
19
20
  import sys
20
21
  import tempfile
@@ -534,6 +535,21 @@ def download_network_error(asset: dict, url: str, error: BaseException) -> str:
534
535
  error_kind += f" ({code})"
535
536
  redirect = f" 实际失败地址(跳转后):{failed_url}。" if failed_url != original_url else ""
536
537
  host = urlsplit(failed_url).hostname or urlsplit(original_url).hostname or "目标域名"
538
+ certificate_failure = (
539
+ isinstance(reason, ssl.SSLCertVerificationError)
540
+ or getattr(reason, "verify_code", None) is not None
541
+ or "CERTIFICATE_VERIFY_FAILED" in str(reason).upper()
542
+ )
543
+ if certificate_failure:
544
+ verify_code = getattr(reason, "verify_code", None)
545
+ verify_detail = f"(verify code {verify_code})" if verify_code is not None else ""
546
+ return (
547
+ f"下载组件文件 {asset.get('file', 'asset')} 失败:HTTPS 证书校验失败。"
548
+ f"下载地址:{original_url}。{redirect}错误:SSLCertVerificationError{verify_detail}。"
549
+ f"客户端收到了 {host} 提供的证书,但无法验证其证书链。这通常与 DNS 或网络不通不同。"
550
+ "请检查系统日期/时间,以及代理或杀毒软件是否检查 HTTPS;必要时将可信根证书加入 Windows 受信任根证书,"
551
+ "或设置 SSL_CERT_FILE 指向该 CA 的 PEM 文件。代理/VPN 只有在能避开有问题的 HTTPS 检查时才可能有帮助;请勿关闭证书校验。"
552
+ )
537
553
  return (
538
554
  f"下载组件文件 {asset.get('file', 'asset')} 失败,无法连接下载服务。"
539
555
  f"下载地址:{original_url}。{redirect}连接错误:{error_kind}。"
@@ -605,7 +621,7 @@ def materialize(
605
621
  urllib.request.urlretrieve(asset["url"], temporary, reporthook=reporthook)
606
622
  except urllib.error.HTTPError as exc:
607
623
  raise OnboardingError(download_http_error(asset, asset["url"], exc)) from exc
608
- except (urllib.error.URLError, TimeoutError, ConnectionError, http.client.HTTPException) as exc:
624
+ except (urllib.error.URLError, ssl.SSLError, TimeoutError, ConnectionError, http.client.HTTPException) as exc:
609
625
  raise OnboardingError(download_network_error(asset, asset["url"], exc)) from exc
610
626
  source = "network"
611
627
  verify_asset(temporary, asset["sha256"])