@foggy-projects/deepseek-harness-plugin 0.4.5-rc.3 → 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 +9 -3
- package/docs/RELEASE-CANDIDATE-0.4.5-DSH-0.2.2-RC.4.md +35 -0
- package/experience/linux/prepare.sh +1 -1
- package/lib/client.js +42 -2
- package/lib/index.js +115 -14
- package/lib/remote-descriptor.js +1 -0
- package/package.json +3 -2
- package/skills/foggy-deepseek-onboarding/assets/versions.json +2 -2
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
|
|
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.
|
|
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.
|
|
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
|
|
@@ -203,6 +207,8 @@ certificate verification failures. They distinguish certificate trust errors
|
|
|
203
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
|
|
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
|
|
206
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).
|
|
@@ -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.
|
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 =
|
|
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
|
-
|
|
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
|
-
|
|
439
|
-
|
|
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:
|
|
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'
|
|
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
|
-
?
|
|
720
|
-
|
|
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:
|
|
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',
|
package/lib/remote-descriptor.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foggy-projects/deepseek-harness-plugin",
|
|
3
|
-
"version": "0.4.5-rc.
|
|
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",
|
|
@@ -53,7 +53,8 @@
|
|
|
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
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"
|
|
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"
|
|
57
58
|
],
|
|
58
59
|
"license": "Apache-2.0",
|
|
59
60
|
"engines": {
|