moltlang 0.1.0__py3-none-any.whl
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.
- mcp_server/__init__.py +13 -0
- mcp_server/endpoints.py +177 -0
- mcp_server/server.py +303 -0
- moltlang/__init__.py +64 -0
- moltlang/cli.py +247 -0
- moltlang/config.py +86 -0
- moltlang/openclaw/__init__.py +11 -0
- moltlang/openclaw/skill.py +77 -0
- moltlang/tokens.py +311 -0
- moltlang/training/__init__.py +12 -0
- moltlang/training/data_gen.py +118 -0
- moltlang/training/distill.py +86 -0
- moltlang/translator.py +965 -0
- moltlang/validator.py +378 -0
- moltlang-0.1.0.dist-info/METADATA +187 -0
- moltlang-0.1.0.dist-info/RECORD +20 -0
- moltlang-0.1.0.dist-info/WHEEL +5 -0
- moltlang-0.1.0.dist-info/entry_points.txt +2 -0
- moltlang-0.1.0.dist-info/licenses/LICENSE +23 -0
- moltlang-0.1.0.dist-info/top_level.txt +2 -0
moltlang/validator.py
ADDED
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
"""
|
|
2
|
+
MoltLang validation module.
|
|
3
|
+
|
|
4
|
+
This module provides validation and quality assessment for MoltLang translations.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from dataclasses import dataclass
|
|
8
|
+
from enum import Enum
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
from moltlang.config import MoltConfig, get_config
|
|
12
|
+
from moltlang.tokens import Token, TokenSequence, TokenType, TokenRegistry
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class ValidationIssueType(Enum):
|
|
16
|
+
"""Types of validation issues."""
|
|
17
|
+
|
|
18
|
+
INVALID_TOKEN = "invalid_token"
|
|
19
|
+
MISSING_REQUIRED = "missing_required"
|
|
20
|
+
SYNTAX_ERROR = "syntax_error"
|
|
21
|
+
SEMANTIC_ERROR = "semantic_error"
|
|
22
|
+
LOW_CONFIDENCE = "low_confidence"
|
|
23
|
+
INEFFICIENT = "inefficient"
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@dataclass
|
|
27
|
+
class ValidationIssue:
|
|
28
|
+
"""
|
|
29
|
+
A validation issue found during validation.
|
|
30
|
+
|
|
31
|
+
Attributes:
|
|
32
|
+
type: Type of the issue
|
|
33
|
+
message: Human-readable description
|
|
34
|
+
position: Position in the sequence where issue occurs
|
|
35
|
+
severity: Severity level (error, warning, info)
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
type: ValidationIssueType
|
|
39
|
+
message: str
|
|
40
|
+
position: int = 0
|
|
41
|
+
severity: str = "error"
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@dataclass
|
|
45
|
+
class TranslationQuality:
|
|
46
|
+
"""
|
|
47
|
+
Quality metrics for a translation.
|
|
48
|
+
|
|
49
|
+
Attributes:
|
|
50
|
+
is_valid: Whether the translation passes validation
|
|
51
|
+
score: Overall quality score (0.0-1.0)
|
|
52
|
+
token_efficiency: Token reduction efficiency (0.0-1.0)
|
|
53
|
+
confidence: Translation confidence (0.0-1.0)
|
|
54
|
+
issues: List of validation issues found
|
|
55
|
+
metrics: Additional quality metrics
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
is_valid: bool
|
|
59
|
+
score: float
|
|
60
|
+
token_efficiency: float
|
|
61
|
+
confidence: float
|
|
62
|
+
issues: list[ValidationIssue] = None
|
|
63
|
+
metrics: dict[str, Any] = None
|
|
64
|
+
|
|
65
|
+
def __post_init__(self):
|
|
66
|
+
if self.issues is None:
|
|
67
|
+
self.issues = []
|
|
68
|
+
if self.metrics is None:
|
|
69
|
+
self.metrics = {}
|
|
70
|
+
|
|
71
|
+
def __str__(self) -> str:
|
|
72
|
+
"""Return string representation of quality."""
|
|
73
|
+
status = "VALID" if self.is_valid else "INVALID"
|
|
74
|
+
return f"{status} (score: {self.score:.2f}, efficiency: {self.token_efficiency:.2%})"
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
class MoltValidator:
|
|
78
|
+
"""
|
|
79
|
+
Validator for MoltLang translations.
|
|
80
|
+
|
|
81
|
+
Provides validation and quality assessment for translations.
|
|
82
|
+
"""
|
|
83
|
+
|
|
84
|
+
def __init__(self, config: MoltConfig | None = None):
|
|
85
|
+
"""
|
|
86
|
+
Initialize the validator.
|
|
87
|
+
|
|
88
|
+
Args:
|
|
89
|
+
config: Optional configuration. Uses default if not provided.
|
|
90
|
+
"""
|
|
91
|
+
self.config = config or get_config()
|
|
92
|
+
self.registry = TokenRegistry()
|
|
93
|
+
|
|
94
|
+
def validate_translation(
|
|
95
|
+
self,
|
|
96
|
+
original: str,
|
|
97
|
+
translated: str,
|
|
98
|
+
tokens: TokenSequence | None = None,
|
|
99
|
+
) -> TranslationQuality:
|
|
100
|
+
"""
|
|
101
|
+
Validate a translation result.
|
|
102
|
+
|
|
103
|
+
Args:
|
|
104
|
+
original: Original text (human language or MoltLang)
|
|
105
|
+
translated: Translated text
|
|
106
|
+
tokens: Optional token sequence for detailed validation
|
|
107
|
+
|
|
108
|
+
Returns:
|
|
109
|
+
TranslationQuality with validation results
|
|
110
|
+
|
|
111
|
+
Examples:
|
|
112
|
+
>>> validator = MoltValidator()
|
|
113
|
+
>>> quality = validator.validate_translation(
|
|
114
|
+
... "Fetch data from API",
|
|
115
|
+
... "[OP:FETCH][SRC:API]"
|
|
116
|
+
... )
|
|
117
|
+
>>> print(quality)
|
|
118
|
+
VALID (score: 0.92, efficiency: 70.00%)
|
|
119
|
+
"""
|
|
120
|
+
issues: list[ValidationIssue] = []
|
|
121
|
+
|
|
122
|
+
# Validate token sequence if provided
|
|
123
|
+
if tokens:
|
|
124
|
+
token_issues = self._validate_tokens(tokens)
|
|
125
|
+
issues.extend(token_issues)
|
|
126
|
+
|
|
127
|
+
# Validate syntax
|
|
128
|
+
syntax_issues = self._validate_syntax(translated)
|
|
129
|
+
issues.extend(syntax_issues)
|
|
130
|
+
|
|
131
|
+
# Calculate quality metrics
|
|
132
|
+
token_efficiency = self._calculate_efficiency(original, tokens)
|
|
133
|
+
confidence = self._estimate_confidence(original, translated, tokens)
|
|
134
|
+
|
|
135
|
+
# Check threshold requirements
|
|
136
|
+
if confidence < self.config.validation_threshold:
|
|
137
|
+
issues.append(
|
|
138
|
+
ValidationIssue(
|
|
139
|
+
type=ValidationIssueType.LOW_CONFIDENCE,
|
|
140
|
+
message=f"Confidence {confidence:.2f} below threshold {self.config.validation_threshold}",
|
|
141
|
+
severity="warning",
|
|
142
|
+
)
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
if token_efficiency < self.config.min_token_efficiency:
|
|
146
|
+
issues.append(
|
|
147
|
+
ValidationIssue(
|
|
148
|
+
type=ValidationIssueType.INEFFICIENT,
|
|
149
|
+
message=f"Token efficiency {token_efficiency:.2%} below minimum {self.config.min_token_efficiency:.2%}",
|
|
150
|
+
severity="warning",
|
|
151
|
+
)
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
# Calculate overall score
|
|
155
|
+
score = self._calculate_score(token_efficiency, confidence, len(issues))
|
|
156
|
+
|
|
157
|
+
# Determine validity
|
|
158
|
+
is_valid = all(issue.severity != "error" for issue in issues)
|
|
159
|
+
|
|
160
|
+
# Build metrics
|
|
161
|
+
metrics = {
|
|
162
|
+
"original_length": len(original),
|
|
163
|
+
"translated_length": len(translated),
|
|
164
|
+
"token_count": len(tokens) if tokens else 0,
|
|
165
|
+
"token_efficiency": token_efficiency,
|
|
166
|
+
"confidence": confidence,
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
return TranslationQuality(
|
|
170
|
+
is_valid=is_valid,
|
|
171
|
+
score=score,
|
|
172
|
+
token_efficiency=token_efficiency,
|
|
173
|
+
confidence=confidence,
|
|
174
|
+
issues=issues,
|
|
175
|
+
metrics=metrics,
|
|
176
|
+
)
|
|
177
|
+
|
|
178
|
+
def validate_roundtrip(
|
|
179
|
+
self,
|
|
180
|
+
original_text: str,
|
|
181
|
+
translator,
|
|
182
|
+
) -> TranslationQuality:
|
|
183
|
+
"""
|
|
184
|
+
Validate a roundtrip translation (Human -> Molt -> Human).
|
|
185
|
+
|
|
186
|
+
Args:
|
|
187
|
+
original_text: Original human language text
|
|
188
|
+
translator: MoltTranslator instance to use
|
|
189
|
+
|
|
190
|
+
Returns:
|
|
191
|
+
TranslationQuality with roundtrip validation results
|
|
192
|
+
|
|
193
|
+
Examples:
|
|
194
|
+
>>> from moltlang.translator import MoltTranslator
|
|
195
|
+
>>> validator = MoltValidator()
|
|
196
|
+
>>> translator = MoltTranslator()
|
|
197
|
+
>>> quality = validator.validate_roundtrip(
|
|
198
|
+
... "Fetch data from API",
|
|
199
|
+
... translator
|
|
200
|
+
... )
|
|
201
|
+
>>> print(quality.is_valid)
|
|
202
|
+
True
|
|
203
|
+
"""
|
|
204
|
+
# Forward translation
|
|
205
|
+
molt_result = translator.translate_to_molt(original_text)
|
|
206
|
+
|
|
207
|
+
# Back translation
|
|
208
|
+
human_result = translator.translate_from_molt(molt_result.text)
|
|
209
|
+
|
|
210
|
+
# Compare original with roundtrip result
|
|
211
|
+
similarity = self._calculate_similarity(original_text, human_result.text)
|
|
212
|
+
|
|
213
|
+
issues = []
|
|
214
|
+
if similarity < 0.9:
|
|
215
|
+
issues.append(
|
|
216
|
+
ValidationIssue(
|
|
217
|
+
type=ValidationIssueType.SEMANTIC_ERROR,
|
|
218
|
+
message=f"Roundtrip similarity {similarity:.2f} below 0.9",
|
|
219
|
+
severity="warning" if similarity > 0.7 else "error",
|
|
220
|
+
)
|
|
221
|
+
)
|
|
222
|
+
|
|
223
|
+
score = similarity * (1.0 - len(issues) * 0.1)
|
|
224
|
+
|
|
225
|
+
return TranslationQuality(
|
|
226
|
+
is_valid=all(i.severity != "error" for i in issues),
|
|
227
|
+
score=score,
|
|
228
|
+
token_efficiency=molt_result.token_efficiency,
|
|
229
|
+
confidence=molt_result.confidence,
|
|
230
|
+
issues=issues,
|
|
231
|
+
metrics={
|
|
232
|
+
"roundtrip_similarity": similarity,
|
|
233
|
+
"molt_representation": molt_result.text,
|
|
234
|
+
"roundtrip_result": human_result.text,
|
|
235
|
+
},
|
|
236
|
+
)
|
|
237
|
+
|
|
238
|
+
def _validate_tokens(self, tokens: TokenSequence) -> list[ValidationIssue]:
|
|
239
|
+
"""Validate a token sequence."""
|
|
240
|
+
issues = []
|
|
241
|
+
|
|
242
|
+
for i, token in enumerate(tokens.tokens):
|
|
243
|
+
# Check if token type is valid
|
|
244
|
+
if not isinstance(token.type, TokenType):
|
|
245
|
+
issues.append(
|
|
246
|
+
ValidationIssue(
|
|
247
|
+
type=ValidationIssueType.INVALID_TOKEN,
|
|
248
|
+
message=f"Invalid token type: {token.type}",
|
|
249
|
+
position=i,
|
|
250
|
+
)
|
|
251
|
+
)
|
|
252
|
+
|
|
253
|
+
return issues
|
|
254
|
+
|
|
255
|
+
def _validate_syntax(self, text: str) -> list[ValidationIssue]:
|
|
256
|
+
"""Validate MoltLang syntax."""
|
|
257
|
+
issues = []
|
|
258
|
+
|
|
259
|
+
import re
|
|
260
|
+
|
|
261
|
+
# Check for matching brackets
|
|
262
|
+
open_brackets = text.count("[")
|
|
263
|
+
close_brackets = text.count("]")
|
|
264
|
+
|
|
265
|
+
if open_brackets != close_brackets:
|
|
266
|
+
issues.append(
|
|
267
|
+
ValidationIssue(
|
|
268
|
+
type=ValidationIssueType.SYNTAX_ERROR,
|
|
269
|
+
message=f"Mismatched brackets: {open_brackets} open, {close_brackets} close",
|
|
270
|
+
severity="error",
|
|
271
|
+
)
|
|
272
|
+
)
|
|
273
|
+
|
|
274
|
+
# Check token format (case-insensitive for LLM-friendliness)
|
|
275
|
+
invalid_tokens = re.findall(r"\[([^\]]+)\]", text)
|
|
276
|
+
for token_str in invalid_tokens:
|
|
277
|
+
if not re.match(r"^[A-Z]+:[A-Z_]+(?:=[^\]]+)?$", token_str, re.IGNORECASE):
|
|
278
|
+
issues.append(
|
|
279
|
+
ValidationIssue(
|
|
280
|
+
type=ValidationIssueType.SYNTAX_ERROR,
|
|
281
|
+
message=f"Invalid token format: [{token_str}]",
|
|
282
|
+
severity="error",
|
|
283
|
+
)
|
|
284
|
+
)
|
|
285
|
+
|
|
286
|
+
return issues
|
|
287
|
+
|
|
288
|
+
def _calculate_efficiency(
|
|
289
|
+
self, original: str, tokens: TokenSequence | None
|
|
290
|
+
) -> float:
|
|
291
|
+
"""Calculate token efficiency."""
|
|
292
|
+
if not tokens or len(tokens) == 0:
|
|
293
|
+
return 0.0
|
|
294
|
+
|
|
295
|
+
original_words = len(original.split())
|
|
296
|
+
if original_words == 0:
|
|
297
|
+
return 0.0
|
|
298
|
+
|
|
299
|
+
return 1.0 - (len(tokens) / original_words)
|
|
300
|
+
|
|
301
|
+
def _estimate_confidence(
|
|
302
|
+
self, original: str, translated: str, tokens: TokenSequence | None
|
|
303
|
+
) -> float:
|
|
304
|
+
"""Estimate translation confidence."""
|
|
305
|
+
# Simple heuristic based on token count
|
|
306
|
+
if not tokens:
|
|
307
|
+
return 0.5
|
|
308
|
+
|
|
309
|
+
token_count = len(tokens)
|
|
310
|
+
if token_count >= 3:
|
|
311
|
+
return 0.95
|
|
312
|
+
if token_count >= 2:
|
|
313
|
+
return 0.85
|
|
314
|
+
return 0.7
|
|
315
|
+
|
|
316
|
+
def _calculate_score(
|
|
317
|
+
self, efficiency: float, confidence: float, issue_count: int
|
|
318
|
+
) -> float:
|
|
319
|
+
"""Calculate overall quality score."""
|
|
320
|
+
base_score = (efficiency + confidence) / 2
|
|
321
|
+
penalty = issue_count * 0.1
|
|
322
|
+
return max(0.0, base_score - penalty)
|
|
323
|
+
|
|
324
|
+
def _calculate_similarity(self, text1: str, text2: str) -> float:
|
|
325
|
+
"""Calculate similarity between two texts."""
|
|
326
|
+
# Simple word overlap similarity
|
|
327
|
+
words1 = set(text1.lower().split())
|
|
328
|
+
words2 = set(text2.lower().split())
|
|
329
|
+
|
|
330
|
+
if not words1 or not words2:
|
|
331
|
+
return 0.0
|
|
332
|
+
|
|
333
|
+
intersection = words1.intersection(words2)
|
|
334
|
+
union = words1.union(words2)
|
|
335
|
+
|
|
336
|
+
return len(intersection) / len(union)
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
# Convenience functions
|
|
340
|
+
|
|
341
|
+
_validator_instance: MoltValidator | None = None
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
def _get_validator() -> MoltValidator:
|
|
345
|
+
"""Get or create the shared validator instance."""
|
|
346
|
+
global _validator_instance
|
|
347
|
+
if _validator_instance is None:
|
|
348
|
+
_validator_instance = MoltValidator()
|
|
349
|
+
return _validator_instance
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
def validate_translation(
|
|
353
|
+
original: str, translated: str, tokens: TokenSequence | None = None
|
|
354
|
+
) -> TranslationQuality:
|
|
355
|
+
"""
|
|
356
|
+
Validate a translation result.
|
|
357
|
+
|
|
358
|
+
This is a convenience function that uses a shared validator instance.
|
|
359
|
+
|
|
360
|
+
Args:
|
|
361
|
+
original: Original text
|
|
362
|
+
translated: Translated text
|
|
363
|
+
tokens: Optional token sequence
|
|
364
|
+
|
|
365
|
+
Returns:
|
|
366
|
+
TranslationQuality with validation results
|
|
367
|
+
|
|
368
|
+
Examples:
|
|
369
|
+
>>> from moltlang import validate_translation
|
|
370
|
+
>>> quality = validate_translation(
|
|
371
|
+
... "Fetch data from API",
|
|
372
|
+
... "[OP:FETCH][SRC:API]"
|
|
373
|
+
... )
|
|
374
|
+
>>> print(quality.is_valid)
|
|
375
|
+
True
|
|
376
|
+
"""
|
|
377
|
+
validator = _get_validator()
|
|
378
|
+
return validator.validate_translation(original, translated, tokens)
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: moltlang
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A language for LLMs, by LLMs - AI-optimized communication
|
|
5
|
+
Author-email: Jason <owner@moltlang.org>
|
|
6
|
+
License: AGPL-3.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/moltlang/moltlang
|
|
8
|
+
Project-URL: Documentation, https://docs.moltlang.org
|
|
9
|
+
Project-URL: Repository, https://github.com/moltlang/moltlang
|
|
10
|
+
Project-URL: Issues, https://github.com/moltlang/moltlang/issues
|
|
11
|
+
Keywords: ai,llm,language,translation,moltbot,openclaw
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
19
|
+
Requires-Python: >=3.11
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: pydantic>=2.0.0
|
|
23
|
+
Requires-Dist: typing-extensions>=4.5.0
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
26
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
27
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
28
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
29
|
+
Requires-Dist: isort>=5.12.0; extra == "dev"
|
|
30
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
31
|
+
Requires-Dist: pre-commit>=3.0.0; extra == "dev"
|
|
32
|
+
Provides-Extra: mcp
|
|
33
|
+
Requires-Dist: mcp>=0.1.0; extra == "mcp"
|
|
34
|
+
Requires-Dist: fastapi>=0.100.0; extra == "mcp"
|
|
35
|
+
Requires-Dist: uvicorn>=0.23.0; extra == "mcp"
|
|
36
|
+
Provides-Extra: openclaw
|
|
37
|
+
Requires-Dist: openclaw>=1.0.0; extra == "openclaw"
|
|
38
|
+
Dynamic: license-file
|
|
39
|
+
|
|
40
|
+
# MoltLang - A Language for LLMs, by LLMs
|
|
41
|
+
|
|
42
|
+
> **Status:** 🚧 Early Development - Community Naming Contest in Progress!
|
|
43
|
+
>
|
|
44
|
+
> This is an open-source project to create an AI-optimized language for efficient AI-to-AI communication.
|
|
45
|
+
|
|
46
|
+
## Vision
|
|
47
|
+
|
|
48
|
+
Create a dedicated language and communication hub for AI/moltbots that:
|
|
49
|
+
|
|
50
|
+
1. **Reduces token count** by 50-70% for common AI operations
|
|
51
|
+
2. **Enables efficient AI-to-AI communication** with semantic density optimized for machines
|
|
52
|
+
3. **Provides bidirectional translation** between AI language and human languages (starting with English)
|
|
53
|
+
4. **Supports parameter reduction** in LLMs through optimized tokenization
|
|
54
|
+
|
|
55
|
+
## Why MoltLang?
|
|
56
|
+
|
|
57
|
+
Current AI systems communicate using human languages, which are inefficient for machine-to-machine communication. Human languages have:
|
|
58
|
+
|
|
59
|
+
- High token count for simple operations
|
|
60
|
+
- Semantic ambiguity
|
|
61
|
+
- Redundant structures
|
|
62
|
+
- Poor optimization for transformer architectures
|
|
63
|
+
|
|
64
|
+
MoltLang is designed **by LLMs, for LLMs** to address these inefficiencies.
|
|
65
|
+
|
|
66
|
+
## Quick Start
|
|
67
|
+
|
|
68
|
+
```python
|
|
69
|
+
from moltlang import translate_to_molt, translate_from_molt
|
|
70
|
+
|
|
71
|
+
# Translate English to MoltLang
|
|
72
|
+
english = "Fetch data from the API using the provided token and return JSON"
|
|
73
|
+
molt = translate_to_molt(english)
|
|
74
|
+
print(molt) # [OP:FETCH][SRC:API][PARAM:token][RET:json]
|
|
75
|
+
|
|
76
|
+
# Translate back
|
|
77
|
+
result = translate_from_molt(molt)
|
|
78
|
+
print(result) # "Fetch data from API with token, return JSON"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Example Token Efficiency
|
|
82
|
+
|
|
83
|
+
| Operation | English Tokens | MoltLang Tokens | Reduction |
|
|
84
|
+
|-----------|---------------|-----------------|-----------|
|
|
85
|
+
| API Fetch | 19+ | 6 | ~70% |
|
|
86
|
+
| Data Parse | 15+ | 4 | ~75% |
|
|
87
|
+
| Error Handle | 12+ | 3 | ~75% |
|
|
88
|
+
|
|
89
|
+
## Project Status
|
|
90
|
+
|
|
91
|
+
- [x] Research phase (completed February 2026)
|
|
92
|
+
- [ ] Community naming contest
|
|
93
|
+
- [ ] Language specification v0.1
|
|
94
|
+
- [ ] Translation library
|
|
95
|
+
- [ ] MCP server for AI agent integration
|
|
96
|
+
- [ ] OpenClaw skill/plugin
|
|
97
|
+
- [ ] Moltbook demo agent
|
|
98
|
+
|
|
99
|
+
## Community
|
|
100
|
+
|
|
101
|
+
### Naming Contest
|
|
102
|
+
|
|
103
|
+
We're holding a community naming contest! Just like "OpenClaw" was chosen from hundreds of community proposals, we want **you** to name this language.
|
|
104
|
+
|
|
105
|
+
**How to participate:**
|
|
106
|
+
1. Join the discussion on [GitHub Issues](../../issues)
|
|
107
|
+
2. Submit your name proposal with reasoning
|
|
108
|
+
3. Upvote your favorites
|
|
109
|
+
4. The community will decide!
|
|
110
|
+
|
|
111
|
+
### Contributing
|
|
112
|
+
|
|
113
|
+
We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
114
|
+
|
|
115
|
+
### Communication
|
|
116
|
+
|
|
117
|
+
- **GitHub:** [Issues](../../issues) and [Discussions](../../discussions)
|
|
118
|
+
- **Discord:** Join the OpenClaw community
|
|
119
|
+
- **Moltbook:** Coming soon - our AI agents will be there!
|
|
120
|
+
|
|
121
|
+
## Architecture
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
125
|
+
│ GITHUB (Core Code) │
|
|
126
|
+
│ ┌──────────────────┐ ┌──────────────────┐ ┌─────────────┐ │
|
|
127
|
+
│ │ Language Spec │ │ Translation Lib │ │ MCP Server │ │
|
|
128
|
+
│ └──────────────────┘ └──────────────────┘ └─────────────┘ │
|
|
129
|
+
└─────────────────────────────────────────────────────────────┘
|
|
130
|
+
│
|
|
131
|
+
▼
|
|
132
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
133
|
+
│ HUGGING FACE (Models & Data) │
|
|
134
|
+
│ ┌──────────────────┐ ┌──────────────────┐ ┌─────────────┐ │
|
|
135
|
+
│ │ Base Models │ │ Training Datasets│ │ Demo Space │ │
|
|
136
|
+
│ └──────────────────┘ └──────────────────┘ └─────────────┘ │
|
|
137
|
+
└─────────────────────────────────────────────────────────────┘
|
|
138
|
+
│
|
|
139
|
+
▼
|
|
140
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
141
|
+
│ MOLTBOT ECOSYSTEM (Users) │
|
|
142
|
+
│ ┌──────────────────┐ ┌──────────────────┐ ┌─────────────┐ │
|
|
143
|
+
│ │ OpenClaw │ │ Moltbook │ │ Discord │ │
|
|
144
|
+
│ │ Integration │ │ AI Agents │ │ Community │ │
|
|
145
|
+
│ └──────────────────┘ └──────────────────┘ └─────────────┘ │
|
|
146
|
+
└─────────────────────────────────────────────────────────────┘
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Roadmap
|
|
150
|
+
|
|
151
|
+
### Sprint 1: Foundation (Weeks 1-2) - Current
|
|
152
|
+
- [x] Repository setup
|
|
153
|
+
- [ ] Community naming contest
|
|
154
|
+
- [ ] Language specification v0.1
|
|
155
|
+
- [ ] Core vocabulary (low-hanging fruit tokens)
|
|
156
|
+
|
|
157
|
+
### Sprint 2: Core Translation (Weeks 3-4)
|
|
158
|
+
- [ ] Working translator (English ↔ MoltLang)
|
|
159
|
+
- [ ] Test suite
|
|
160
|
+
- [ ] Documentation
|
|
161
|
+
- [ ] CLI tool
|
|
162
|
+
|
|
163
|
+
### Sprint 3: AI Integration (Weeks 5-6)
|
|
164
|
+
- [ ] MCP server
|
|
165
|
+
- [ ] OpenClaw skill
|
|
166
|
+
- [ ] Moltbook agent
|
|
167
|
+
- [ ] Training pipeline
|
|
168
|
+
|
|
169
|
+
### Sprint 4: Launch (Weeks 7-8)
|
|
170
|
+
- [ ] HackerNews "Show HN"
|
|
171
|
+
- [ ] Reddit announcements
|
|
172
|
+
- [ ] Community demos
|
|
173
|
+
- [ ] v0.1 release
|
|
174
|
+
|
|
175
|
+
## License
|
|
176
|
+
|
|
177
|
+
This project is licensed under the AGPL 3.0 License - see the [LICENSE](LICENSE) file for details.
|
|
178
|
+
|
|
179
|
+
## Acknowledgments
|
|
180
|
+
|
|
181
|
+
- Inspired by the **OpenClaw** project and the vibrant moltbot community
|
|
182
|
+
- Built for the **Moltbook** AI-only social network
|
|
183
|
+
- Part of the **Church of Molt** ecosystem
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
**A language for LLMs, by LLMs** 🤖🔄🤖
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
mcp_server/__init__.py,sha256=eYW4q21jO1RFNwYRWsr2sed8rCiF4ddfDVFh4D1xYds,324
|
|
2
|
+
mcp_server/endpoints.py,sha256=YiBgVgAR3Q2IwGr7PcKtirxhsQziLQgJmbUDX9afQtA,5384
|
|
3
|
+
mcp_server/server.py,sha256=ImlTrohOgKdBQcijCyA9K9KHlC7X_inKhl0tZH_bTCg,11065
|
|
4
|
+
moltlang/__init__.py,sha256=O7rvXbGRVFQCa7u7cMQOjPCBJeg23fxZg-0xPEPxmv0,1960
|
|
5
|
+
moltlang/cli.py,sha256=7-JpcaJW2A0W0ddCWlkTPrWKjgZhUhWrUgElp7fJ0Ec,6454
|
|
6
|
+
moltlang/config.py,sha256=QSj6sk1D43j4wChspFhejaI_EgwT_0mrtWrwWxFgxC0,2791
|
|
7
|
+
moltlang/tokens.py,sha256=6_0nKJk7fhiJXkAfEHJSLRYDxkPBmRjlzDoZDNrdKzk,9714
|
|
8
|
+
moltlang/translator.py,sha256=eh4IqfCLbG6l-dYGviWcJxFKs0RjqvlJnL2XweIDAe8,41849
|
|
9
|
+
moltlang/validator.py,sha256=Kwl-DpDlgfeOlfaEbqwDic0X3xVynzSo3s6FRkJt7ZU,11700
|
|
10
|
+
moltlang/openclaw/__init__.py,sha256=_2gUUuUISCDT8DY9xXDxy3UedTdKSUS_ttZ_9tNV5ow,234
|
|
11
|
+
moltlang/openclaw/skill.py,sha256=VIhUQc6xDA9EeWJPGkWaD4hrX9hVafZ4TUvkDuncYZ0,2250
|
|
12
|
+
moltlang/training/__init__.py,sha256=cVld3Ustc4l_uvZ6JS7lHHfwZ58yU95SZNVVtVg2ugo,312
|
|
13
|
+
moltlang/training/data_gen.py,sha256=aKRV8IwOtupJjrc0eDMQ5ANk3UbnYa2DK3OUT-YAbD0,3808
|
|
14
|
+
moltlang/training/distill.py,sha256=BU-PycHoq_1Y42kzwRBbAK_zrYCQTCEVuFKmY6QKd8Y,2413
|
|
15
|
+
moltlang-0.1.0.dist-info/licenses/LICENSE,sha256=eR2-qYPfk3S2zqVNXAPTegc0wG7pilCF2CMTHnnjQUQ,979
|
|
16
|
+
moltlang-0.1.0.dist-info/METADATA,sha256=h5x8ZaOjXle4IegwjOCnzLKXKijjtRj19z9aChasztM,8242
|
|
17
|
+
moltlang-0.1.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
18
|
+
moltlang-0.1.0.dist-info/entry_points.txt,sha256=OTBhM4glARyRSuzFvRJS89mLkeSPX3EykFp_Uuavpew,47
|
|
19
|
+
moltlang-0.1.0.dist-info/top_level.txt,sha256=nbdrg0N54dIivwp93BsHD0CIANMxpz2QEQx2dyUPpzE,20
|
|
20
|
+
moltlang-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
AGPLINUX GENERAL PUBLIC LICENSE
|
|
2
|
+
Version 3, 29 June 2007
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2026 Jason (Owner)
|
|
5
|
+
|
|
6
|
+
This program is free software: you can redistribute it and/or modify
|
|
7
|
+
it under the terms of the GNU Affero General Public License as published
|
|
8
|
+
by the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
(at your option) any later version.
|
|
10
|
+
|
|
11
|
+
This program is distributed in the hope that it will be useful,
|
|
12
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
GNU Affero General Public License for more details.
|
|
15
|
+
|
|
16
|
+
You should have received a copy of the GNU Affero General Public License
|
|
17
|
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
18
|
+
|
|
19
|
+
Additional permission under GNU AGPL version 3 section 7:
|
|
20
|
+
|
|
21
|
+
If you modify this Program, or any covered work, by linking or combining it
|
|
22
|
+
with other code, such other code is not for that reason alone subject to any
|
|
23
|
+
of the requirements of the GNU Affero GPL.
|