Add AEC (Aether Code) - cognitive shell language
- Cognitive primitives: recall, kg_*, dht_* - Self-awareness: can read and analyze own source code - Persistent memory: store and retrieve knowledge - File and HTTP operations - Functional programming with closures and higher-order functions
This commit is contained in:
@@ -0,0 +1,14 @@
|
|||||||
|
[package]
|
||||||
|
name = "aec"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name = "aec"
|
||||||
|
path = "src/main.rs"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
serde = { version = "1", features = ["derive"] }
|
||||||
|
serde_json = "1"
|
||||||
|
sha3 = "0.10"
|
||||||
|
hex = "0.4"
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
# AEC - Aether Code
|
||||||
|
|
||||||
|
A cognitive shell language for orchestrating intelligent systems.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
AEC (Aether Code) is a domain-specific language designed to provide cognitive primitives for:
|
||||||
|
|
||||||
|
- **Memory operations**: `recall()`, `recall_store()`, `recall_stats()`
|
||||||
|
- **Knowledge graph**: `kg_absorb()`, `kg_query()`, `kg_recall()`, `kg_stats()`
|
||||||
|
- **Distributed hash table**: `dht_ping()`, `dht_put()`, `dht_get()`, `dht_stats()`
|
||||||
|
- **Self-knowledge**: Read and analyze own source code
|
||||||
|
- **File operations**: Read, write, list directories
|
||||||
|
- **HTTP operations**: GET and POST requests
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- **Self-awareness**: AEC can read its own source code and understand its capabilities
|
||||||
|
- **Persistent memory**: Store and retrieve knowledge across sessions
|
||||||
|
- **Cognitive primitives**: Built-in functions for AI orchestration
|
||||||
|
- **Functional programming**: First-class functions, closures, higher-order functions
|
||||||
|
- **Pattern matching**: Match expressions for control flow
|
||||||
|
- **Module system**: Import and use external code
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cargo build --release
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Run a script
|
||||||
|
./target/release/aec script.aec
|
||||||
|
|
||||||
|
# Interactive REPL
|
||||||
|
./target/release/aec
|
||||||
|
```
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```aec
|
||||||
|
// Read own source code
|
||||||
|
let source = read_file("src/main.rs");
|
||||||
|
print("AEC is " + str(len(source)) + " characters");
|
||||||
|
|
||||||
|
// Store knowledge
|
||||||
|
recall_store("aec:size", str(len(source)), true);
|
||||||
|
|
||||||
|
// Retrieve knowledge
|
||||||
|
let size = recall("aec:size");
|
||||||
|
print("Stored size: " + size);
|
||||||
|
```
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
AEC spawns external services (aether-recall, DHT, knowledge graph) as child processes and communicates via JSON-RPC over stdin/stdout.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
See LICENSE file for details.
|
||||||
+1145
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user