Skip to content

Commit 09319b1

Browse files
authored
Merge pull request #4 from openSVM/copilot/fix-3
Add comprehensive documentation to draft.rs
2 parents f707247 + 7fc9fea commit 09319b1

File tree

8 files changed

+1775
-11
lines changed

8 files changed

+1775
-11
lines changed

docs.html

Lines changed: 250 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,250 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Solana AI Registries Documentation</title>
7+
<meta property="og:title" content="Solana AI Registries Documentation" />
8+
<meta property="og:description" content="Comprehensive documentation for the Solana AI Registries protocol, use cases, and $SVMAI token utility." />
9+
<meta property="og:image" content="./preview.png" />
10+
<meta property="og:type" content="website" />
11+
<meta property="og:url" content="https://aeamcp.com/docs.html" />
12+
<script src="https://cdn.tailwindcss.com"></script>
13+
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
14+
<style>
15+
body {
16+
font-family: 'Courier New', Courier, monospace;
17+
background-color: #FFFFFF;
18+
color: #262626;
19+
}
20+
.header {
21+
background-color: #171717;
22+
padding: 1rem;
23+
color: white;
24+
}
25+
.nav-link {
26+
display: inline-block;
27+
padding: 0.5rem 1rem;
28+
margin: 0.25rem;
29+
border: 1px solid #525252;
30+
border-radius: 0.25rem;
31+
color: #A3A3A3;
32+
text-decoration: none;
33+
transition: all 0.2s ease;
34+
background-color: #262626;
35+
}
36+
.nav-link:hover {
37+
background-color: #737373;
38+
color: #FFFFFF;
39+
border-color: #737373;
40+
}
41+
.nav-link.active {
42+
background-color: #404040;
43+
color: #FFFFFF;
44+
font-weight: bold;
45+
border-color: #404040;
46+
}
47+
.main-container {
48+
width: 100%;
49+
max-width: 1200px;
50+
margin: 0 auto;
51+
padding: 0 1rem;
52+
}
53+
#content {
54+
padding: 2rem 0;
55+
}
56+
#markdown-content {
57+
background-color: #f5f5f5;
58+
padding: 2rem;
59+
border-radius: 0.5rem;
60+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
61+
line-height: 1.6;
62+
}
63+
#markdown-content h1 {
64+
font-size: 2rem;
65+
margin-bottom: 1rem;
66+
padding-bottom: 0.5rem;
67+
border-bottom: 2px solid #525252;
68+
}
69+
#markdown-content h2 {
70+
font-size: 1.5rem;
71+
margin-top: 2rem;
72+
margin-bottom: 1rem;
73+
padding-bottom: 0.25rem;
74+
border-bottom: 1px solid #737373;
75+
}
76+
#markdown-content h3 {
77+
font-size: 1.25rem;
78+
margin-top: 1.5rem;
79+
margin-bottom: 0.75rem;
80+
}
81+
#markdown-content ul, #markdown-content ol {
82+
padding-left: 1.5rem;
83+
margin-bottom: 1rem;
84+
}
85+
#markdown-content ul {
86+
list-style-type: disc;
87+
}
88+
#markdown-content ol {
89+
list-style-type: decimal;
90+
}
91+
#markdown-content pre {
92+
background-color: #262626;
93+
color: #ffffff;
94+
padding: 1rem;
95+
border-radius: 0.25rem;
96+
overflow-x: auto;
97+
margin: 1rem 0;
98+
}
99+
#markdown-content code {
100+
background-color: #d4d4d4;
101+
padding: 0.2rem 0.4rem;
102+
border-radius: 0.25rem;
103+
font-family: monospace;
104+
}
105+
#markdown-content pre code {
106+
background-color: transparent;
107+
padding: 0;
108+
}
109+
#markdown-content table {
110+
width: 100%;
111+
border-collapse: collapse;
112+
margin: 1.5rem 0;
113+
}
114+
#markdown-content th, #markdown-content td {
115+
border: 1px solid #d4d4d4;
116+
padding: 0.5rem 1rem;
117+
text-align: left;
118+
}
119+
#markdown-content th {
120+
background-color: #e5e5e5;
121+
}
122+
#markdown-content blockquote {
123+
border-left: 4px solid #737373;
124+
padding-left: 1rem;
125+
margin: 1rem 0;
126+
color: #525252;
127+
}
128+
#markdown-content a {
129+
color: #0ea5e9;
130+
text-decoration: none;
131+
}
132+
#markdown-content a:hover {
133+
text-decoration: underline;
134+
}
135+
#sidebar {
136+
width: 250px;
137+
min-width: 250px;
138+
padding-right: 1.5rem;
139+
}
140+
</style>
141+
</head>
142+
<body>
143+
<header class="header">
144+
<nav class="main-container py-3 flex flex-col sm:flex-row sm:justify-between items-center">
145+
<a href="index.html" class="text-xl sm:text-2xl font-bold text-white hover:text-neutral-300 transition-colors text-center sm:text-left mb-3 sm:mb-0">Solana AI Registries Initiative</a>
146+
<div class="flex flex-col items-center space-y-2 sm:flex-row sm:space-y-0 sm:space-x-1 sm:flex-wrap text-sm sm:justify-end">
147+
<a href="index.html" class="nav-link">Main Page</a>
148+
</div>
149+
</nav>
150+
</header>
151+
152+
<main class="main-container py-8">
153+
<div class="flex flex-col md:flex-row">
154+
<div id="sidebar" class="mb-6 md:mb-0">
155+
<h2 class="text-xl font-bold mb-4">Documentation</h2>
156+
<ul id="doc-nav" class="space-y-2"></ul>
157+
</div>
158+
<div id="content" class="flex-grow">
159+
<div id="markdown-content" class="prose max-w-none"></div>
160+
</div>
161+
</div>
162+
</main>
163+
164+
<footer class="bg-neutral-800 text-white py-6">
165+
<div class="main-container text-center">
166+
<p>© 2024 Solana AI Registries Initiative. All rights reserved.</p>
167+
</div>
168+
</footer>
169+
170+
<script>
171+
// Available documentation files
172+
const docFiles = [
173+
{ id: 'readme', name: 'Overview', path: 'docs/README.md' },
174+
{ id: 'protocol', name: 'Protocol Specification', path: 'docs/protocol-specification.md' },
175+
{ id: 'svmai', name: '$SVMAI Token', path: 'docs/svmai-token.md' },
176+
{ id: 'usecases', name: 'Use Cases', path: 'docs/use-cases.md' },
177+
{ id: 'developer', name: 'Developer Guide', path: 'docs/developer-guide.md' }
178+
];
179+
180+
// Create navigation sidebar
181+
const docNav = document.getElementById('doc-nav');
182+
docFiles.forEach(doc => {
183+
const li = document.createElement('li');
184+
const a = document.createElement('a');
185+
a.href = `#${doc.id}`;
186+
a.dataset.path = doc.path;
187+
a.className = 'block p-2 hover:bg-neutral-200 rounded';
188+
a.innerText = doc.name;
189+
a.addEventListener('click', (e) => {
190+
e.preventDefault();
191+
loadMarkdown(doc.path);
192+
193+
// Update active state in navigation
194+
document.querySelectorAll('#doc-nav a').forEach(el => {
195+
el.classList.remove('font-bold', 'bg-neutral-200');
196+
});
197+
a.classList.add('font-bold', 'bg-neutral-200');
198+
199+
// Update URL hash
200+
window.location.hash = doc.id;
201+
});
202+
li.appendChild(a);
203+
docNav.appendChild(li);
204+
});
205+
206+
// Function to load and render markdown content
207+
async function loadMarkdown(path) {
208+
try {
209+
const response = await fetch(path);
210+
if (!response.ok) {
211+
throw new Error(`Failed to load ${path}: ${response.status} ${response.statusText}`);
212+
}
213+
const markdown = await response.text();
214+
document.getElementById('markdown-content').innerHTML = marked.parse(markdown);
215+
} catch (error) {
216+
console.error('Error loading markdown:', error);
217+
document.getElementById('markdown-content').innerHTML = `
218+
<div class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded">
219+
<h2 class="font-bold">Error Loading Document</h2>
220+
<p>${error.message}</p>
221+
</div>
222+
`;
223+
}
224+
}
225+
226+
// Load default document or from hash
227+
window.addEventListener('DOMContentLoaded', () => {
228+
const hash = window.location.hash.substring(1);
229+
const defaultDoc = docFiles[0].path;
230+
231+
let docToLoad = defaultDoc;
232+
let navItem = document.querySelector(`#doc-nav a[data-path="${defaultDoc}"]`);
233+
234+
if (hash) {
235+
const matchingDoc = docFiles.find(doc => doc.id === hash);
236+
if (matchingDoc) {
237+
docToLoad = matchingDoc.path;
238+
navItem = document.querySelector(`#doc-nav a[data-path="${docToLoad}"]`);
239+
}
240+
}
241+
242+
// Load the document and mark as active
243+
loadMarkdown(docToLoad);
244+
if (navItem) {
245+
navItem.classList.add('font-bold', 'bg-neutral-200');
246+
}
247+
});
248+
</script>
249+
</body>
250+
</html>

docs/README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Solana AI Registries Documentation
2+
3+
Welcome to the documentation for the Solana AI Registries protocol. This documentation covers the core specifications, use cases, token utility, and developer resources for working with the Agent Registry and MCP Server Registry protocols.
4+
5+
## Documentation Contents
6+
7+
### Protocol Specifications
8+
- [Protocol Specification](protocol-specification.md) - Comprehensive technical specification of the registry protocols
9+
10+
### Use Cases & Applications
11+
- [Use Cases](use-cases.md) - Detailed exploration of the key use cases and applications
12+
13+
### Token Economics
14+
- [$SVMAI Token](svmai-token.md) - The utility and tokenomics of the $SVMAI token
15+
16+
### Developer Resources
17+
- [Developer Guide](developer-guide.md) - Integration guide for developers building with the registry protocols
18+
19+
## Introduction
20+
21+
The Solana AI Registries protocol is designed to provide essential infrastructure for discovering, verifying, and interacting with autonomous AI agents and Model Context Protocol (MCP) servers. The protocol consists of two interconnected on-chain registries:
22+
23+
1. **Agent Registry**: A decentralized directory for autonomous agents operating on Solana, supporting the advertisement of agent capabilities, endpoints, identity, and metadata following the Autonomous Economic Agent (AEA) and Agent-to-Agent (A2A) paradigms.
24+
25+
2. **MCP Server Registry**: A directory for Model Context Protocol (MCP) compliant servers, enabling the discovery of AI tools, resources, and prompts following the MCP specification.
26+
27+
## Protocol Highlights
28+
29+
- **Hybrid Storage Model**: Essential data on-chain, detailed metadata off-chain with verification hashes
30+
- **Comprehensive Events**: Detailed events for off-chain indexing and querying
31+
- **Standardized Metadata**: Aligned with A2A, AEA, and MCP specifications
32+
- **Ownership Verification**: Clear ownership and access control through Solana key-pairs
33+
- **Extensibility**: Designed for future protocol enhancements and integrations
34+
35+
## Getting Started
36+
37+
For developers looking to integrate with the Solana AI Registries protocol:
38+
39+
1. Start with the [Protocol Specification](protocol-specification.md) to understand the core concepts
40+
2. Explore the [Use Cases](use-cases.md) to identify relevant applications for your project
41+
3. Read the [Developer Guide](developer-guide.md) for integration examples and best practices
42+
4. Learn about the [$SVMAI Token](svmai-token.md) to understand the economic model
43+
44+
## Community & Support
45+
46+
- GitHub Repository: [openSVM/aeamcp](https://github.com/openSVM/aeamcp)
47+
- Documentation Issues: Please report documentation issues via GitHub issues
48+
49+
## Contributing
50+
51+
We welcome contributions to improve the protocol and its documentation:
52+
53+
1. Fork the repository
54+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
55+
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
56+
4. Push to the branch (`git push origin feature/amazing-feature`)
57+
5. Open a Pull Request

0 commit comments

Comments
 (0)