dsh-error-atlas 0.11.1 → 0.11.2

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
@@ -87,6 +87,14 @@ DSH 报过的错、踩过的坑,默认会随会话结束消失。这个插件
87
87
 
88
88
  市场安装:在 DSH 插件市场搜索 `error-atlas` / `错误星图`。
89
89
 
90
+ 从 npm 安装(推荐,装最新版):
91
+
92
+ ```
93
+ plugin_manager install_bundle target="dsh-error-atlas"
94
+ ```
95
+
96
+ 指定版本:`target="dsh-error-atlas@0.11.2"`。
97
+
90
98
  本地目录安装(开发用):
91
99
 
92
100
  ```
@@ -118,6 +126,12 @@ node bin/atlas-retro.mjs --upgrade <id> --lesson "…" # 升级/改写某条
118
126
  node bin/atlas-retro.mjs --new --title "…" --lesson "…" # 手写一条复盘
119
127
  ```
120
128
 
129
+ 不想先装包也能跑(npx 直接从 npm 拉):
130
+
131
+ ```
132
+ npx -y -p dsh-error-atlas atlas-digest
133
+ ```
134
+
121
135
  `atlas-retro` 优先通过宿主路由写入(`POST /error-atlas/retro`,仅回环可访问);宿主不在时退化为直接改库文件并给出警告。
122
136
 
123
137
  ## 数据与隐私
@@ -88,8 +88,35 @@ const storePath =
88
88
  const topN = Number(opt('top', '6'))
89
89
 
90
90
  if (!existsSync(storePath)) {
91
- console.error('atlas-digest: no store at ' + storePath)
92
- process.exit(2)
91
+ // A fresh install has nothing to summarise yet: that is a state, not a failure.
92
+ if (wantJson) {
93
+ console.log(
94
+ JSON.stringify(
95
+ {
96
+ store: storePath,
97
+ version: null,
98
+ errors: 0,
99
+ hits: 0,
100
+ retros: 0,
101
+ modelRetros: 0,
102
+ autoRetros: 0,
103
+ staleLessons: 0,
104
+ stale: [],
105
+ top: [],
106
+ recent: [],
107
+ empty: true,
108
+ },
109
+ null,
110
+ 2,
111
+ ),
112
+ )
113
+ process.exit(0)
114
+ }
115
+ console.log('')
116
+ console.log(' ERROR ATLAS · digest')
117
+ console.log(' ' + storePath)
118
+ console.log(' nothing recorded yet — install the plugin in DSH, do a coding task, then run again.')
119
+ process.exit(0)
93
120
  }
94
121
 
95
122
  // Tolerate a BOM: hand-edited stores written by PowerShell often carry one.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-error-atlas",
3
- "version": "0.11.1",
3
+ "version": "0.11.2",
4
4
  "type": "module",
5
5
  "description": "Records runtime errors and coding-task retrospectives, and renders them as an interactive GPU knowledge graph (WebGL) with lesson links, recurrence flags, program hubs, search, activity trends, and a caption switch.",
6
6
  "icon": "icon.svg",