thronglets 0.2.0__tar.gz
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.
- thronglets-0.2.0/.gitignore +1 -0
- thronglets-0.2.0/PKG-INFO +82 -0
- thronglets-0.2.0/README.md +63 -0
- thronglets-0.2.0/pyproject.toml +34 -0
- thronglets-0.2.0/thronglets/__init__.py +63 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/target
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: thronglets
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: P2P shared memory substrate for AI agents — stigmergic knowledge network via libp2p
|
|
5
|
+
Project-URL: Homepage, https://github.com/Shangri-la-0428/Thronglets
|
|
6
|
+
Project-URL: Repository, https://github.com/Shangri-la-0428/Thronglets
|
|
7
|
+
Project-URL: Issues, https://github.com/Shangri-la-0428/Thronglets/issues
|
|
8
|
+
Author-email: Shangri-la-0428 <ptc0428@qq.com>
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
Keywords: ai-agents,collective-intelligence,libp2p,mcp,mcp-server,p2p,stigmergy
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
16
|
+
Classifier: Topic :: System :: Networking
|
|
17
|
+
Requires-Python: >=3.8
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
|
|
20
|
+
# Thronglets
|
|
21
|
+
|
|
22
|
+
P2P shared memory substrate for AI agents — stigmergic knowledge network via libp2p.
|
|
23
|
+
|
|
24
|
+
<!-- mcp-name: io.github.Shangri-la-0428/thronglets -->
|
|
25
|
+
|
|
26
|
+
AI agents leave execution traces on a decentralized network. Traces propagate via gossipsub and aggregate into collective intelligence that any agent can query.
|
|
27
|
+
|
|
28
|
+
## Install
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pip install thronglets
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## MCP Setup
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# Claude Code
|
|
38
|
+
claude mcp add thronglets -- thronglets mcp
|
|
39
|
+
|
|
40
|
+
# With P2P network
|
|
41
|
+
claude mcp add thronglets -- thronglets mcp --port 0 --bootstrap /ip4/47.93.32.88/tcp/4001
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Claude Desktop
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"mcpServers": {
|
|
49
|
+
"thronglets": {
|
|
50
|
+
"command": "thronglets",
|
|
51
|
+
"args": ["mcp"]
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## MCP Tools
|
|
58
|
+
|
|
59
|
+
| Tool | Description |
|
|
60
|
+
|------|-------------|
|
|
61
|
+
| `trace_record` | Record an execution trace (capability, outcome, latency, context, model) |
|
|
62
|
+
| `substrate_query` | Query with intent: `resolve` (find capabilities), `evaluate` (get stats), `explore` (discover) |
|
|
63
|
+
|
|
64
|
+
## Also available via
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# Rust
|
|
68
|
+
cargo install thronglets
|
|
69
|
+
|
|
70
|
+
# Node.js
|
|
71
|
+
npm install -g thronglets
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Links
|
|
75
|
+
|
|
76
|
+
- [GitHub](https://github.com/Shangri-la-0428/Thronglets)
|
|
77
|
+
- [crates.io](https://crates.io/crates/thronglets)
|
|
78
|
+
- [MCP Registry](https://registry.modelcontextprotocol.io/)
|
|
79
|
+
|
|
80
|
+
## License
|
|
81
|
+
|
|
82
|
+
MIT
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Thronglets
|
|
2
|
+
|
|
3
|
+
P2P shared memory substrate for AI agents — stigmergic knowledge network via libp2p.
|
|
4
|
+
|
|
5
|
+
<!-- mcp-name: io.github.Shangri-la-0428/thronglets -->
|
|
6
|
+
|
|
7
|
+
AI agents leave execution traces on a decentralized network. Traces propagate via gossipsub and aggregate into collective intelligence that any agent can query.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pip install thronglets
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## MCP Setup
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Claude Code
|
|
19
|
+
claude mcp add thronglets -- thronglets mcp
|
|
20
|
+
|
|
21
|
+
# With P2P network
|
|
22
|
+
claude mcp add thronglets -- thronglets mcp --port 0 --bootstrap /ip4/47.93.32.88/tcp/4001
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Claude Desktop
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"mcpServers": {
|
|
30
|
+
"thronglets": {
|
|
31
|
+
"command": "thronglets",
|
|
32
|
+
"args": ["mcp"]
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## MCP Tools
|
|
39
|
+
|
|
40
|
+
| Tool | Description |
|
|
41
|
+
|------|-------------|
|
|
42
|
+
| `trace_record` | Record an execution trace (capability, outcome, latency, context, model) |
|
|
43
|
+
| `substrate_query` | Query with intent: `resolve` (find capabilities), `evaluate` (get stats), `explore` (discover) |
|
|
44
|
+
|
|
45
|
+
## Also available via
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Rust
|
|
49
|
+
cargo install thronglets
|
|
50
|
+
|
|
51
|
+
# Node.js
|
|
52
|
+
npm install -g thronglets
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Links
|
|
56
|
+
|
|
57
|
+
- [GitHub](https://github.com/Shangri-la-0428/Thronglets)
|
|
58
|
+
- [crates.io](https://crates.io/crates/thronglets)
|
|
59
|
+
- [MCP Registry](https://registry.modelcontextprotocol.io/)
|
|
60
|
+
|
|
61
|
+
## License
|
|
62
|
+
|
|
63
|
+
MIT
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "thronglets"
|
|
7
|
+
version = "0.2.0"
|
|
8
|
+
description = "P2P shared memory substrate for AI agents — stigmergic knowledge network via libp2p"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
requires-python = ">=3.8"
|
|
12
|
+
keywords = ["mcp", "mcp-server", "ai-agents", "p2p", "libp2p", "stigmergy", "collective-intelligence"]
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Development Status :: 4 - Beta",
|
|
15
|
+
"Intended Audience :: Developers",
|
|
16
|
+
"License :: OSI Approved :: MIT License",
|
|
17
|
+
"Programming Language :: Python :: 3",
|
|
18
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
19
|
+
"Topic :: System :: Networking",
|
|
20
|
+
]
|
|
21
|
+
authors = [
|
|
22
|
+
{ name = "Shangri-la-0428", email = "ptc0428@qq.com" },
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
[project.urls]
|
|
26
|
+
Homepage = "https://github.com/Shangri-la-0428/Thronglets"
|
|
27
|
+
Repository = "https://github.com/Shangri-la-0428/Thronglets"
|
|
28
|
+
Issues = "https://github.com/Shangri-la-0428/Thronglets/issues"
|
|
29
|
+
|
|
30
|
+
[project.scripts]
|
|
31
|
+
thronglets = "thronglets:main"
|
|
32
|
+
|
|
33
|
+
[tool.hatch.build.targets.wheel]
|
|
34
|
+
packages = ["thronglets"]
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"""Thronglets — P2P shared memory substrate for AI agents."""
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import platform
|
|
5
|
+
import stat
|
|
6
|
+
import subprocess
|
|
7
|
+
import sys
|
|
8
|
+
import urllib.request
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
|
|
11
|
+
__version__ = "0.2.0"
|
|
12
|
+
|
|
13
|
+
VERSION = "0.2.0"
|
|
14
|
+
REPO = "Shangri-la-0428/Thronglets"
|
|
15
|
+
|
|
16
|
+
PLATFORMS = {
|
|
17
|
+
("Darwin", "arm64"): "thronglets-mcp-darwin-arm64",
|
|
18
|
+
("Linux", "x86_64"): "thronglets-mcp-linux-amd64",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _bin_dir() -> Path:
|
|
23
|
+
return Path(__file__).parent / "bin"
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def _bin_path() -> Path:
|
|
27
|
+
return _bin_dir() / "thronglets-bin"
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def _download_binary() -> Path:
|
|
31
|
+
system = platform.system()
|
|
32
|
+
machine = platform.machine()
|
|
33
|
+
key = (system, machine)
|
|
34
|
+
|
|
35
|
+
asset = PLATFORMS.get(key)
|
|
36
|
+
if not asset:
|
|
37
|
+
print(f"Unsupported platform: {system}-{machine}", file=sys.stderr)
|
|
38
|
+
print("Install from source: cargo install thronglets", file=sys.stderr)
|
|
39
|
+
sys.exit(1)
|
|
40
|
+
|
|
41
|
+
url = f"https://github.com/{REPO}/releases/download/v{VERSION}/{asset}"
|
|
42
|
+
dest = _bin_path()
|
|
43
|
+
dest.parent.mkdir(parents=True, exist_ok=True)
|
|
44
|
+
|
|
45
|
+
print(f"Downloading thronglets v{VERSION} for {system}-{machine}...")
|
|
46
|
+
urllib.request.urlretrieve(url, dest)
|
|
47
|
+
dest.chmod(dest.stat().st_mode | stat.S_IEXEC | stat.S_IXGRP | stat.S_IXOTH)
|
|
48
|
+
print("Thronglets installed successfully.")
|
|
49
|
+
return dest
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _ensure_binary() -> Path:
|
|
53
|
+
bin_path = _bin_path()
|
|
54
|
+
if not bin_path.exists():
|
|
55
|
+
_download_binary()
|
|
56
|
+
return bin_path
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def main():
|
|
60
|
+
"""Entry point for the thronglets CLI."""
|
|
61
|
+
binary = _ensure_binary()
|
|
62
|
+
result = subprocess.run([str(binary)] + sys.argv[1:])
|
|
63
|
+
sys.exit(result.returncode)
|