@super-pocock-ai/suite 2.0.0 → 2.0.2
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 +47 -0
- package/package.json +16 -5
package/index.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { readFileSync, writeFileSync, mkdirSync, existsSync, readdirSync } from 'fs'
|
|
2
|
+
import { join, dirname } from 'path'
|
|
3
|
+
import { fileURLToPath } from 'url'
|
|
4
|
+
|
|
5
|
+
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
6
|
+
|
|
7
|
+
export const SuperPocockSuite = async ({ project, client, $, directory, worktree }) => {
|
|
8
|
+
const agentsDir = join(process.env.HOME, '.config', 'opencode', 'agents')
|
|
9
|
+
|
|
10
|
+
if (!existsSync(agentsDir)) {
|
|
11
|
+
mkdirSync(agentsDir, { recursive: true })
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const composeAgentsDir = join(__dirname, 'node_modules', '@super-pocock-ai', 'compose-agents', 'agents')
|
|
15
|
+
|
|
16
|
+
if (existsSync(composeAgentsDir)) {
|
|
17
|
+
const files = readdirSync(composeAgentsDir)
|
|
18
|
+
for (const file of files) {
|
|
19
|
+
if (file.endsWith('.md')) {
|
|
20
|
+
const src = join(composeAgentsDir, file)
|
|
21
|
+
const dest = join(agentsDir, file)
|
|
22
|
+
if (!existsSync(dest)) {
|
|
23
|
+
writeFileSync(dest, readFileSync(src, 'utf-8'))
|
|
24
|
+
await client.app.log({
|
|
25
|
+
body: {
|
|
26
|
+
service: 'super-pocock-suite',
|
|
27
|
+
level: 'info',
|
|
28
|
+
message: `Installed agent: ${file}`
|
|
29
|
+
}
|
|
30
|
+
})
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return {
|
|
37
|
+
"session.created": async ({ event }) => {
|
|
38
|
+
await client.app.log({
|
|
39
|
+
body: {
|
|
40
|
+
service: 'super-pocock-suite',
|
|
41
|
+
level: 'info',
|
|
42
|
+
message: 'Superpocock Suite loaded'
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@super-pocock-ai/suite",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Superpocock 完整套件,包含记忆系统和工作流",
|
|
5
|
-
"
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"files": [
|
|
8
|
+
"index.js",
|
|
9
|
+
"README.md"
|
|
10
|
+
],
|
|
6
11
|
"dependencies": {
|
|
7
|
-
"@super-pocock-ai/memory-core": "2.0.
|
|
8
|
-
"@super-pocock-ai/memory-agents": "2.0.
|
|
12
|
+
"@super-pocock-ai/memory-core": "2.0.1",
|
|
13
|
+
"@super-pocock-ai/memory-agents": "2.0.1",
|
|
9
14
|
"@super-pocock-ai/compose-workflow": "2.0.0",
|
|
10
15
|
"@super-pocock-ai/compose-agents": "2.0.0"
|
|
11
16
|
},
|
|
12
|
-
"keywords": [
|
|
17
|
+
"keywords": [
|
|
18
|
+
"opencode",
|
|
19
|
+
"suite",
|
|
20
|
+
"memory",
|
|
21
|
+
"compose",
|
|
22
|
+
"workflow"
|
|
23
|
+
],
|
|
13
24
|
"license": "MIT"
|
|
14
25
|
}
|