@cc-soul/openclaw 1.0.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.
- package/README.md +284 -0
- package/cc-soul/HOOK.md +18 -0
- package/cc-soul/body.js +129 -0
- package/cc-soul/cli.js +263 -0
- package/cc-soul/cognition.js +143 -0
- package/cc-soul/context-prep.js +1 -0
- package/cc-soul/epistemic.js +1 -0
- package/cc-soul/evolution.js +176 -0
- package/cc-soul/features.js +79 -0
- package/cc-soul/federation.js +207 -0
- package/cc-soul/fingerprint.js +1 -0
- package/cc-soul/flow.js +199 -0
- package/cc-soul/graph.js +85 -0
- package/cc-soul/handler.js +609 -0
- package/cc-soul/inner-life.js +1 -0
- package/cc-soul/lorebook.js +94 -0
- package/cc-soul/memory.js +688 -0
- package/cc-soul/metacognition.js +1 -0
- package/cc-soul/notify.js +88 -0
- package/cc-soul/patterns.js +1 -0
- package/cc-soul/persistence.js +147 -0
- package/cc-soul/persona.js +1 -0
- package/cc-soul/prompt-builder.js +322 -0
- package/cc-soul/quality.js +135 -0
- package/cc-soul/rover.js +1 -0
- package/cc-soul/sync.js +274 -0
- package/cc-soul/tasks.js +1 -0
- package/cc-soul/types.js +0 -0
- package/cc-soul/upgrade.js +1 -0
- package/cc-soul/user-profiles.js +1 -0
- package/cc-soul/values.js +1 -0
- package/cc-soul/voice.js +1 -0
- package/hub/dashboard.html +236 -0
- package/hub/package.json +16 -0
- package/hub/server.ts +447 -0
- package/package.json +29 -0
- package/scripts/cli.js +136 -0
- package/scripts/install.js +106 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* cc-soul postinstall — auto-deploy to OpenClaw hooks directory
|
|
4
|
+
*/
|
|
5
|
+
import { existsSync, mkdirSync, cpSync, writeFileSync, readFileSync } from 'fs'
|
|
6
|
+
import { resolve, dirname } from 'path'
|
|
7
|
+
import { homedir } from 'os'
|
|
8
|
+
|
|
9
|
+
const TARGET = resolve(homedir(), '.openclaw/hooks/cc-soul')
|
|
10
|
+
const TARGET_SOUL = resolve(TARGET, 'cc-soul')
|
|
11
|
+
const TARGET_DATA = resolve(TARGET, 'data')
|
|
12
|
+
const SOURCE = resolve(dirname(new URL(import.meta.url).pathname), '..')
|
|
13
|
+
|
|
14
|
+
console.log('🧠 cc-soul installing...')
|
|
15
|
+
console.log(` source: ${SOURCE}`)
|
|
16
|
+
console.log(` target: ${TARGET}`)
|
|
17
|
+
|
|
18
|
+
// Create directories
|
|
19
|
+
mkdirSync(TARGET_SOUL, { recursive: true })
|
|
20
|
+
mkdirSync(TARGET_DATA, { recursive: true })
|
|
21
|
+
|
|
22
|
+
// Copy cc-soul modules (JS files + HOOK.md)
|
|
23
|
+
cpSync(resolve(SOURCE, 'cc-soul'), TARGET_SOUL, { recursive: true, force: true })
|
|
24
|
+
console.log(' ✅ modules installed')
|
|
25
|
+
|
|
26
|
+
// Copy hub (optional)
|
|
27
|
+
const hubTarget = resolve(TARGET, 'hub')
|
|
28
|
+
if (existsSync(resolve(SOURCE, 'hub'))) {
|
|
29
|
+
mkdirSync(hubTarget, { recursive: true })
|
|
30
|
+
cpSync(resolve(SOURCE, 'hub'), hubTarget, { recursive: true, force: true })
|
|
31
|
+
console.log(' ✅ hub installed')
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Create package.json for OpenClaw hook discovery
|
|
35
|
+
const hookPkg = resolve(TARGET, 'package.json')
|
|
36
|
+
if (!existsSync(hookPkg)) {
|
|
37
|
+
writeFileSync(hookPkg, JSON.stringify({
|
|
38
|
+
name: "cc-soul",
|
|
39
|
+
version: "1.0.0",
|
|
40
|
+
type: "module",
|
|
41
|
+
openclaw: { hooks: ["./cc-soul"] }
|
|
42
|
+
}, null, 2))
|
|
43
|
+
console.log(' ✅ hook package.json created')
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Create default features.json (if not exists)
|
|
47
|
+
const featuresFile = resolve(TARGET_DATA, 'features.json')
|
|
48
|
+
if (!existsSync(featuresFile)) {
|
|
49
|
+
writeFileSync(featuresFile, JSON.stringify({
|
|
50
|
+
memory_active: true,
|
|
51
|
+
memory_consolidation: true,
|
|
52
|
+
memory_contradiction_scan: true,
|
|
53
|
+
memory_tags: true,
|
|
54
|
+
memory_associative_recall: true,
|
|
55
|
+
memory_predictive: true,
|
|
56
|
+
memory_session_summary: true,
|
|
57
|
+
lorebook: true,
|
|
58
|
+
skill_library: true,
|
|
59
|
+
persona_splitting: true,
|
|
60
|
+
emotional_contagion: true,
|
|
61
|
+
fingerprint: true,
|
|
62
|
+
metacognition: true,
|
|
63
|
+
dream_mode: true,
|
|
64
|
+
autonomous_voice: true,
|
|
65
|
+
web_rover: true,
|
|
66
|
+
structured_reflection: true,
|
|
67
|
+
plan_tracking: true,
|
|
68
|
+
self_upgrade: false,
|
|
69
|
+
federation: true,
|
|
70
|
+
sync: true,
|
|
71
|
+
}, null, 2))
|
|
72
|
+
console.log(' ✅ default features.json created')
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Create default sync_config.json (if not exists)
|
|
76
|
+
const syncFile = resolve(TARGET_DATA, 'sync_config.json')
|
|
77
|
+
if (!existsSync(syncFile)) {
|
|
78
|
+
const instanceId = 'cc-' + Date.now().toString(36) + Math.random().toString(36).slice(2, 6)
|
|
79
|
+
writeFileSync(syncFile, JSON.stringify({
|
|
80
|
+
enabled: false,
|
|
81
|
+
instanceId,
|
|
82
|
+
instanceName: 'unnamed',
|
|
83
|
+
method: 'file',
|
|
84
|
+
remote: '',
|
|
85
|
+
hubUrl: '',
|
|
86
|
+
hubApiKey: '',
|
|
87
|
+
federationEnabled: false,
|
|
88
|
+
syncIntervalMinutes: 0,
|
|
89
|
+
lastSync: 0,
|
|
90
|
+
}, null, 2))
|
|
91
|
+
console.log(' ✅ default sync_config.json created')
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
console.log('')
|
|
95
|
+
console.log('🎉 cc-soul installed successfully!')
|
|
96
|
+
console.log('')
|
|
97
|
+
console.log(' Next steps:')
|
|
98
|
+
console.log(' 1. Restart OpenClaw gateway:')
|
|
99
|
+
console.log(' pkill -HUP -f "openclaw.*gateway"')
|
|
100
|
+
console.log('')
|
|
101
|
+
console.log(' 2. Check logs for:')
|
|
102
|
+
console.log(' [cc-soul] initialized (modular)')
|
|
103
|
+
console.log(' [cc-soul][ai] auto-detected from openclaw.json')
|
|
104
|
+
console.log('')
|
|
105
|
+
console.log(' 3. Send a message to your AI — cc-soul is now active!')
|
|
106
|
+
console.log('')
|