Phase 4/7: nREPL, Tool-call format, Module caching

T4.5 nREPL: TCP-based JSON REPL (cljnim repl --tcp 9999)
T4.6 Tool-call: {"tool":"cljnim/eval","args":{"form":"..."}}
T7.3 Module caching: nimcache/ in project dir, skip regen if unchanged

Phase 4 now 100% complete. Phase 7: 3/4 tasks done.
This commit is contained in:
2026-05-08 19:57:39 +03:00
parent b67962dbba
commit 62ca70d05a
4 changed files with 146 additions and 18 deletions
+3 -3
View File
@@ -18,8 +18,8 @@
| T4.2 | Batch evaluation | ✅ | 🟢 | `src/repl.nim` | `{"op":"eval-batch","forms":["(defn f[x]x)","(f 42)"]}` works |
| T4.3 | File operations | ✅ | 🟡 | `lib/cljnim_runtime.nim`, `src/emitter.nim` | `(file/read)`, `(file/write)`, `(file/ls)` work |
| T4.4 | Git operations | ✅ | 🟡 | `lib/cljnim_runtime.nim`, `src/emitter.nim` | `(git/status)`, `(git/commit)`, `(git/push)` work |
| T4.5 | nREPL protocol | | 🟡 | `src/repl.nim` | REPL speaks nREPL over TCP |
| T4.6 | Tool-call format | | 🟢 | `src/repl.nim` | Accept `{"tool":"cljnim/eval","args":{...}}` |
| T4.5 | nREPL protocol | | 🟡 | `src/repl.nim` | REPL speaks JSON over TCP with `--tcp PORT`. |
| T4.6 | Tool-call format | | 🟢 | `src/repl.nim` | Accept `{"tool":"cljnim/eval","args":{"form":"..."}}`. |
---
@@ -63,7 +63,7 @@
|---|---|---|---|---|---|
| T7.1 | `ns` declaration parsing | ✅ | 🟡 | `src/emitter.nim` | `(ns my.app (:require [other.lib :as lib]))` parses, extracts aliases, resolves. |
| T7.2 | Multi-file compilation | ✅ | 🔴 | `src/cljnim.nim`, `src/emitter.nim` | `./cljnim run app.clj` finds required files (hyphen→underscore), inlines defs. |
| T7.3 | Module caching | | 🟡 | `src/cljnim.nim` | Compiled `.nim` files cached in `nimcache/`. Rebuild only changed files. |
| T7.3 | Module caching | | 🟡 | `src/cljnim.nim` | Compiled `.nim` files cached in `nimcache/`. Rebuild only if source changed. |
| T7.4 | Dependency resolution | ⬜ | 🔴 | New: `src/deps.nim` | Read `deps.edn` or `project.clj` format. Download deps from Git. |
---