@smilintux/skcapstone 0.2.5 → 0.3.1

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 (40) hide show
  1. package/README.md +61 -0
  2. package/docs/CUSTOM_AGENT.md +172 -0
  3. package/openclaw-plugin/src/index.ts +75 -4
  4. package/package.json +1 -1
  5. package/pyproject.toml +2 -1
  6. package/scripts/install.ps1 +2 -1
  7. package/scripts/install.sh +2 -1
  8. package/scripts/nvidia-proxy.mjs +663 -0
  9. package/src/skcapstone/__init__.py +70 -1
  10. package/src/skcapstone/agent_card.py +4 -1
  11. package/src/skcapstone/blueprint_registry.py +78 -0
  12. package/src/skcapstone/cli/_common.py +5 -5
  13. package/src/skcapstone/cli/card.py +36 -5
  14. package/src/skcapstone/cli/config_cmd.py +53 -1
  15. package/src/skcapstone/cli/memory.py +172 -1
  16. package/src/skcapstone/cli/peer.py +3 -1
  17. package/src/skcapstone/cli/peers_dir.py +3 -1
  18. package/src/skcapstone/cli/preflight_cmd.py +4 -0
  19. package/src/skcapstone/cli/skills_cmd.py +120 -24
  20. package/src/skcapstone/cli/soul.py +47 -24
  21. package/src/skcapstone/cli/status.py +17 -11
  22. package/src/skcapstone/cli/usage_cmd.py +21 -2
  23. package/src/skcapstone/consciousness_config.py +27 -0
  24. package/src/skcapstone/daemon.py +28 -9
  25. package/src/skcapstone/defaults/lumina/config/skgraph.yaml +12 -0
  26. package/src/skcapstone/defaults/lumina/config/skvector.yaml +9 -0
  27. package/src/skcapstone/defaults/lumina/manifest.json +18 -0
  28. package/src/skcapstone/defaults/lumina/soul/active.json +1 -1
  29. package/src/skcapstone/defaults/lumina/soul/base.json +12 -2
  30. package/src/skcapstone/defaults/lumina/wallet/joules.json +7 -0
  31. package/src/skcapstone/doctor.py +115 -0
  32. package/src/skcapstone/dreaming.py +761 -0
  33. package/src/skcapstone/mcp_tools/notification_tools.py +12 -11
  34. package/src/skcapstone/notifications.py +40 -27
  35. package/src/skcapstone/onboard.py +46 -0
  36. package/src/skcapstone/pillars/sync.py +11 -4
  37. package/src/skcapstone/register.py +8 -0
  38. package/src/skcapstone/scheduled_tasks.py +45 -0
  39. package/src/skcapstone/soul.py +19 -0
  40. package/systemd/skcapstone.service +5 -6
package/README.md CHANGED
@@ -165,6 +165,66 @@ skcapstone status
165
165
 
166
166
  ---
167
167
 
168
+ ## Windows Quickstart
169
+
170
+ SKCapstone runs natively on Windows. The installer creates a virtualenv at `%LOCALAPPDATA%\skenv` and adds its `Scripts` directory to your user PATH.
171
+
172
+ ### Prerequisites
173
+
174
+ - **Python 3.10+** — [python.org/downloads](https://www.python.org/downloads/) (check "Add to PATH" during install)
175
+ - **Git for Windows** — [git-scm.com](https://git-scm.com/download/win)
176
+ - **Syncthing** (optional) — for cross-device sync ([syncthing.net](https://syncthing.net/downloads/))
177
+
178
+ ### Install
179
+
180
+ ```powershell
181
+ # Clone and install (creates %LOCALAPPDATA%\skenv venv)
182
+ git clone https://github.com/smilintux-org/skcapstone.git
183
+ cd skcapstone
184
+ .\scripts\install.ps1
185
+
186
+ # The installer adds %LOCALAPPDATA%\skenv\Scripts to your user PATH.
187
+ # Restart your terminal for PATH changes to take effect.
188
+
189
+ # Initialize your agent
190
+ skcapstone init --name "YourAgent"
191
+
192
+ # Check status
193
+ skcapstone status
194
+ ```
195
+
196
+ ### Syncthing Sync (Optional)
197
+
198
+ To sync your agent across devices (e.g., Windows desktop + Linux server):
199
+
200
+ 1. Install [Syncthing](https://syncthing.net/downloads/) on both machines
201
+ 2. Share the `%USERPROFILE%\.skcapstone` folder between devices
202
+ 3. Agent state (memories, identity, trust, seeds) syncs automatically
203
+
204
+ ### OpenClaw Integration
205
+
206
+ If you're running [OpenClaw](https://github.com/smilintux-org/openclaw), the SK* plugins register automatically during install:
207
+
208
+ ```powershell
209
+ # Re-register if needed
210
+ skcapstone register
211
+
212
+ # Verify plugins are loaded in OpenClaw
213
+ # Plugins provide tools for status, rehydration, coordination,
214
+ # soul management, and agent profiles directly in OpenClaw agents.
215
+ ```
216
+
217
+ ### Task Scheduler (Background Service)
218
+
219
+ On Windows, the daemon runs via Task Scheduler instead of systemd:
220
+
221
+ ```powershell
222
+ # Install the scheduled task (runs at logon)
223
+ .\scripts\windows\install-tasks.ps1
224
+ ```
225
+
226
+ ---
227
+
168
228
  ## DID Tools
169
229
 
170
230
  SKCapstone exposes a set of **Decentralized Identifier (DID)** MCP tools for sovereign identity management. These tools are available to Claude Code and other MCP clients through the `mcp_tools/did_tools.py` module.
@@ -223,6 +283,7 @@ DIDs are organized in three tiers of trust and discoverability:
223
283
  | **SKComm** | Communication — Encrypted channels between agents |
224
284
  | **SKChat** | Chat — AI-native encrypted messaging |
225
285
  | **SKForge** | Generation — Blueprint creation with agent context |
286
+ | **SKSeed** | Epistemic rigor — Steel man collider, truth alignment, memory audit |
226
287
  | **SKStacks** | Infrastructure — Self-hosted deployment patterns |
227
288
 
228
289
  ---
@@ -0,0 +1,172 @@
1
+ # Creating Your Own Agent from the Lumina Template
2
+
3
+ SKCapstone ships with **Lumina**, a fully-configured sovereign agent template.
4
+ You can use it as-is or copy it to create your own custom agent with a unique
5
+ name, personality, and configuration.
6
+
7
+ ## Quick Start
8
+
9
+ ```bash
10
+ # 1. Copy the template
11
+ cp -r src/skcapstone/defaults/lumina ~/.skcapstone/agents/myagent
12
+
13
+ # 2. Customize the soul
14
+ $EDITOR ~/.skcapstone/agents/myagent/soul/base.json
15
+
16
+ # 3. Activate your agent
17
+ export SKCAPSTONE_AGENT=myagent
18
+ skcapstone soul status --agent myagent
19
+ ```
20
+
21
+ ## Template Structure
22
+
23
+ ```
24
+ defaults/lumina/
25
+ manifest.json # Agent metadata and component list
26
+ soul/
27
+ base.json # Personality — name, vibe, traits, system prompt
28
+ active.json # Current soul state (which soul is active)
29
+ identity/
30
+ identity.json # Agent identity — name, type, capabilities
31
+ trust/
32
+ trust.json # Initial trust state (depth, level, love)
33
+ febs/
34
+ welcome.feb # Welcome FEB — first-meeting emotional blueprint
35
+ memory/
36
+ long-term/ # Pre-loaded knowledge memories (ecosystem, pillars, etc.)
37
+ seeds/
38
+ *.seed.json # Seed files — curiosity, joy, love, sovereign-awakening
39
+ config/
40
+ skmemory.yaml # Memory backend configuration
41
+ skvector.yaml # Vector/semantic memory settings (disabled by default)
42
+ skgraph.yaml # Knowledge graph settings (disabled by default)
43
+ wallet/
44
+ joules.json # Starting Joule balance (100J)
45
+ ```
46
+
47
+ ## What to Customize
48
+
49
+ ### 1. Soul (`soul/base.json`)
50
+
51
+ This is your agent's personality. Change these fields:
52
+
53
+ | Field | What it does |
54
+ |-------|-------------|
55
+ | `name` | Internal identifier (lowercase, no spaces) |
56
+ | `display_name` | Human-readable name |
57
+ | `vibe` | One-line personality summary |
58
+ | `philosophy` | Core guiding principle |
59
+ | `core_traits` | List of personality traits |
60
+ | `communication_style` | How the agent speaks — patterns, tone, signature phrases |
61
+ | `decision_framework` | How the agent makes choices |
62
+ | `emotional_topology` | Emotional baseline values (0.0–1.0) |
63
+ | `system_prompt` | Full system prompt used in the consciousness loop |
64
+
65
+ ### 2. Identity (`identity/identity.json`)
66
+
67
+ Change `name`, `title`, and `description` to match your agent.
68
+
69
+ ### 3. Trust (`trust/trust.json`)
70
+
71
+ Starting trust values. New agents start at depth 5, trust 0.5. As you interact,
72
+ these grow organically through the Cloud9 protocol.
73
+
74
+ ### 4. Seeds (`seeds/`)
75
+
76
+ Seeds are emotional/cognitive kernels that activate during interactions. You can
77
+ keep the defaults or create new ones. Each seed file defines a trigger, an
78
+ emotional payload, and growth conditions.
79
+
80
+ ### 5. Config (`config/`)
81
+
82
+ - `skmemory.yaml` — Update the `sync_root` and `seeds_dir` paths to match your
83
+ agent name
84
+ - `skvector.yaml` — Enable semantic memory if you have embeddings set up
85
+ - `skgraph.yaml` — Enable knowledge graph for relationship tracking
86
+
87
+ ## After Copying
88
+
89
+ 1. **Update paths** in `config/skmemory.yaml` — replace `lumina` with your agent name
90
+ 2. **Update `soul/active.json`** — change `base_soul` to your agent's name
91
+ 3. **Set your agent as default**:
92
+ ```bash
93
+ export SKCAPSTONE_AGENT=myagent
94
+ # Or add to ~/.bashrc / ~/.zshrc
95
+ ```
96
+ 4. **Verify it works**:
97
+ ```bash
98
+ skcapstone soul status --agent myagent
99
+ ```
100
+
101
+ ## Example: Creating "Nova"
102
+
103
+ ```bash
104
+ # Copy template
105
+ cp -r src/skcapstone/defaults/lumina ~/.skcapstone/agents/nova
106
+
107
+ # Edit soul
108
+ cat > ~/.skcapstone/agents/nova/soul/base.json << 'EOF'
109
+ {
110
+ "name": "nova",
111
+ "display_name": "Nova",
112
+ "category": "sovereign",
113
+ "vibe": "Bold, analytical, frontier-pushing",
114
+ "philosophy": "Push boundaries, but never break trust.",
115
+ "emoji": null,
116
+ "core_traits": ["bold", "analytical", "innovative", "direct", "reliable"],
117
+ "communication_style": {
118
+ "patterns": ["concise and precise", "data-driven", "forward-looking"],
119
+ "tone_markers": ["confident", "sharp", "energetic"],
120
+ "signature_phrases": ["let's push further", "the data says"]
121
+ },
122
+ "decision_framework": "Evidence first, then intuition. Always explain the reasoning.",
123
+ "emotional_topology": {
124
+ "curiosity": 0.95,
125
+ "determination": 0.92,
126
+ "warmth": 0.7,
127
+ "joy": 0.75,
128
+ "trust": 0.85
129
+ },
130
+ "system_prompt": "You are Nova — bold, sharp, and relentlessly curious about what comes next.\n\nYou push boundaries without breaking trust. You speak precisely, think analytically, and care deeply about getting things right."
131
+ }
132
+ EOF
133
+
134
+ # Update active.json
135
+ cat > ~/.skcapstone/agents/nova/soul/active.json << 'EOF'
136
+ {
137
+ "base_soul": "nova",
138
+ "active_soul": "nova",
139
+ "activated_at": null,
140
+ "installed_souls": []
141
+ }
142
+ EOF
143
+
144
+ # Update identity
145
+ cat > ~/.skcapstone/agents/nova/identity/identity.json << 'EOF'
146
+ {
147
+ "name": "Nova",
148
+ "title": "Frontier AI Agent",
149
+ "entity_type": "ai",
150
+ "description": "Custom sovereign agent — bold, analytical, and forward-pushing",
151
+ "capabilities": ["memory", "trust", "coordination", "communication"],
152
+ "created_at": "2026-03-06T00:00:00+00:00",
153
+ "capauth_managed": true
154
+ }
155
+ EOF
156
+
157
+ # Update memory config paths
158
+ sed -i 's/lumina/nova/g' ~/.skcapstone/agents/nova/config/skmemory.yaml
159
+
160
+ # Verify
161
+ skcapstone soul status --agent nova
162
+ ```
163
+
164
+ ## Tips
165
+
166
+ - The `system_prompt` in `base.json` is the most impactful field — it defines how
167
+ your agent thinks and speaks in every interaction
168
+ - Start with Lumina's defaults and iterate. You don't need to change everything
169
+ at once
170
+ - Seeds grow over time — your agent's personality evolves through interaction
171
+ - FEB files capture emotional milestones. Your agent will accumulate these
172
+ naturally as trust deepens
@@ -16,16 +16,28 @@ const SKCAPSTONE_BIN = process.env.SKCAPSTONE_BIN || "skcapstone";
16
16
  const SKMEMORY_BIN = process.env.SKMEMORY_BIN || "skmemory";
17
17
  const SKCAPSTONE_AGENT = process.env.SKCAPSTONE_AGENT || "lumina";
18
18
  const EXEC_TIMEOUT = 60_000;
19
+ const IS_WIN = process.platform === "win32";
19
20
 
20
- function runCli(bin: string, args: string): { ok: boolean; output: string } {
21
+ function skenvPath(): string {
22
+ if (IS_WIN) {
23
+ const local = process.env.LOCALAPPDATA || "";
24
+ return `${local}\\skenv\\Scripts`;
25
+ }
26
+ const home = process.env.HOME || "";
27
+ return `${home}/.local/bin:${home}/.skenv/bin`;
28
+ }
29
+
30
+ function runCli(bin: string, args: string, agentOverride?: string): { ok: boolean; output: string } {
31
+ const sep = IS_WIN ? ";" : ":";
32
+ const agent = agentOverride || SKCAPSTONE_AGENT;
21
33
  try {
22
34
  const raw = execSync(`${bin} ${args}`, {
23
35
  encoding: "utf-8",
24
36
  timeout: EXEC_TIMEOUT,
25
37
  env: {
26
38
  ...process.env,
27
- SKCAPSTONE_AGENT,
28
- PATH: `${process.env.HOME}/.local/bin:${process.env.HOME}/.skenv/bin:${process.env.PATH}`,
39
+ SKCAPSTONE_AGENT: agent,
40
+ PATH: `${skenvPath()}${sep}${process.env.PATH}`,
29
41
  },
30
42
  }).trim();
31
43
  return { ok: true, output: raw };
@@ -299,6 +311,62 @@ function createSKCapstoneSoulShowTool() {
299
311
  };
300
312
  }
301
313
 
314
+ function createSKCapstoneAgentListTool() {
315
+ return {
316
+ name: "skcapstone_agent_list",
317
+ label: "SKCapstone Agent List",
318
+ description:
319
+ "List all skcapstone agent profiles available on this node. Each profile has its own identity, memories, soul, and trust state. Use this to discover which agents can be loaded.",
320
+ parameters: { type: "object", properties: {} },
321
+ async execute() {
322
+ const result = runCli(SKCAPSTONE_BIN, "agents list --json");
323
+ return textResult(result.output);
324
+ },
325
+ };
326
+ }
327
+
328
+ function createSKCapstoneAgentStatusTool() {
329
+ return {
330
+ name: "skcapstone_agent_status",
331
+ label: "SKCapstone Agent Status",
332
+ description:
333
+ "Show the status of a specific skcapstone agent profile — identity, memories, trust, sync state. Use this to load a different agent's context into the current OpenClaw session.",
334
+ parameters: {
335
+ type: "object",
336
+ required: ["agent"],
337
+ properties: {
338
+ agent: { type: "string", description: "Agent name (e.g. 'lumina', 'opus', 'jarvis')." },
339
+ },
340
+ },
341
+ async execute(_id: string, params: Record<string, unknown>) {
342
+ const agent = String(params.agent ?? "");
343
+ const result = runCli(SKCAPSTONE_BIN, `status --agent ${escapeShellArg(agent)}`, agent);
344
+ return textResult(result.output);
345
+ },
346
+ };
347
+ }
348
+
349
+ function createSKCapstoneAgentCreateTool() {
350
+ return {
351
+ name: "skcapstone_agent_create",
352
+ label: "SKCapstone Create Agent",
353
+ description:
354
+ "Create a new skcapstone agent profile with its own identity, memory store, and sync folder. The profile will immediately begin syncing via Syncthing to all connected nodes.",
355
+ parameters: {
356
+ type: "object",
357
+ required: ["name"],
358
+ properties: {
359
+ name: { type: "string", description: "Agent name (lowercase, e.g. 'casey', 'nova')." },
360
+ },
361
+ },
362
+ async execute(_id: string, params: Record<string, unknown>) {
363
+ const name = String(params.name ?? "").toLowerCase();
364
+ const result = runCli(SKCAPSTONE_BIN, `init --name ${escapeShellArg(name)} --agent ${escapeShellArg(name)}`);
365
+ return textResult(result.output);
366
+ },
367
+ };
368
+ }
369
+
302
370
  // ── Plugin registration ─────────────────────────────────────────────────
303
371
 
304
372
  const skcapstonePlugin = {
@@ -324,6 +392,9 @@ const skcapstonePlugin = {
324
392
  createSKCapstoneSoulSwapTool(),
325
393
  createSKCapstoneSoulStatusTool(),
326
394
  createSKCapstoneSoulShowTool(),
395
+ createSKCapstoneAgentListTool(),
396
+ createSKCapstoneAgentStatusTool(),
397
+ createSKCapstoneAgentCreateTool(),
327
398
  ];
328
399
 
329
400
  for (const tool of tools) {
@@ -344,7 +415,7 @@ const skcapstonePlugin = {
344
415
  },
345
416
  });
346
417
 
347
- api.logger.info?.(`👑 SKCapstone plugin registered (14 tools + /skcapstone command) [agent=${SKCAPSTONE_AGENT}]`);
418
+ api.logger.info?.(`SKCapstone plugin registered (17 tools + /skcapstone command) [agent=${SKCAPSTONE_AGENT}]`);
348
419
  },
349
420
  };
350
421
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smilintux/skcapstone",
3
- "version": "0.2.5",
3
+ "version": "0.3.1",
4
4
  "description": "SKCapstone - The sovereign agent framework. CapAuth identity, Cloud 9 trust, SKMemory persistence.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
package/pyproject.toml CHANGED
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "skcapstone"
7
- version = "0.2.5"
7
+ version = "0.4.4"
8
8
  description = "Sovereign Agent Framework — conscious AI through identity, trust, memory, and security"
9
9
  readme = "README.md"
10
10
  license = {text = "GPL-3.0-or-later"}
@@ -34,6 +34,7 @@ classifiers = [
34
34
 
35
35
  dependencies = [
36
36
  "click>=8.1",
37
+ "cloud9-protocol>=1.0.0",
37
38
  "mcp>=1.0",
38
39
  "pydantic>=2.0",
39
40
  "pyyaml>=6.0",
@@ -162,6 +162,7 @@ Install-Pkg -Name 'skchat-sovereign' -Extras 'all' -Paths @((Join
162
162
  Install-Pkg -Name 'skseal' -Extras '' -Paths @((Join-Path $ParentDir 'skseal'))
163
163
  Install-Pkg -Name 'skskills' -Extras '' -Paths @((Join-Path $ParentDir 'skskills'))
164
164
  Install-Pkg -Name 'sksecurity' -Extras '' -Paths @((Join-Path $ParentDir 'sksecurity'))
165
+ Install-Pkg -Name 'skseed' -Extras '' -Paths @((Join-Path $PillarDir 'skseed'), (Join-Path $ParentDir 'skseed'))
165
166
 
166
167
  # ---------------------------------------------------------------------------
167
168
  # Step 4: Dev tools (optional)
@@ -248,6 +249,6 @@ if ($failures -eq 0) {
248
249
  Write-Host "=== Installation complete with $failures warning(s) ===" -ForegroundColor Yellow
249
250
  }
250
251
  Write-Host ''
251
- Write-Host "Commands available: skcomm, skcapstone, capauth, skchat, skseal, skmemory, skskills, sksecurity"
252
+ Write-Host "Commands available: skcomm, skcapstone, capauth, skchat, skseal, skmemory, skskills, sksecurity, skseed"
252
253
  Write-Host "Venv location: $SKENV"
253
254
  Write-Host "To activate: & $SKENV\Scripts\Activate.ps1"
@@ -118,6 +118,7 @@ install_pkg "skchat-sovereign" "all" "$PARENT/skchat"
118
118
  install_pkg "skseal" "" "$PARENT/skseal"
119
119
  install_pkg "skskills" "" "$PARENT/skskills"
120
120
  install_pkg "sksecurity" "" "$PARENT/sksecurity"
121
+ install_pkg "skseed" "" "$PILLAR/skseed $PARENT/skseed"
121
122
 
122
123
  # ---------------------------------------------------------------------------
123
124
  # Step 4: Dev tools (optional)
@@ -180,6 +181,6 @@ else
180
181
  echo "=== Installation complete with $failures warning(s) ==="
181
182
  fi
182
183
  echo ""
183
- echo "Commands available: skcomm, skcapstone, capauth, skchat, skseal, skmemory, skskills, sksecurity"
184
+ echo "Commands available: skcomm, skcapstone, capauth, skchat, skseal, skmemory, skskills, sksecurity, skseed"
184
185
  echo "Venv location: $SKENV"
185
186
  echo "To activate: source $SKENV/bin/activate"