lcode-cli 0.63.1__py3-none-any.whl → 0.64.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
lcode/__init__.py CHANGED
@@ -3,7 +3,7 @@
3
3
  From a program: `from lcode import Session` (see lcode.api).
4
4
  """
5
5
 
6
- __version__ = "0.63.1"
6
+ __version__ = "0.64.0"
7
7
 
8
8
  API = ("Session", "Result", "Options", "SetupError")
9
9
 
lcode/docs/mcp.md CHANGED
@@ -37,6 +37,7 @@ and find the code for the top one."*
37
37
  | `metabase` | Explore your data and ask questions through Metabase's semantic layer | Metabase 60 or later with MCP on ([below](#metabase)) |
38
38
  | `encord` | Projects, datasets, ontologies, labeling progress, tasks and labels, read-only | `uvx`, an SSH key registered in Encord ([below](#encord)) |
39
39
  | `valohai` | ML executions with their logs, metrics and outputs, and pipelines, read-only | `uvx`, a Valohai API token ([below](#valohai)) |
40
+ | `rea` | Reverse engineering: unpack Electron apps and archives, decompile native programs | `npx` (a recent Node.js); Ghidra and a JDK for native programs ([below](#rea)) |
40
41
 
41
42
  `npx` comes with [Node.js](https://nodejs.org) (18 or newer) and `uvx` with
42
43
  [uv](https://docs.astral.sh/uv/getting-started/installation/). `lcode mcp catalog` shows what's missing
@@ -140,6 +141,41 @@ Both servers are ordinary MCP servers: other MCP clients can use them too, for e
140
141
  `uvx --isolated --from lcode-cli lcode-mcp-valohai` with `VALOHAI_TOKEN` set. Keep `--isolated`: without it,
141
142
  `uvx` reuses an lcode you installed with `uv tool install`, which may be older or lack the Encord SDK.
142
143
 
144
+ ### REA
145
+
146
+ [REA](https://github.com/morluto/rea) (Reverse Engineer Anything) lets the model examine an app without its
147
+ source code. Use it only for software you own or are authorized to examine.
148
+
149
+ ```bash
150
+ lcode mcp add rea
151
+ ```
152
+
153
+ Then ask, for example: *"Use REA to extract /path/to/app.asar, then explain how search works in this app.
154
+ Name the file and function for each point."*
155
+
156
+ | Target | You need |
157
+ |---|---|
158
+ | Electron apps (`.asar`) and other archives | Node.js 22.23.4 or later in its 22 line, or a current 24 or 26 |
159
+ | Native programs | Node.js as above, [Ghidra](https://github.com/NationalSecurityAgency/ghidra/releases) 12.2 and a full JDK 25 (the Java runtime alone isn't enough). Give both folders when `lcode mcp add rea` asks |
160
+
161
+ The first start downloads REA from npm (42 MB, 186 MB unpacked), without install scripts and without its
162
+ optional packages. lcode sets up the version it was tested with; to try a newer one, change the version in
163
+ `mcp.json`.
164
+
165
+ - **Context.** All of REA's 263 tools would take about 82,000 tokens. lcode offers 10, about 4,700 tokens, so
166
+ they're sent with every request at 32K. Add others under `tools` in `mcp.json`, at the cost of context.
167
+ - **Electron apps.** The model opens the app and extracts it; `extract_artifact` writes the files to a folder,
168
+ and the model then reads them with lcode's own tools.
169
+ - **Permission.** Every call asks first, as with any MCP server. As REA documents them, the 10 tools read and unpack the target but
170
+ don't run it. Some of REA's other tools do run programs or attach to them, so think before you add them.
171
+ - **What to expect from a local model.** This was measured with qwen3.6-35b at 32K. On a tiny Electron app, four
172
+ runs (three with an earlier set of 8 tools) took 1 to 2 minutes each: three answers were right and one had a small
173
+ mistake. Native programs are much harder. On a small stripped program (a license-key check), three runs were tried: two finished in
174
+ 4 to 5 minutes, and one ran out of its 15. Of the two, one worked out a key the program accepts, with a mistake in
175
+ its explanation; the other misread a number format and its key was rejected. Check the answers, and
176
+ expect larger apps to be harder.
177
+ - **REA's workflow skill** is about 34 KB, too long for a 32K window, so lcode doesn't install it.
178
+
143
179
  ## Adding your own servers
144
180
 
145
181
  Any MCP server works. For a remote server, give its URL; for a local one, the command that starts it:
@@ -137,6 +137,43 @@ result dropped beyond the noise, so a script can stop on it.
137
137
  if the dev slice doesn't drop beyond the noise against the last baseline, and the comparison goes on
138
138
  its pull request. See the [release steps](contributing.md#releases).
139
139
 
140
+ ## Baselines
141
+
142
+ lcode 0.63.0 on the dev slice, on a laptop with a 12 GB GPU (RTX 4080 Laptop) and 31 GB of RAM, with
143
+ nothing else running:
144
+
145
+ | Model | Context | Attempts | pass@1 | Terminal-Bench | SWE-bench | pass^3 | Speed | Time |
146
+ |---|---|---|---|---|---|---|---|---|
147
+ | qwen3.6-35b | 32K | 3 | 55% | 51% | 60% | 36% | 73 tokens/s | 11.4 h |
148
+ | qwen3.6-35b | 64K | 3 | 61% | 51% | 77% | 40% | 67 tokens/s | 11.8 h |
149
+ | qwen3.6-35b | 256K | – | stopped after 2 h | | | | 26–46 tokens/s | |
150
+ | qwen3.8-27b | 32K | 1 | 36% of 22 tasks | 20% | 71% of 7 | – | 9 tokens/s | stopped after 9 h |
151
+
152
+ To reproduce them:
153
+
154
+ ```bash
155
+ lcode bench --harbor dev qwen3.6-35b --context 32k
156
+ lcode bench --harbor dev qwen3.6-35b --context 64k
157
+ lcode bench --harbor dev qwen3.6-35b --context 256k
158
+ lcode bench --harbor dev qwen3.8-27b --context 32k --attempts 1
159
+ ```
160
+
161
+ - **32K or 64K:** 64K passed 7 points more, within the noise (±11), so this slice doesn't show that 64K
162
+ helps. It did waste less: 5 replies that went nowhere instead of 20. The 32K run is the baseline the
163
+ [release rule](#comparing-two-runs) compares against.
164
+ - **256K doesn't fit this machine.** Ollama kept 4 of the model's 9 GB on the GPU and took 23 GB of
165
+ RAM, so the system started swapping. Generation fell from 40–46 to 26 tokens/s, and the run was
166
+ stopped after 2 hours. By then 2 of 8 Terminal-Bench attempts had passed and 6 had run out of time,
167
+ `crack-7z-hash` among them, which passed 3 times out of 3 at 32K. With 12 GB of GPU memory, use 64K
168
+ at most.
169
+ - **qwen3.8-27b is too slow on a 12 GB GPU.** The dense 27B model is larger than the GPU (8 of its
170
+ 20 GB fit), so it generates 9 tokens/s, and 12 of the 15 Terminal-Bench tasks ran out of time. The
171
+ run was stopped after 9 hours, when generation fell to 4 tokens/s, and 3 SWE-bench tasks didn't
172
+ run. On the 22 tasks it ran, qwen3.6-35b at 32K passed 56%.
173
+
174
+ Runs on other machines differ, mostly through the model's speed: a faster GPU runs into the tasks' time
175
+ limits less often.
176
+
140
177
  ## Other agents on the same model
141
178
 
142
179
  `--agent` runs Claude Code, OpenCode or Codex on the same tasks, with the same model, context
lcode/docs/quickstart.md CHANGED
@@ -12,7 +12,7 @@ lcode
12
12
 
13
13
  ```text
14
14
  ╭──────────────────────────────────────────────╮
15
- │ lcode v0.63.1 — local coding agent │
15
+ │ lcode v0.64.0 — local coding agent │
16
16
  │ │
17
17
  │ model lcode-qwen3.6-35b │
18
18
  │ context 256K tokens │
lcode/mcp/catalog.toml CHANGED
@@ -7,7 +7,7 @@
7
7
  # requires commands that must be installed.
8
8
  # login sign in through the browser (OAuth) after adding.
9
9
  #
10
- # Commands and URLs were checked against each project's documentation in September and October 2026.
10
+ # Commands and URLs were checked against each project's documentation in September to November 2026.
11
11
 
12
12
  [atlassian]
13
13
  name = "Atlassian"
@@ -254,3 +254,41 @@ var = "VALOHAI_HOST"
254
254
  prompt = "Valohai address (Enter for app.valohai.com; for a self-hosted installation, its URL)"
255
255
  optional = true
256
256
 
257
+ [rea]
258
+ name = "REA"
259
+ description = "Reverse engineering: unpack Electron apps and archives, decompile native programs with Ghidra"
260
+ homepage = "https://github.com/morluto/rea"
261
+ requires = ["npx"]
262
+ setup = """Only for software you own or are authorized to examine. Electron apps and archives need only a recent Node.js (22.23.4
263
+ or later in its 22 line, or a current 24 or 26). Native programs also need Ghidra 12.2 and a full JDK 25, not just the Java
264
+ runtime: give their folders, or press Enter to skip them."""
265
+
266
+ [rea.server]
267
+ command = "npx"
268
+ # The version lcode was tested with. No install scripts and no optional packages: frida, for hooking into running
269
+ # programs, is one, and lcode doesn't offer the tools that use it.
270
+ args = ["-y", "rea-agents@6.10.1", "mcp"]
271
+ env = { npm_config_ignore_scripts = "true", npm_config_omit = "optional", NO_UPDATE_NOTIFIER = "1", GHIDRA_INSTALL_DIR = "${GHIDRA_INSTALL_DIR}", JAVA_HOME = "${JAVA_HOME}" }
272
+ # All 263 definitions take about 82,000 tokens. These fit in a 32K window and don't launch the target.
273
+ tools = [
274
+ "open_binary",
275
+ "extract_artifact",
276
+ "binary_overview",
277
+ "list_procedures",
278
+ "search_strings",
279
+ "trace_feature",
280
+ "xrefs",
281
+ "procedure_callers",
282
+ "procedure_pseudo_code",
283
+ "close_binary",
284
+ ]
285
+
286
+ [[rea.inputs]]
287
+ var = "GHIDRA_INSTALL_DIR"
288
+ prompt = "Ghidra folder, full path (Enter to skip native programs)"
289
+ optional = true
290
+
291
+ [[rea.inputs]]
292
+ var = "JAVA_HOME"
293
+ prompt = "JDK 25 folder, full path (Enter to use the java on your PATH)"
294
+ optional = true
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: lcode-cli
3
- Version: 0.63.1
3
+ Version: 0.64.0
4
4
  Summary: A local-first terminal coding agent powered by open-weight models on your own GPU or Mac, via Ollama.
5
5
  Project-URL: Homepage, https://nasser1941.github.io/lcode/
6
6
  Project-URL: Documentation, https://nasser1941.github.io/lcode/
@@ -10,19 +10,19 @@ lcode/docs/how-it-works.md,sha256=AzL29CBueTf5t6NF_xCer3QdXiWcGZ-y7-glm6zD4VU,15
10
10
  lcode/docs/index.md,sha256=MbXP--ui-OwfNE4Q91oRh7TubdFNMH-RrliHkld6lYE,3815
11
11
  lcode/docs/installation.md,sha256=vaMYDEinR04A3neUUJx5bP2PlIyfhk6miarUrnq4rKg,7257
12
12
  lcode/docs/lsp.md,sha256=tou-eJFMPvAJt0_-NaCm-c4OtfgVhok4Ig8NJnj6Rhs,3405
13
- lcode/docs/mcp.md,sha256=Ol3ScuP4i2KsoN9xaSEbnm86Tvoc1qnUV7zkRprWwHo,15168
13
+ lcode/docs/mcp.md,sha256=Hecnuo__VAt_OI8HJLk7I3An7oWuRv5IUZViPDVFyyU,17648
14
14
  lcode/docs/memory.md,sha256=XbsNnTwRdnUEYW7_2U1GHbtK0uOjTxR-s2EujgJbR0Y,6889
15
15
  lcode/docs/models.md,sha256=OE_Lp_rLHiCSWPApHqKkv2GzRb81udGJqamGdx-Gy7A,18280
16
16
  lcode/docs/modes.md,sha256=q5ut1jR1PWnyMmXNT0cq7adCqj-bWrZDD2Y2X-L5ty0,34197
17
- lcode/docs/public-benchmarks.md,sha256=vYv4-kUV0RN3G-FK_YCcr2_WkIgn41kgtA_DDqwKNkA,11052
18
- lcode/docs/quickstart.md,sha256=RTvGNmy94AZNjmFvyr3gILNXrc4_ClfooGSYF--NHs0,3403
17
+ lcode/docs/public-benchmarks.md,sha256=W45-jWSgCLf7-F8QAxm8vzNvvHDzVPKbWz1jmWoJxC8,13059
18
+ lcode/docs/quickstart.md,sha256=KhmFyt9p6bORs7U_GC8R3ZJUlFw5ql3JNHa1345xVkE,3403
19
19
  lcode/docs/sandbox.md,sha256=-_jc2I0LXKQIYCz_JOuHGaP2ehVuEqEepKqMATlFpZY,4064
20
20
  lcode/docs/search.md,sha256=1Sqkfc9NRftpcfBFG9b_D8Ns-octH399AaaSNBPHq28,4251
21
21
  lcode/docs/servers.md,sha256=0ddumHseQXx0CP0nqzgwV-493s81kdEBa6qtUYe9t6k,5718
22
22
  lcode/docs/traces.md,sha256=_rP0XIgyeiZPld4VjP-ISlyf6ZPoKQBTQPLVbyp5fUE,10201
23
23
  lcode/docs/troubleshooting.md,sha256=iD72y6GOlwLK0HNA1mxfucSU40Iwp7kGyGJa_AX1OWs,9052
24
24
  lcode/docs/usage.md,sha256=cIq3cQjnb71DRJN7JXW-DBLFC8bn9680PvU1249h_rI,52175
25
- lcode/__init__.py,sha256=P4GUmWuUGc0syg6iFxtkWjnjp_qTeIutfDQe_424CF8,473
25
+ lcode/__init__.py,sha256=zAdu4EVpOvAF2lFTN-B5t4y9JSI3IOXl9R4VwgoR5hw,473
26
26
  lcode/__main__.py,sha256=s5N5pryX2FAu93GGZ3FxUrIXHWGzxz66lKUoaV_h8Ws,35
27
27
  lcode/acp.py,sha256=9S2n1ycB_IWeOv3zIbuwa6oFW2wyC-GKXcc3Jg5AfQk,30326
28
28
  lcode/action.py,sha256=wuT5F9EJCdEligPeytzmEi8FpahWBhXer528tpuTj_k,16711
@@ -124,7 +124,7 @@ lcode/web.py,sha256=vyxKbSRJTl1Lj3hj7Yd_NwTgbv0Xi6dup2YfUXjqp-Y,14579
124
124
  lcode/mcp/__init__.py,sha256=XujtAmRoXW9S0uq1XPf_CAeCkHh_UvA8FCmoAKP9j1Y,171
125
125
  lcode/mcp/auth.py,sha256=XH52GaonFCaCxhpNyMmD7iRDeDURV9rBIboJdWJjNqc,16704
126
126
  lcode/mcp/catalog.py,sha256=_NnnM0pfTuEzQebeamrOHLni8KiFldfW-3kkwUNpTnc,3911
127
- lcode/mcp/catalog.toml,sha256=LTby0I98ajZS2aXZpaBq09p1nnt77xs6bngpVMWO-t4,10324
127
+ lcode/mcp/catalog.toml,sha256=7ef-LXeIVcuVP-tOb1ia1nnRJ6QsWKdQfUURgsnmEaw,11823
128
128
  lcode/mcp/client.py,sha256=3Gen7zRvWehngXn_dAMOAdKqFkFkQZIQW96hQcW4N4k,7119
129
129
  lcode/mcp/commands.py,sha256=hOND7SsJjz5Hp2CY81PHPsB4R9i8CwhBQeQi-oB8Wg4,16721
130
130
  lcode/mcp/config.py,sha256=PpTF-cEFfNnurjgypXi17_6Uoa3VGyJSXxrO5AmrbRA,8938
@@ -149,8 +149,8 @@ lcode/workflows/wan21-vace.json,sha256=vJsiRvLCXCjKIibOO0SGM3fT6bedAGxF8N2sN2vcP
149
149
  lcode/workflows/wan22-fun-inp-5b.json,sha256=4HbKEezik8MHvxTMP6PjQUPQPfCeSu10U9FrC-DHKYw,3327
150
150
  lcode/workflows/wan22-ti2v-5b.json,sha256=RcTehoC2pNizzlb7Ed3keJ56DiE7V5lhXmsvR2Y0smQ,3371
151
151
  lcode/workflows/z-image-turbo-t2i.json,sha256=sHsL7xnnuULOuWGYlQrDl4jOTySdAmb2T82c_cChv0s,1585
152
- lcode_cli-0.63.1.dist-info/METADATA,sha256=6rdZty39fMGcGeH4_IB8zuE9uAUn7wfpEbrJ--ogNqc,14260
153
- lcode_cli-0.63.1.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
154
- lcode_cli-0.63.1.dist-info/entry_points.txt,sha256=Hxsn_itbnbgft3U0FwxWdmEt0yoAV2LB-nJDnL9WT20,172
155
- lcode_cli-0.63.1.dist-info/licenses/LICENSE,sha256=JWjmoL7nNIC1XUa-dZm2hwLUgjUQMFo6k8APb0idNzs,1074
156
- lcode_cli-0.63.1.dist-info/RECORD,,
152
+ lcode_cli-0.64.0.dist-info/METADATA,sha256=mZTyINTeAGLIp6LlBQiQoLShc9pyMS_fzOHxn2vBR-Y,14260
153
+ lcode_cli-0.64.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
154
+ lcode_cli-0.64.0.dist-info/entry_points.txt,sha256=Hxsn_itbnbgft3U0FwxWdmEt0yoAV2LB-nJDnL9WT20,172
155
+ lcode_cli-0.64.0.dist-info/licenses/LICENSE,sha256=JWjmoL7nNIC1XUa-dZm2hwLUgjUQMFo6k8APb0idNzs,1074
156
+ lcode_cli-0.64.0.dist-info/RECORD,,