@super-pocock-ai/suite 2.0.19 → 2.0.21

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/index.js CHANGED
@@ -4,7 +4,12 @@ import { fileURLToPath } from 'url'
4
4
  import { execSync } from 'child_process'
5
5
 
6
6
  const __dirname = dirname(fileURLToPath(import.meta.url))
7
- const SUITE_VERSION = JSON.parse(readFileSync(join(__dirname, 'package.json'), 'utf-8')).version
7
+
8
+ // Read version from config directory (not cache) to ensure latest version
9
+ const configSuitePath = join(process.env.HOME, '.config', 'opencode', 'node_modules', '@super-pocock-ai', 'suite', 'package.json')
10
+ const SUITE_VERSION = existsSync(configSuitePath)
11
+ ? JSON.parse(readFileSync(configSuitePath, 'utf-8')).version
12
+ : JSON.parse(readFileSync(join(__dirname, 'package.json'), 'utf-8')).version
8
13
 
9
14
  export const SuperPocockSuite = async ({ project, client, $, directory, worktree }) => {
10
15
  const agentsDir = join(process.env.HOME, '.config', 'opencode', 'agents')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@super-pocock-ai/suite",
3
- "version": "2.0.19",
3
+ "version": "2.0.21",
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/memory-core": "2.0.19",
17
- "@super-pocock-ai/memory-agents": "2.0.19",
18
- "@super-pocock-ai/compose-workflow": "2.0.19",
19
- "@super-pocock-ai/compose-agents": "2.0.19"
16
+ "@super-pocock-ai/memory-core": "2.0.21",
17
+ "@super-pocock-ai/memory-agents": "2.0.21",
18
+ "@super-pocock-ai/compose-workflow": "2.0.21",
19
+ "@super-pocock-ai/compose-agents": "2.0.21"
20
20
  },
21
21
  "keywords": [
22
22
  "opencode",
package/postinstall.js CHANGED
@@ -1,16 +1,24 @@
1
1
  #!/usr/bin/env node
2
- import { existsSync, mkdirSync, readdirSync, statSync, copyFileSync } from 'fs'
2
+ import { existsSync, mkdirSync, readdirSync, statSync, copyFileSync, rmSync } from 'fs'
3
3
  import { join } from 'path'
4
4
 
5
5
  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
+ const CACHE_PACKAGES = join(HOME, '.cache', 'opencode', 'packages', '@super-pocock-ai')
8
9
 
9
10
  // 确保目标目录存在
10
11
  if (!existsSync(CONFIG_MODULES)) {
11
12
  mkdirSync(CONFIG_MODULES, { recursive: true })
12
13
  }
13
14
 
15
+ // 清除旧缓存,确保下次重启时使用最新版本
16
+ if (existsSync(CACHE_PACKAGES)) {
17
+ console.log('[super-pocock-suite] Clearing outdated cache...')
18
+ rmSync(CACHE_PACKAGES, { recursive: true, force: true })
19
+ console.log('[super-pocock-suite] Cache cleared')
20
+ }
21
+
14
22
  // 从缓存复制包到配置目录
15
23
  const packages = ['suite', 'compose-agents', 'compose-workflow', 'memory-agents', 'memory-core']
16
24