LordXido commited on
Commit
6e13fd7
·
verified ·
1 Parent(s): 5ca276f

Update llm.js

Browse files
Files changed (1) hide show
  1. llm.js +17 -14
llm.js CHANGED
@@ -1,18 +1,21 @@
1
- // llm.js Semantic Control Codec (NOT inference)
2
- export class LLM {
3
- handle(input, state) {
4
- const cmd = input.toLowerCase();
 
 
5
 
6
- if (cmd === "help") {
7
- return;
8
- }
9
 
10
- if (cmd.includes("spawn")) {
11
- state.agents.spawn();
12
- return;
13
- }
14
 
15
- // Natural language maps to control signals
16
- // Future: multiplex intent streams
17
- }
 
 
 
18
  }
 
1
+ const lanes = {
2
+ control: [],
3
+ world: [],
4
+ agent: [],
5
+ system: []
6
+ };
7
 
8
+ export function parseCommand(text) {
9
+ const t = text.toLowerCase();
 
10
 
11
+ if (t.includes("spawn")) return route("agent", { action: "spawn" });
12
+ if (t.includes("faster")) return route("world", { speed: 2.0 });
13
+ if (t.includes("reset")) return route("system", { reset: true });
 
14
 
15
+ return route("control", { raw: text });
16
+ }
17
+
18
+ function route(lane, payload) {
19
+ lanes[lane].push(payload);
20
+ return { lane, payload };
21
  }