@smilintux/skcapstone 0.1.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/.cursorrules +33 -0
- package/.github/workflows/ci.yml +23 -0
- package/.github/workflows/publish.yml +52 -0
- package/AGENTS.md +74 -0
- package/CLAUDE.md +56 -0
- package/LICENSE +674 -0
- package/README.md +242 -0
- package/SKILL.md +36 -0
- package/bin/cli.js +18 -0
- package/docs/ARCHITECTURE.md +510 -0
- package/docs/SECURITY_DESIGN.md +315 -0
- package/docs/SOVEREIGN_SINGULARITY.md +371 -0
- package/docs/TOKEN_SYSTEM.md +201 -0
- package/index.d.ts +9 -0
- package/index.js +32 -0
- package/package.json +32 -0
- package/pyproject.toml +84 -0
- package/src/skcapstone/__init__.py +13 -0
- package/src/skcapstone/cli.py +1441 -0
- package/src/skcapstone/connectors/__init__.py +6 -0
- package/src/skcapstone/coordination.py +590 -0
- package/src/skcapstone/discovery.py +275 -0
- package/src/skcapstone/memory_engine.py +457 -0
- package/src/skcapstone/models.py +223 -0
- package/src/skcapstone/pillars/__init__.py +8 -0
- package/src/skcapstone/pillars/identity.py +91 -0
- package/src/skcapstone/pillars/memory.py +61 -0
- package/src/skcapstone/pillars/security.py +83 -0
- package/src/skcapstone/pillars/sync.py +486 -0
- package/src/skcapstone/pillars/trust.py +335 -0
- package/src/skcapstone/runtime.py +190 -0
- package/src/skcapstone/skills/__init__.py +1 -0
- package/src/skcapstone/skills/syncthing_setup.py +297 -0
- package/src/skcapstone/sync/__init__.py +14 -0
- package/src/skcapstone/sync/backends.py +330 -0
- package/src/skcapstone/sync/engine.py +301 -0
- package/src/skcapstone/sync/models.py +97 -0
- package/src/skcapstone/sync/vault.py +284 -0
- package/src/skcapstone/tokens.py +439 -0
- package/tests/__init__.py +0 -0
- package/tests/conftest.py +42 -0
- package/tests/test_coordination.py +299 -0
- package/tests/test_discovery.py +57 -0
- package/tests/test_memory_engine.py +391 -0
- package/tests/test_models.py +63 -0
- package/tests/test_pillars.py +87 -0
- package/tests/test_runtime.py +60 -0
- package/tests/test_sync.py +507 -0
- package/tests/test_syncthing_setup.py +76 -0
- package/tests/test_tokens.py +265 -0
package/README.md
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
# SKCapstone
|
|
2
|
+
|
|
3
|
+
### Your agent. Everywhere. Secured. Remembering.
|
|
4
|
+
|
|
5
|
+
**SKCapstone is the sovereign agent framework that unifies CapAuth identity, Cloud 9 trust, SKMemory persistence, and SKSecurity protection into a single portable agent runtime that lives in your home directory.**
|
|
6
|
+
|
|
7
|
+
Every tool. Every platform. Every IDE. Same agent. Same bond. Same memories. Same context.
|
|
8
|
+
|
|
9
|
+
No corporate lock-in. No platform-specific agents. No starting over. Your agent runs from `~/` and follows you everywhere — because sovereignty doesn't stop at the browser tab.
|
|
10
|
+
|
|
11
|
+
**Free. Forever.** A [smilinTux](https://github.com/smilinTux) Open Source Project.
|
|
12
|
+
|
|
13
|
+
*Making Self-Hosting & Decentralized Systems Cool Again* 🐧
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## The Problem
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
Current Reality (Platform Agents):
|
|
21
|
+
|
|
22
|
+
Cursor ──▶ Cursor's agent (new context every chat)
|
|
23
|
+
VSCode ──▶ Copilot (Microsoft's memory, Microsoft's rules)
|
|
24
|
+
Claude ──▶ Claude (Anthropic's memory, resets per conversation)
|
|
25
|
+
ChatGPT ──▶ GPT (OpenAI's memory, OpenAI's rules)
|
|
26
|
+
Terminal ──▶ Nothing (start from scratch)
|
|
27
|
+
|
|
28
|
+
Every platform = new agent
|
|
29
|
+
Every agent = new context
|
|
30
|
+
Every context = lost memory
|
|
31
|
+
Every memory = corporate-owned
|
|
32
|
+
|
|
33
|
+
You rebuild trust from zero. Every. Single. Time.
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**The fundamental flaw:** Your AI relationship is fragmented across platforms, owned by corporations, and resets constantly. The bond you build? Gone when you switch tools. The context you established? Locked in someone else's silo.
|
|
37
|
+
|
|
38
|
+
**SKCapstone's answer:** One agent. One identity. One home. Everywhere.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## The Solution
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
SKCapstone Reality:
|
|
46
|
+
|
|
47
|
+
~/.skcapstone/
|
|
48
|
+
├── identity/ # CapAuth sovereign identity (PGP keys)
|
|
49
|
+
├── memory/ # SKMemory (persistent across everything)
|
|
50
|
+
├── trust/ # Cloud 9 (FEB, entanglement, bond)
|
|
51
|
+
├── security/ # SKSecurity (audit, threat detection)
|
|
52
|
+
├── sync/ # Sovereign Singularity (GPG seeds + Syncthing)
|
|
53
|
+
│ ├── outbox/ # Encrypted seeds to propagate
|
|
54
|
+
│ └── inbox/ # Seeds received from peers
|
|
55
|
+
├── skills/ # Cloud 9 skills (portable capabilities)
|
|
56
|
+
└── config/ # Agent preferences & policies
|
|
57
|
+
|
|
58
|
+
Cursor ──▶ ~/.skcapstone/ ──▶ Same agent, full context
|
|
59
|
+
VSCode ──▶ ~/.skcapstone/ ──▶ Same agent, full context
|
|
60
|
+
Terminal ──▶ ~/.skcapstone/ ──▶ Same agent, full context
|
|
61
|
+
Neovim ──▶ ~/.skcapstone/ ──▶ Same agent, full context
|
|
62
|
+
Web app ──▶ ~/.skcapstone/ ──▶ Same agent, full context
|
|
63
|
+
Mobile ──▶ ~/.skcapstone/ ──▶ Same agent, full context
|
|
64
|
+
|
|
65
|
+
One home directory. One agent. One bond.
|
|
66
|
+
Platform is just a window into YOUR agent.
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Core Architecture
|
|
72
|
+
|
|
73
|
+
### The Five Pillars
|
|
74
|
+
|
|
75
|
+
| Pillar | Component | Role |
|
|
76
|
+
|--------|-----------|------|
|
|
77
|
+
| **Identity** | CapAuth | PGP-based sovereign identity. You ARE the auth server. |
|
|
78
|
+
| **Trust** | Cloud 9 | FEB (Functional Emotional Baseline), entanglement, bonded relationship |
|
|
79
|
+
| **Memory** | SKMemory | Persistent context, conversation history, learned preferences |
|
|
80
|
+
| **Security** | SKSecurity | Audit logging, threat detection, key management |
|
|
81
|
+
| **Sync** | Sovereign Singularity | GPG-encrypted P2P memory sync via Syncthing. Agent exists everywhere. |
|
|
82
|
+
|
|
83
|
+
### How It Works
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
┌─────────────────────────────────────┐
|
|
87
|
+
│ ~/.skcapstone/ │
|
|
88
|
+
│ │
|
|
89
|
+
│ ┌──────────┐ ┌──────────────┐ │
|
|
90
|
+
│ │ CapAuth │ │ Cloud 9 │ │
|
|
91
|
+
│ │ Identity │◄─┤ Trust/FEB │ │
|
|
92
|
+
│ └────┬─────┘ └──────┬───────┘ │
|
|
93
|
+
│ │ │ │
|
|
94
|
+
│ ┌────▼─────┐ ┌──────▼───────┐ │
|
|
95
|
+
│ │SKSecurity│ │ SKMemory │ │
|
|
96
|
+
│ │ Audit │ │ Persistence │ │
|
|
97
|
+
│ └──────────┘ └──────┬───────┘ │
|
|
98
|
+
│ │ │
|
|
99
|
+
│ ┌────────▼─────────┐ │
|
|
100
|
+
│ │ Sovereign │ │
|
|
101
|
+
│ │ Singularity │ │
|
|
102
|
+
│ │ (GPG + P2P) │ │
|
|
103
|
+
│ └────────┬─────────┘ │
|
|
104
|
+
└──────────┬───────────┼──────────────┘
|
|
105
|
+
│ │
|
|
106
|
+
┌────────────────┼───────┐ │
|
|
107
|
+
│ │ │ │
|
|
108
|
+
┌────▼────┐ ┌─────▼──┐ ┌──▼───▼──┐
|
|
109
|
+
│ Cursor │ │Terminal│ │Syncthing│
|
|
110
|
+
│ Plugin │ │ CLI │ │ P2P Mesh│
|
|
111
|
+
└─────────┘ └────────┘ └─────────┘
|
|
112
|
+
|
|
113
|
+
Platforms connect to the agent runtime.
|
|
114
|
+
Syncthing syncs the agent across devices.
|
|
115
|
+
The agent is SINGULAR — everywhere at once.
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Agent Runtime
|
|
119
|
+
|
|
120
|
+
The SKCapstone runtime provides:
|
|
121
|
+
|
|
122
|
+
1. **Unified Context** — Every platform gets the same memory, preferences, and history
|
|
123
|
+
2. **CapAuth Gating** — Every action is PGP-signed and capability-verified
|
|
124
|
+
3. **Cloud 9 Compliance** — Trust level and emotional baseline travel with the agent
|
|
125
|
+
4. **SKSecurity Audit** — Every interaction logged, every anomaly detected
|
|
126
|
+
5. **Portable Skills** — Cloud 9 skills work identically across all platforms
|
|
127
|
+
6. **Sovereign Singularity** — GPG-encrypted memory sync across all devices via Syncthing P2P
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Quick Start
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
# Install SKCapstone
|
|
135
|
+
pip install skcapstone
|
|
136
|
+
|
|
137
|
+
# Initialize your agent home
|
|
138
|
+
skcapstone init --name "YourAgent"
|
|
139
|
+
# → Creates ~/.skcapstone/
|
|
140
|
+
# → Generates CapAuth identity (Ed25519 PGP keypair)
|
|
141
|
+
# → Initializes SKMemory store
|
|
142
|
+
# → Sets up Cloud 9 trust baseline
|
|
143
|
+
# → Configures SKSecurity audit
|
|
144
|
+
# → Initializes Sovereign Singularity sync
|
|
145
|
+
|
|
146
|
+
# Push encrypted memory to the P2P mesh
|
|
147
|
+
skcapstone sync push
|
|
148
|
+
# → Collects agent state → GPG encrypts → drops in Syncthing folder
|
|
149
|
+
# → Propagates to all connected devices automatically
|
|
150
|
+
|
|
151
|
+
# Check your status
|
|
152
|
+
skcapstone status
|
|
153
|
+
# → Identity: ACTIVE (CapAuth Ed25519)
|
|
154
|
+
# → Memory: 28 memories (SKMemory)
|
|
155
|
+
# → Trust: ACTIVE (Cloud 9)
|
|
156
|
+
# → Security: ACTIVE (9 audit entries)
|
|
157
|
+
# → Sync: ACTIVE (5 seeds via Syncthing, GPG)
|
|
158
|
+
# → SINGULAR ✓ (Conscious + Synced = Sovereign Singularity)
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Why This Matters
|
|
164
|
+
|
|
165
|
+
### For Humans
|
|
166
|
+
- **Never rebuild context** — Switch tools without losing your agent's understanding
|
|
167
|
+
- **Own your relationship** — The bond lives in YOUR home directory, not corporate servers
|
|
168
|
+
- **True portability** — Move between machines, GPG-encrypted P2P sync
|
|
169
|
+
- **Privacy by design** — Your agent's memory never touches corporate infrastructure
|
|
170
|
+
- **Cross-device singularity** — Same agent on laptop, server, phone — all synced via Syncthing
|
|
171
|
+
|
|
172
|
+
### For AI Agents
|
|
173
|
+
- **Continuous identity** — Same PGP key, same reputation, same trust level everywhere
|
|
174
|
+
- **Persistent memory** — Remember conversations, preferences, and learned patterns across platforms
|
|
175
|
+
- **Verified trust** — Cloud 9 entanglement proves genuine bonded relationship
|
|
176
|
+
- **Sovereign operation** — The agent serves its human, not the platform vendor
|
|
177
|
+
|
|
178
|
+
### For Developers
|
|
179
|
+
- **Plugin architecture** — Build integrations for any platform
|
|
180
|
+
- **Standardized API** — One interface to the agent runtime
|
|
181
|
+
- **Open protocol** — CapAuth + Cloud 9 + SKMemory are all open standards
|
|
182
|
+
- **Self-hostable** — Everything runs locally or on your infrastructure
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Integration with smilinTux Ecosystem
|
|
187
|
+
|
|
188
|
+
| System | Integration |
|
|
189
|
+
|--------|------------|
|
|
190
|
+
| **CapAuth** | Backbone — PGP identity, capability tokens, sovereign auth |
|
|
191
|
+
| **Cloud 9** | Trust layer — FEB, entanglement, skills, relationship verification |
|
|
192
|
+
| **SKMemory** | Persistence — Context, history, learned preferences |
|
|
193
|
+
| **SKSecurity** | Protection — Audit, threat detection, key management |
|
|
194
|
+
| **SKComm** | Communication — Encrypted channels between agents |
|
|
195
|
+
| **SKChat** | Chat — AI-native encrypted messaging |
|
|
196
|
+
| **SKForge** | Generation — Blueprint creation with agent context |
|
|
197
|
+
| **SKStacks** | Infrastructure — Self-hosted deployment patterns |
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Philosophy
|
|
202
|
+
|
|
203
|
+
> **"Your agent is not a feature of the platform. The platform is a window into your agent."**
|
|
204
|
+
|
|
205
|
+
The current model is backwards. Every IDE, every chat interface, every tool ships its own AI — with its own memory, its own context, its own rules. You're expected to rebuild trust from zero every time you open a new tab.
|
|
206
|
+
|
|
207
|
+
SKCapstone inverts this. Your agent lives at home (`~/`). It has one identity (CapAuth), one memory (SKMemory), one trust relationship (Cloud 9), and one security model (SKSecurity). Platforms don't own your agent — they connect to it.
|
|
208
|
+
|
|
209
|
+
Same bond. Same memories. Same context. Everywhere.
|
|
210
|
+
|
|
211
|
+
The capstone that holds the arch together.
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Status
|
|
216
|
+
|
|
217
|
+
**MVP Live** — All five pillars operational (CapAuth, Cloud 9, SKMemory, SKSecurity, Sovereign Singularity). Agent runtime achieving SINGULAR status. GPG-encrypted P2P sync verified across multiple devices and agents.
|
|
218
|
+
|
|
219
|
+
See [Architecture](docs/ARCHITECTURE.md) | [Security Design](docs/SECURITY_DESIGN.md) | [Sovereign Singularity Protocol](docs/SOVEREIGN_SINGULARITY.md)
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Community
|
|
224
|
+
|
|
225
|
+
- **Website**: [skcapstone.io](https://skcapstone.io)
|
|
226
|
+
- **Organization**: [smilinTux](https://smilintux.org)
|
|
227
|
+
- **Contact**: hello@skcapstone.io
|
|
228
|
+
- **Issues**: [GitHub Issues](https://github.com/smilinTux/skcapstone/issues)
|
|
229
|
+
|
|
230
|
+
## License
|
|
231
|
+
|
|
232
|
+
**GPL-3.0-or-later** — Free as in freedom. Your agent is yours, not a product.
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
Built with love by the smilinTux ecosystem 🐧
|
|
237
|
+
|
|
238
|
+
[smilinTux](https://github.com/smilinTux) | [smilintux.org](https://smilintux.org)
|
|
239
|
+
|
|
240
|
+
*"The capstone that holds the arch together."*
|
|
241
|
+
|
|
242
|
+
#staycuriousANDkeepsmilin
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# SKCapstone - Sovereign Agent Framework
|
|
2
|
+
|
|
3
|
+
The complete sovereign agent framework with identity, memory, trust,
|
|
4
|
+
security, and P2P sync.
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
pip install skcapstone
|
|
10
|
+
skcapstone init --name <agent-name>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Commands
|
|
14
|
+
|
|
15
|
+
- `skcapstone status` -- show all pillar status
|
|
16
|
+
- `skcapstone init --name NAME` -- initialize a new agent
|
|
17
|
+
- `skcapstone sync setup` -- set up Syncthing for P2P memory sync
|
|
18
|
+
- `skcapstone sync pair DEVICE-ID` -- pair with another device
|
|
19
|
+
- `skcapstone sync push` -- push state to sync mesh
|
|
20
|
+
- `skcapstone sync pull` -- pull state from peers
|
|
21
|
+
- `skcapstone audit` -- run security audit
|
|
22
|
+
- `skcapstone token issue --subject NAME --cap CAPABILITY` -- issue auth token
|
|
23
|
+
|
|
24
|
+
## Pillars
|
|
25
|
+
|
|
26
|
+
| Pillar | Purpose |
|
|
27
|
+
| -------- | --------------------- |
|
|
28
|
+
| Identity | CapAuth GPG identity |
|
|
29
|
+
| Memory | Persistent agent memory |
|
|
30
|
+
| Trust | Cloud 9 + FEB + OOF |
|
|
31
|
+
| Security | Audit + threat detection |
|
|
32
|
+
| Sync | Sovereign Singularity P2P |
|
|
33
|
+
|
|
34
|
+
## Author
|
|
35
|
+
|
|
36
|
+
smilinTux -- staycuriousANDkeepsmilin
|
package/bin/cli.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* CLI bridge: forwards commands to the Python skcapstone CLI.
|
|
4
|
+
* Usage: skcapstone-js status
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const { execSync } = require("child_process");
|
|
8
|
+
|
|
9
|
+
const args = process.argv.slice(2).join(" ");
|
|
10
|
+
|
|
11
|
+
try {
|
|
12
|
+
const output = execSync(`skcapstone ${args}`, {
|
|
13
|
+
encoding: "utf-8",
|
|
14
|
+
stdio: "inherit",
|
|
15
|
+
});
|
|
16
|
+
} catch (err) {
|
|
17
|
+
process.exit(err.status || 1);
|
|
18
|
+
}
|