Commit c2d6432
feat: RSI builtins, universal archaeology module, apiproxy upgrades, JS runtime
Core builtins (interpreter.rs + code_intel.rs):
- omc_code_valid(src) — parse-validates LLM-generated OMC without throwing
- fn_snapshot/fn_rollback/fn_snapshot_all/fn_rollback_all — per-fn LIFO stacks
for safe recursive self-improvement rollback
- fn_bench(name, args, n) — wall-clock micro-benchmark any OMC function
- time_ms() — Unix epoch milliseconds
- code_parse_check(src) — {ok, error} parse result dict
RSI library (examples/lib/rsi.omc):
- Full recursive self-improvement framework: score_candidate, inner_loop,
meta_improve_hint, run_rsi — reusable by any demo
RSI demo hardening (examples/demos/recursive_improve.omc):
- Fixed reversed llm_call(MODEL, prompt) → llm_call(prompt, MODEL)
- Fixed arr_push reassignment bug (returns null, mutates in place)
- Fixed str_find_from (nonexistent) → str_slice+str_find on suffix
- Injected OMC_SYNTAX cheatsheet into all LLM prompts
- Added omc_code_valid guards before metric calls on generated code
Universal archaeology module (examples/lib/archaeology.omc):
- detect_language — 10-language extension dispatch
- omc_attractor_density as universal scorer (ANY text, no parsing)
- omc_code_similarity for OMC, str_similarity for Python/Rust/JS/etc.
- cluster_pairs — union-find duplicate grouping via Rc-shared arrays
- archaeology_scan(base, opts) — multi-extension, multi-language entry point
- archaeology_narrate(results, model) — Claude architectural analysis
- Verified on 244 OMC files (3476 fns) and 29 Python ML experiment files
New demos:
- codebase_archaeologist.omc — thin wrapper using archaeology module
- python_archaeologist.omc — cross-language Python substrate analysis
JS runtime + demo ports (examples/omc-runtime.js + demos/*.js):
- omc-runtime.js: full OMC interpreter in JavaScript
- substrate_rag.js, recursive_improve.js, self_improving_agent.js,
code_gen_loop.js, context_compression.js — browser/Node-runnable ports
Apiproxy upgrades (omnimcode-apiproxy/src/main.rs):
- Conversation tracking, differential history, adjacent marker collapse,
intra-request dedup, sysreminder templates, streaming side-recording,
adaptive compression, omc_proxy_namespace multi-tenant isolation
Test suite additions:
- test_rsi_builtins.omc, test_rsi_lib.omc, test_batch_llm.omc,
test_llm_stream.omc, test_llm_tools.omc, test_process_builtins.omc
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 47497a8 commit c2d6432
29 files changed
Lines changed: 5003 additions & 158 deletions
File tree
- examples
- demos
- lib
- tests
- omnimcode-apiproxy
- src
- omnimcode-cli/src
- omnimcode-core/src
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments