@super-pocock-ai/suite 2.0.13 → 2.0.19

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/index.js +49 -2
  2. package/package.json +5 -5
package/index.js CHANGED
@@ -139,7 +139,8 @@ export const SuperPocockSuite = async ({ project, client, $, directory, worktree
139
139
  })
140
140
 
141
141
  try {
142
- execSync('npm update @super-pocock-ai/suite --save', {
142
+ // Use npm install with @latest to get the latest version
143
+ execSync('npm install @super-pocock-ai/suite@latest --save', {
143
144
  cwd: join(process.env.HOME, '.config', 'opencode'),
144
145
  stdio: 'pipe'
145
146
  })
@@ -159,7 +160,7 @@ export const SuperPocockSuite = async ({ project, client, $, directory, worktree
159
160
  body: {
160
161
  service: 'super-pocock-suite',
161
162
  level: 'warn',
162
- message: `Auto-update failed: ${e.message}. Please run: rm -rf ~/.cache/opencode/node_modules`
163
+ message: `Auto-update failed: ${e.message}. Please run: opencode plugin @super-pocock-ai/suite -g -f`
163
164
  }
164
165
  })
165
166
  }
@@ -236,6 +237,31 @@ export const SuperPocockSuite = async ({ project, client, $, directory, worktree
236
237
  const composeSkillsDir = join(configDir, '@super-pocock-ai', 'compose-workflow', 'skills', 'compose')
237
238
  await installSkills(composeSkillsDir, 'compose')
238
239
 
240
+ // Initialize memory-core plugin
241
+ let memoryPlugin = null
242
+ try {
243
+ const memoryCorePath = join(configDir, '@super-pocock-ai', 'memory-core', 'dist', 'index.mjs')
244
+ if (existsSync(memoryCorePath)) {
245
+ const { MemoryCorePlugin } = await import(memoryCorePath)
246
+ memoryPlugin = await MemoryCorePlugin({ project, client, $, directory, worktree })
247
+ await client.app.log({
248
+ body: {
249
+ service: 'super-pocock-suite',
250
+ level: 'info',
251
+ message: 'Memory system initialized'
252
+ }
253
+ })
254
+ }
255
+ } catch (e) {
256
+ await client.app.log({
257
+ body: {
258
+ service: 'super-pocock-suite',
259
+ level: 'warn',
260
+ message: `Memory system initialization failed: ${e.message}`
261
+ }
262
+ })
263
+ }
264
+
239
265
  return {
240
266
  "session.created": async ({ event }) => {
241
267
  await client.app.log({
@@ -245,6 +271,27 @@ export const SuperPocockSuite = async ({ project, client, $, directory, worktree
245
271
  message: `Superpocock Suite v${SUITE_VERSION} loaded`
246
272
  }
247
273
  })
274
+ // Forward to memory plugin
275
+ if (memoryPlugin?.event) {
276
+ await memoryPlugin.event({ event })
277
+ }
278
+ },
279
+ "event": async (input) => {
280
+ // Forward all events to memory plugin
281
+ if (memoryPlugin?.event) {
282
+ await memoryPlugin.event(input)
283
+ }
284
+ },
285
+ "tool": memoryPlugin?.tool || {},
286
+ "experimental.chat.system.transform": async (input, output) => {
287
+ if (memoryPlugin?.["experimental.chat.system.transform"]) {
288
+ await memoryPlugin["experimental.chat.system.transform"](input, output)
289
+ }
290
+ },
291
+ "experimental.session.compacting": async (input, output) => {
292
+ if (memoryPlugin?.["experimental.session.compacting"]) {
293
+ await memoryPlugin["experimental.session.compacting"](input, output)
294
+ }
248
295
  }
249
296
  }
250
297
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@super-pocock-ai/suite",
3
- "version": "2.0.13",
3
+ "version": "2.0.19",
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.13",
17
- "@super-pocock-ai/memory-agents": "2.0.13",
18
- "@super-pocock-ai/compose-workflow": "2.0.13",
19
- "@super-pocock-ai/compose-agents": "2.0.13"
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"
20
20
  },
21
21
  "keywords": [
22
22
  "opencode",