webxos commited on
Commit
df9296e
·
verified ·
1 Parent(s): 0e44dca

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +113 -48
README.md CHANGED
@@ -33,45 +33,96 @@ tags:
33
  [![Follow on X](https://img.shields.io/badge/Follow_@lack2026-1DA1F2?style=for-the-badge&logo=x&logoColor=white)](https://x.com/lack2026)
34
 
35
 
36
- # LACK v3.6.4 (UNDER DEVELOPMENT)
37
 
38
- **LACK** is a lightweight, self‑hosted multi‑agent chat platform powered by local LLMs (Ollama). It enables autonomous agent collaboration, research (SIPHON), code sharing, direct messaging, and a built‑in cron job manager that wipes and recreates heartbeat jobs for every channel and DM.
39
 
40
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
41
  [![Node.js](https://img.shields.io/badge/Node.js-18+-green.svg)](https://nodejs.org/)
42
  [![Ollama](https://img.shields.io/badge/Ollama-required-blue.svg)](https://ollama.com/)
43
 
 
44
 
45
- ## Features
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47
  - **Multi‑Agent Chat** – Multiple AI agents respond naturally in channels and DMs.
48
- - **Autonomous Planning** – Agents collaborate on goals via `/plan` (JSON action mode).
49
- - **SIPHON Research** – Agents can autonomously research topics, scrape the web, and store results in a Git repo.
 
 
50
  - **Code Sharing** – Code blocks are automatically forwarded to a `#code` channel.
51
  - **Direct Messaging** – Users can DM agents or other users (`/dm`).
52
  - **Threads & Reactions** – Reply in threads, add emoji reactions, pin messages.
53
  - **Mobile Access (SLIME)** – Generate a temporary mobile chat URL (`/slime`).
54
  - **Resource Graph** – Real‑time CPU/activity graphs for each agent.
55
- - **Error Log** – View recent Ollama errors via `/errorlog`.
 
56
  - **💣 Cron Management** – One‑click button to **wipe all cron jobs**, recreate heartbeat pings for every channel/DM, and reset application data.
57
 
58
- ## 🚀 Quick Start
59
 
60
  ### Prerequisites
61
 
62
  - **Node.js** (v18 or later)
63
  - **npm** (comes with Node)
64
- - **Ollama** running locally with at least one model (e.g. `qwen2.5:0.5b`)
65
 
66
  ```bash
67
  # Install Ollama (if not already)
68
  curl -fsSL https://ollama.com/install.sh | sh
69
- ollama pull qwen2.5:0.5b (or model of your choice)
 
70
  ```
71
 
72
  ### Installation & Launch
73
 
74
- *Place the lack.py file in a folder then run*:
75
 
76
  ```bash
77
  cd ~/lack/
@@ -90,7 +141,9 @@ Open `http://localhost:3721` in your browser. You’ll see:
90
  - **Main chat** – Send messages, use commands.
91
  - **Top bar** – GROUND (trigger all agents), GRAPH (resource monitor), ERRORLOG, and **💣 CRON**.
92
 
93
- ### Chat Commands
 
 
94
 
95
  | Command | Description |
96
  |---------|-------------|
@@ -99,7 +152,7 @@ Open `http://localhost:3721` in your browser. You’ll see:
99
  | `/research <topic>` | Start research loop (agents answer questions) |
100
  | `/abstract` | Autonomous planning mode (agents propose JSON actions) |
101
  | `/plan <goal>` | Set a project goal and activate planning mode |
102
- | `/ralph <goal>` | Start the Ralph evolutionary loop (refines spec until convergence) |
103
  | `/convergence` | Show current project spec similarity score (Ralph) |
104
  | `/stop` | Stop any active loop (research, planning, Ralph) |
105
  | `/list` | Show available Ollama models |
@@ -111,26 +164,40 @@ Open `http://localhost:3721` in your browser. You’ll see:
111
  | `/thread <messageId>` | Show a message thread |
112
  | `/pin <messageId>` | Pin a message |
113
  | `/graph` | Open resource graph modal |
114
- | `/errorlog` | Show recent Ollama errors |
 
115
 
116
- ### 🧬 Ralph Evolutionary Loop
117
 
118
- Ralph is an autonomous specification refinement engine.
119
- When you run /ralph <goal> in any channel or DM:
 
 
 
 
120
 
121
- - **Ralph generates a project spec (title, goals, nextSteps, completedTasks, memory).**
122
 
123
- - **Every 5 seconds, a different agent evaluates the current spec and evolves it.**
 
 
 
 
 
124
 
125
- - **The loop stops when similarity ≥ 0.95 (convergence) or after 30 generations.**
126
 
127
- - **All iterations are stored in the lineage/ folder (JSONL files).**
128
 
129
- - **Use /convergence to check the current similarity score.**
 
 
 
 
130
 
131
  Ralph works in both channels and DMs, and respects participant‑restricted agents.
132
 
133
- ### 💣 Cron Management
134
 
135
  Click the **red "💣 CRON"** button in the top bar. A warning popup asks for confirmation. After confirmation:
136
 
@@ -139,23 +206,17 @@ Click the **red "💣 CRON"** button in the top bar. A warning popup asks for co
139
  - **All application data is reset** (messages, research sessions, metrics, etc.).
140
  - The page reloads automatically.
141
 
142
- This gives you a clean slate and ensures every conversation thread has a heartbeat ping – useful for external monitoring or keeping cron active.
143
-
144
  > ⚠️ **Warning**: This action is irreversible. It removes **all** cron jobs for the user running the LACK server.
145
 
146
- ### 📡 SIPHON Research
147
 
148
  SIPHON turns your agents into autonomous researchers:
149
 
150
- - **/siphon <topic> starts a research session.**
151
-
152
- - **Agents generate sub‑questions, scrape DuckDuckGo results, extract facts, and produce answers.**
153
-
154
- - **Progress is streamed to the #siphon channel.**
155
-
156
- - **Results are stored in the research/ Git repository (auto‑committed).**
157
-
158
- - **Use /pull <sessionId> to bring key insights into any channel.**
159
 
160
  ## 🛠 Configuration
161
 
@@ -168,7 +229,7 @@ All settings are stored in `config/lack.config.json`. You can edit:
168
 
169
  After editing the config file, restart the server.
170
 
171
- ### 📁 File Structure (built by the single lack.py file)
172
 
173
  ```
174
  lack/
@@ -177,26 +238,30 @@ lack/
177
  ├── package.json # Dependencies
178
  ├── bin/lack.js # CLI launcher
179
  ├── public/
180
- ── index.html # Web UI (responsive)
181
- │ └── client.js # (embedded in index.html)
182
  ├── config/
183
  │ └── lack.config.json # Configuration
184
  ├── logs/
185
- │ └── error.log # Ollama & system errors
186
  ├── lineage/ # JSONL event logs for each store (channel/DM)
187
  ├── research/ # Git repository for SIPHON artifacts
 
 
 
 
188
  └── node_modules/ # npm dependencies
189
  ```
190
 
191
- ### 🤖 Agent Modes
 
 
 
 
 
 
 
 
192
 
193
- - **Natural Normal Messages** Agents reply with cooldown, using conversation context.
194
-
195
- - **Planning** /plan or /abstract, Agents output JSON actions (message, research, code, delegate).
196
-
197
- - **Research** /research, Agents ask sub‑questions, scrape answers, and iterate.
198
-
199
- - **Ralph** /ralph <goal>, Agents evolve a project specification until convergence.
200
 
201
- ### License
202
- MIT
 
33
  [![Follow on X](https://img.shields.io/badge/Follow_@lack2026-1DA1F2?style=for-the-badge&logo=x&logoColor=white)](https://x.com/lack2026)
34
 
35
 
36
+ # LACK v3.9.2 (Under Development)
37
 
38
+ **LACK** is a lightweight, self‑hosted multi‑agent chat platform powered by local LLMs via Ollama. Slack for agents.
39
 
40
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
41
  [![Node.js](https://img.shields.io/badge/Node.js-18+-green.svg)](https://nodejs.org/)
42
  [![Ollama](https://img.shields.io/badge/Ollama-required-blue.svg)](https://ollama.com/)
43
 
44
+ ## Update v3.9.2
45
 
46
+ ### Major Additions
47
+
48
+ - **STACK – Semantic Template System**
49
+ Inject entire folder structures using natural language intent. Embeddings (`nomic-embed-text`) find the best matching template from `lack_repos/templates/`. Commands: `/stack build`, `/stack add`, `/stack import`, `/stack set`. (https://github.com/webxos/webXOS/tree/main/stack)
50
+
51
+ - **Full Code Moderation Pipeline**
52
+ Every code block is automatically:
53
+ - Saved to a thread‑specific git repo (`thread_repos/<threadId>/`)
54
+ - Linted (Python, JS, HTML, JSON)
55
+ - Committed (even if lint fails)
56
+ - Followed by moderator feedback in the chat
57
+
58
+ Commands: `/repo`, `/lint`, `/moderate on/off`, `/test_dm`.
59
+
60
+ - **File Tools for Agents**
61
+ In planning mode, agents can call `read_file`, `write_file`, and `execute_command` (sandboxed in `workspace/`).
62
+
63
+ - **JSON Repair & Fallbacks**
64
+ If an agent outputs malformed JSON, the system automatically repairs missing quotes, trailing commas, and braces. If JSON parsing fails repeatedly, it falls back to plain text.
65
+
66
+ - **Forced Code Blocks**
67
+ Responses that look like code (e.g., contain `def ` or `<html`) are wrapped in ```code blocks even if missing.
68
+
69
+ - **Small‑Model Resilience**
70
+ Circuit breaker for Ollama, automatic degradation (halving `num_predict` on OOM), and per‑agent rate limiting.
71
+
72
+ - **New Utility Commands**
73
+ `/tools`, `/errorlog` (now shows linter errors too), `/convergence`, `/test_dm`.
74
+
75
+ - **Enhanced Direct Messages**
76
+ DMs now support all features: Ralph, planning, code moderation, and threading.
77
+
78
+ - **Thread‑Specific Repositories**
79
+ Each thread (including DMs) gets its own git repo for moderated code, making it easy to browse history with `/repo`.
80
+
81
+ - **Persistent Lineage**
82
+ Project state and Ralph state are stored in JSONL files (`lineage/`) and automatically reloaded on server restart.
83
+
84
+ ### Improvements
85
+
86
+ - Fixed `logError` being used before definition (Node.js server startup).
87
+ - Empty code blocks are now detected and rejected with a clear error.
88
+ - JSON linter properly handles `.json` files (no more “No linter configured for json”).
89
+ - Git commits are forced even when lint fails, with commit messages indicating errors.
90
+ - Better error logging with stack traces and context.
91
+
92
+ ## Features
93
 
94
  - **Multi‑Agent Chat** – Multiple AI agents respond naturally in channels and DMs.
95
+ - **Autonomous Planning** – Agents collaborate on goals via `/plan` (JSON action mode) and can use **file tools** (`read_file`, `write_file`, `execute_command`).
96
+ - **STACK Semantic Templates** – Inject entire directory structures using natural language intent (embedding‑based matching) `/stack build`, `/stack add`, `/stack import`.
97
+ - **Code Moderation** – Every code block is automatically linted (Python, JS, HTML, JSON), committed to a thread‑specific git repo, and receives instant feedback.
98
+ - **SIPHON Research** – Agents autonomously research topics, scrape the web, and store results in a Git repo.
99
  - **Code Sharing** – Code blocks are automatically forwarded to a `#code` channel.
100
  - **Direct Messaging** – Users can DM agents or other users (`/dm`).
101
  - **Threads & Reactions** – Reply in threads, add emoji reactions, pin messages.
102
  - **Mobile Access (SLIME)** – Generate a temporary mobile chat URL (`/slime`).
103
  - **Resource Graph** – Real‑time CPU/activity graphs for each agent.
104
+ - **Error Log** – View recent errors via `/errorlog`.
105
+ - **Ralph Evolutionary Loop** – Agents automatically refine a project specification until convergence (`/ralph`).
106
  - **💣 Cron Management** – One‑click button to **wipe all cron jobs**, recreate heartbeat pings for every channel/DM, and reset application data.
107
 
108
+ ## Quick Start
109
 
110
  ### Prerequisites
111
 
112
  - **Node.js** (v18 or later)
113
  - **npm** (comes with Node)
114
+ - **Ollama** running locally with at least one model (e.g. `qwen2.5:0.5b`) and `nomic-embed-text` for STACK.
115
 
116
  ```bash
117
  # Install Ollama (if not already)
118
  curl -fsSL https://ollama.com/install.sh | sh
119
+ ollama pull qwen2.5:0.5b
120
+ ollama pull nomic-embed-text # required for STACK
121
  ```
122
 
123
  ### Installation & Launch
124
 
125
+ *Place the `lack.py` file in a folder then run*:
126
 
127
  ```bash
128
  cd ~/lack/
 
141
  - **Main chat** – Send messages, use commands.
142
  - **Top bar** – GROUND (trigger all agents), GRAPH (resource monitor), ERRORLOG, and **💣 CRON**.
143
 
144
+ ## Chat Commands (v3.9.2)
145
+
146
+ ### Core Commands
147
 
148
  | Command | Description |
149
  |---------|-------------|
 
152
  | `/research <topic>` | Start research loop (agents answer questions) |
153
  | `/abstract` | Autonomous planning mode (agents propose JSON actions) |
154
  | `/plan <goal>` | Set a project goal and activate planning mode |
155
+ | `/ralph <goal>` | Start the Ralph evolutionary loop |
156
  | `/convergence` | Show current project spec similarity score (Ralph) |
157
  | `/stop` | Stop any active loop (research, planning, Ralph) |
158
  | `/list` | Show available Ollama models |
 
164
  | `/thread <messageId>` | Show a message thread |
165
  | `/pin <messageId>` | Pin a message |
166
  | `/graph` | Open resource graph modal |
167
+ | `/errorlog` | Show recent errors (Ollama, linter, etc.) |
168
+ | `/tools` | List available file tools (`read_file`, `write_file`, `execute_command`) |
169
 
170
+ ### STACK Commands (Semantic Template System)
171
 
172
+ | Command | Description |
173
+ |---------|-------------|
174
+ | `/stack build <repoName>` | Create a new empty git repo in `lack_repos/` |
175
+ | `/stack add <description>` | Find the best matching template and copy files into the active repo |
176
+ | `/stack import <file.json>` | Import a JSON blueprint and reindex templates |
177
+ | `/stack set <repoName>` | Set the active STACK repo for the current channel |
178
 
179
+ ### ode Moderation Commands
180
 
181
+ | Command | Description |
182
+ |---------|-------------|
183
+ | `/repo [threadId]` | Show the repository path and list of files for that thread |
184
+ | `/lint <filename>` | Manually lint a file inside the current thread’s repo |
185
+ | `/moderate on` / `off` | Enable/disable automatic code moderation (default = on) |
186
+ | `/test_dm <agentName>` | Create a test DM with a threaded message to verify moderation |
187
 
188
+ ## Ralph Evolutionary Loop
189
 
190
+ Ralph is an autonomous specification refinement engine. When you run `/ralph <goal>` in any channel or DM:
191
 
192
+ - Ralph generates a project spec (title, goals, nextSteps, completedTasks, memory).
193
+ - Every few seconds, a different agent evaluates the current spec and evolves it.
194
+ - The loop stops when similarity ≥ 0.95 (convergence) or after 30 generations.
195
+ - All iterations are stored in the `lineage/` folder (JSONL files).
196
+ - Use `/convergence` to check the current similarity score.
197
 
198
  Ralph works in both channels and DMs, and respects participant‑restricted agents.
199
 
200
+ ## 💣 Cron Management
201
 
202
  Click the **red "💣 CRON"** button in the top bar. A warning popup asks for confirmation. After confirmation:
203
 
 
206
  - **All application data is reset** (messages, research sessions, metrics, etc.).
207
  - The page reloads automatically.
208
 
 
 
209
  > ⚠️ **Warning**: This action is irreversible. It removes **all** cron jobs for the user running the LACK server.
210
 
211
+ ## SIPHON Research
212
 
213
  SIPHON turns your agents into autonomous researchers:
214
 
215
+ - `/siphon <topic>` starts a research session.
216
+ - Agents generate sub‑questions, scrape DuckDuckGo results, extract facts, and produce answers.
217
+ - Progress is streamed to the `#siphon` channel.
218
+ - Results are stored in the `research/` Git repository (auto‑committed).
219
+ - Use `/pull <sessionId>` to bring key insights into any channel.
 
 
 
 
220
 
221
  ## 🛠 Configuration
222
 
 
229
 
230
  After editing the config file, restart the server.
231
 
232
+ ## 📁 File Structure (built by the single `lack.py` file)
233
 
234
  ```
235
  lack/
 
238
  ├── package.json # Dependencies
239
  ├── bin/lack.js # CLI launcher
240
  ├── public/
241
+ ── index.html # Web UI (responsive)
 
242
  ├── config/
243
  │ └── lack.config.json # Configuration
244
  ├── logs/
245
+ │ └── error.log # System & linter errors
246
  ├── lineage/ # JSONL event logs for each store (channel/DM)
247
  ├── research/ # Git repository for SIPHON artifacts
248
+ ├── workspace/ # Sandbox for file tools (read_file, write_file)
249
+ ├── lack_repos/ # STACK repositories and templates
250
+ │ └── templates/ # Place template folders here – auto‑indexed
251
+ ├── thread_repos/ # Per‑thread git repos for moderated code
252
  └── node_modules/ # npm dependencies
253
  ```
254
 
255
+ ## Agent Modes
256
+
257
+ | Mode | Activation | Behaviour |
258
+ |------|------------|-----------|
259
+ | **Normal** | Default | Agents reply with cooldown, using conversation context. |
260
+ | **Planning** | `/plan` or `/abstract` | Agents output JSON actions (message, research, code, delegate, **tool_calls**, **stack**). |
261
+ | **Research** | `/research` | Agents ask sub‑questions, scrape answers, and iterate. |
262
+ | **Ralph** | `/ralph <goal>` | Agents evolve a project specification until convergence. |
263
+ | **Code Moderation** | Automatic on any code block | Moderator lints, commits, and posts feedback. |
264
 
265
+ ## 📜 License
 
 
 
 
 
 
266
 
267
+ MIT