@super-pocock-ai/suite 2.0.24 → 2.0.26
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/package.json +5 -5
- package/postinstall.js +33 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@super-pocock-ai/suite",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.26",
|
|
4
4
|
"description": "Superpocock 完整套件,包含记忆系统和工作流",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"postinstall": "node postinstall.js"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@super-pocock-ai/
|
|
17
|
-
"@super-pocock-ai/
|
|
18
|
-
"@super-pocock-ai/
|
|
19
|
-
"@super-pocock-ai/
|
|
16
|
+
"@super-pocock-ai/compose-agents": "2.0.26",
|
|
17
|
+
"@super-pocock-ai/compose-workflow": "2.0.26",
|
|
18
|
+
"@super-pocock-ai/memory-agents": "2.0.26",
|
|
19
|
+
"@super-pocock-ai/memory-core": "2.0.26"
|
|
20
20
|
},
|
|
21
21
|
"keywords": [
|
|
22
22
|
"opencode",
|
package/postinstall.js
CHANGED
|
@@ -6,12 +6,45 @@ const HOME = process.env.HOME
|
|
|
6
6
|
const CACHE_SUITE = join(HOME, '.cache', 'opencode', 'packages', '@super-pocock-ai', 'suite')
|
|
7
7
|
const CONFIG_MODULES = join(HOME, '.config', 'opencode', 'node_modules', '@super-pocock-ai')
|
|
8
8
|
const CACHE_PACKAGES = join(HOME, '.cache', 'opencode', 'packages', '@super-pocock-ai')
|
|
9
|
+
const MEMORY_ROOT = join(HOME, '.local', 'share', 'super-pocock', 'memory')
|
|
10
|
+
|
|
11
|
+
// 检查是否全局安装
|
|
12
|
+
const currentDir = process.cwd()
|
|
13
|
+
const isGlobal = currentDir.includes('.config/opencode') ||
|
|
14
|
+
process.env.npm_config_global === 'true' ||
|
|
15
|
+
process.env.npm_config_prefix
|
|
16
|
+
|
|
17
|
+
if (!isGlobal && !currentDir.includes('.config/opencode')) {
|
|
18
|
+
console.warn('')
|
|
19
|
+
console.warn('⚠️ @super-pocock-ai/suite 建议全局安装:')
|
|
20
|
+
console.warn(' npm install -g @super-pocock-ai/suite')
|
|
21
|
+
console.warn('')
|
|
22
|
+
console.warn(' 记忆系统使用全局目录: ~/.local/share/super-pocock/memory/')
|
|
23
|
+
console.warn(' Compose 文档保存在项目目录下')
|
|
24
|
+
console.warn('')
|
|
25
|
+
}
|
|
9
26
|
|
|
10
27
|
// 确保目标目录存在
|
|
11
28
|
if (!existsSync(CONFIG_MODULES)) {
|
|
12
29
|
mkdirSync(CONFIG_MODULES, { recursive: true })
|
|
13
30
|
}
|
|
14
31
|
|
|
32
|
+
// 创建全局记忆目录
|
|
33
|
+
const memoryDirs = [
|
|
34
|
+
MEMORY_ROOT,
|
|
35
|
+
join(MEMORY_ROOT, 'global'),
|
|
36
|
+
join(MEMORY_ROOT, 'projects'),
|
|
37
|
+
join(MEMORY_ROOT, 'sessions'),
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
for (const dir of memoryDirs) {
|
|
41
|
+
if (!existsSync(dir)) {
|
|
42
|
+
mkdirSync(dir, { recursive: true })
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
console.log('[super-pocock-suite] Memory directory:', MEMORY_ROOT)
|
|
47
|
+
|
|
15
48
|
// 清除旧缓存,确保下次重启时使用最新版本
|
|
16
49
|
if (existsSync(CACHE_PACKAGES)) {
|
|
17
50
|
console.log('[super-pocock-suite] Clearing outdated cache...')
|