weflow-cli 1.6.0 → 1.6.1

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
@@ -4,11 +4,22 @@ The npm package is published separately from GitHub. It may lag behind the `mast
4
4
 
5
5
  All notable user-facing changes are recorded here. This project follows [Semantic Versioning](https://semver.org/).
6
6
 
7
+ ## 1.6.1
8
+
9
+ ### Fixed
10
+
11
+ - Report the real version from `--version` and `capabilities`. The version was a literal in the CLI source and `npm version` only rewrites `package.json`, so the 1.6.0 package announced itself as `1.5.1` - which made a user's bug report impossible to tell apart from a stale install, and took a clean install to disprove.
12
+ - Keep the discovered database list when the NT scan cannot read WeChat's memory. `nt_decrypt.py scan` returned early on "Weixin.exe 未运行" *before* walking the filesystem, and the caller discarded the whole result on any error. The passphrase-derivation path - the correct one for current WeChat, and one that needs only the file list - therefore never ran, so a run that had already captured the passphrase still ended with no usable keys and `sessions` reported "WCDB 初始化失败: -1006".
13
+
14
+ ### Documentation
15
+
16
+ - Added `docs/RELEASING.md`: versioning rules, the pre-publish check for local media and keys, npm credentials with 2FA, and the China-mirror sync step that otherwise leaves users unable to install a fresh release.
17
+
7
18
  ## 1.6.0
8
19
 
9
20
  ### Documentation
10
21
 
11
- - Synchronized setup, operations, architecture, security, MCP, and maintenance guidance with the current `1.6.0` source baseline.
22
+ - Synchronized setup, operations, architecture, security, MCP, and maintenance guidance with the current `1.6.1` source baseline.
12
23
  - Clarified source-versus-npm version drift, no-AI daily runs, staged data-directory discovery, media-export limitations, and local-data privacy boundaries.
13
24
  - Replaced the outdated architecture image with a GPT-image-2 diagram covering current CLI, MCP, service, workflow, data, and privacy boundaries.
14
25
 
package/README.md CHANGED
@@ -321,6 +321,7 @@ python scripts/fav_server.py --date YYYY-MM-DD
321
321
  - [项目维护状态](./docs/PROJECT_STATE.md):当前能力、限制、优先级与交接入口。
322
322
  - [技术决策记录](./docs/DECISIONS.md):长期维护中的关键设计取舍。
323
323
  - [分支与合并记录](./docs/BRANCHES.md):分支用途、合并时间线与并行开发的对齐约定。
324
+ - [发布清单](./docs/RELEASING.md):版本号、打包敏感内容检查、npm 凭据、国内镜像同步。
324
325
  - [电子数据证据指南](./docs/EVIDENCE_GUIDE.md):证据保全、法律边界与使用注意事项。
325
326
  - [贡献指南](./CONTRIBUTING.md) 与 [安全策略](./SECURITY.md):开发、反馈和敏感问题处理。
326
327
  - [变更记录](./CHANGELOG.md):版本更新摘要。
package/bin/weflow-cli.ts CHANGED
@@ -28,6 +28,26 @@ function resolvePackageRoot(): string {
28
28
  return resolvePackageRootFrom(import.meta.url)
29
29
  }
30
30
 
31
+ /**
32
+ * Version reported by `--version` and `capabilities`.
33
+ *
34
+ * Read from package.json instead of written here. A literal has to be updated
35
+ * by hand on every release, and when that is forgotten `--version` lies about
36
+ * what is installed - which is exactly what happened: the 1.6.0 package
37
+ * shipped a hardcoded `1.5.1`, so a user's bug report could not be told apart
38
+ * from a stale install, and diagnosing it needed a clean install to disprove.
39
+ */
40
+ function resolveCliVersion(): string {
41
+ try {
42
+ const pkg = JSON.parse(readFileSync(join(resolvePackageRoot(), 'package.json'), 'utf8'))
43
+ return String(pkg.version || '0.0.0')
44
+ } catch {
45
+ return '0.0.0'
46
+ }
47
+ }
48
+
49
+ const CLI_VERSION = resolveCliVersion()
50
+
31
51
  function pythonProcessEnv(apiKey?: string, variable = 'DEEPSEEK_API_KEY'): NodeJS.ProcessEnv {
32
52
  return createPythonProcessEnv(apiKey ? { [variable]: apiKey } : {})
33
53
  }
@@ -247,7 +267,7 @@ async function resolveTalker(input: string, quiet = false, nonInteractive = fals
247
267
  program
248
268
  .name('weflow-cli')
249
269
  .description('WeFlow CLI - 微信聊天记录命令行查询与导出工具')
250
- .version('1.5.1')
270
+ .version(CLI_VERSION)
251
271
 
252
272
  program
253
273
  .command('capabilities')
@@ -256,7 +276,7 @@ program
256
276
  .action((opts) => {
257
277
  const data = {
258
278
  schema: 'weflow-capabilities/v1',
259
- version: '1.5.1',
279
+ version: CLI_VERSION,
260
280
  read: {
261
281
  sessions: { cli: 'sessions --json', mcp: 'wechat.list_sessions' },
262
282
  messages: { cli: 'messages <talker> --json', mcp: 'wechat.export_messages' },
@@ -24,6 +24,25 @@ const program = new Command();
24
24
  function resolvePackageRoot() {
25
25
  return resolvePackageRootFrom(import.meta.url);
26
26
  }
27
+ /**
28
+ * Version reported by `--version` and `capabilities`.
29
+ *
30
+ * Read from package.json instead of written here. A literal has to be updated
31
+ * by hand on every release, and when that is forgotten `--version` lies about
32
+ * what is installed - which is exactly what happened: the 1.6.0 package
33
+ * shipped a hardcoded `1.5.1`, so a user's bug report could not be told apart
34
+ * from a stale install, and diagnosing it needed a clean install to disprove.
35
+ */
36
+ function resolveCliVersion() {
37
+ try {
38
+ const pkg = JSON.parse(readFileSync(join(resolvePackageRoot(), 'package.json'), 'utf8'));
39
+ return String(pkg.version || '0.0.0');
40
+ }
41
+ catch {
42
+ return '0.0.0';
43
+ }
44
+ }
45
+ const CLI_VERSION = resolveCliVersion();
27
46
  function pythonProcessEnv(apiKey, variable = 'DEEPSEEK_API_KEY') {
28
47
  return createPythonProcessEnv(apiKey ? { [variable]: apiKey } : {});
29
48
  }
@@ -231,7 +250,7 @@ async function resolveTalker(input, quiet = false, nonInteractive = false) {
231
250
  program
232
251
  .name('weflow-cli')
233
252
  .description('WeFlow CLI - 微信聊天记录命令行查询与导出工具')
234
- .version('1.5.1');
253
+ .version(CLI_VERSION);
235
254
  program
236
255
  .command('capabilities')
237
256
  .description('输出 AI 可调用的功能能力清单')
@@ -239,7 +258,7 @@ program
239
258
  .action((opts) => {
240
259
  const data = {
241
260
  schema: 'weflow-capabilities/v1',
242
- version: '1.5.1',
261
+ version: CLI_VERSION,
243
262
  read: {
244
263
  sessions: { cli: 'sessions --json', mcp: 'wechat.list_sessions' },
245
264
  messages: { cli: 'messages <talker> --json', mcp: 'wechat.export_messages' },