dsh-arcvista 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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.4
4
+
5
+ - DSH 插件启动时清理旧版独立模型配置,不再在 SQLite 中保留旧 API Key。
6
+
3
7
  ## 0.1.3
4
8
 
5
9
  - 健康检查与设置页现在报告实际使用的 SQLite 数据目录和包版本。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-arcvista",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "ArcVista 观界 —— DSH 内的架构观测台:架构图、安全守护、业务知识图谱、复杂度与分支风险对比",
package/server.js CHANGED
@@ -33,6 +33,15 @@ const HOST = process.env.HOST || '127.0.0.1';
33
33
  */
34
34
  export function createArcVistaApp({ dataDir = DATA_DIR, publicDir = PUBLIC_DIR, backupDir = null, llm = null } = {}) {
35
35
  const store = openDatabase(dataDir, backupDir ? { backupDir } : {});
36
+ // DSH manages the model. Remove legacy standalone model settings (including
37
+ // any old API key) so upgrading to the plugin cannot retain a stale secret.
38
+ if (llm?.provider === 'dsh') {
39
+ try {
40
+ store.db.prepare("DELETE FROM settings WHERE key LIKE 'llm_%'").run();
41
+ } catch {
42
+ /* best-effort cleanup for old databases */
43
+ }
44
+ }
36
45
  const git = new GitStore(dataDir);
37
46
  const jobs = new JobRunner(store);
38
47
  const interruptedJobs = store.jobs.interruptActive();