@kioku-memory/plugin-opencode 0.4.1 → 0.5.0

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.
Files changed (2) hide show
  1. package/lib/command.mjs +7 -1
  2. package/package.json +1 -1
package/lib/command.mjs CHANGED
@@ -10,9 +10,15 @@ import { join, win32 } from 'node:path'
10
10
 
11
11
  import { KiokuFailure } from './http.mjs'
12
12
 
13
+ const WINDOWS_APPS_STUB = /[\\/]Microsoft[\\/]WindowsApps[\\/][^\\/]+$/i
14
+
13
15
  const isFile = (file) => {
14
16
  try {
15
- return statSync(file).isFile()
17
+ const st = statSync(file)
18
+ if (!st.isFile()) return false
19
+ // 未安装对应商店应用时 WindowsApps 目录里的执行别名是 0 字节空壳,跳过它免得误认或拉起商店弹窗
20
+ if (WINDOWS_APPS_STUB.test(file) && st.size === 0) return false
21
+ return true
16
22
  } catch {
17
23
  return false
18
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kioku-memory/plugin-opencode",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "description": "Kioku 长期记忆的 OpenCode 插件:会话开始注入启动加载,每轮输入注入召回候选,并自动注册 Kioku MCP 服务",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/lonelyman0108/kioku-plugins/tree/main/plugins/opencode",