genexus-mcp 3.16.0 → 4.0.1

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.
package/README.md CHANGED
@@ -117,62 +117,76 @@ does not claim the same feature parity as the native SDK contract for GeneXus
117
117
 
118
118
  ## Experimental `gx-engine` (Rust SDK Replacement Project)
119
119
 
120
- `src/gx-engine` is an experimental, independent Rust compiler and runtime designed to progressively replace the proprietary GeneXus SDK with an open, high-performance native toolchain ([Plan 129](plans/129-independent-rust-toolchain.md)).
120
+ `src/gx-engine` is an independent, high-performance Rust compiler and runtime designed to completely replace the proprietary GeneXus SDK, eliminate the legacy 32-bit STA worker, and deliver sub-20s builds ([Plan 130](plans/130-direct-udm-kb-engine.md), [Plan 129](plans/129-independent-rust-toolchain.md)).
121
121
 
122
122
  ### 🎮 Decompilation / Parity Progress
123
123
 
124
- Similar to video game decompilation projects, progress is measured capability-by-capability against verified differential runs of the official GeneXus SDK in clean Knowledge Bases.
124
+ Progress is measured against recorded SDK differential inputs and observable results, not the number of implemented modules or passing unit tests. At the published 4.0.0 baseline, the disposable `KBTeste` Rebuild All recorded **346/346, 0 skipped, 0 refused** and **byte for byte (328/328 files)** C# agreement, together with web scripts, `gxcfg.js`, messages and runtime configuration. These historical counts do not validate later changes or prove that unsupported database semantics were preserved. **Full SDK replacement is not verified** for arbitrary KBs: unsupported forms are still refused by name, and only one KB is the oracle. gx-engine is the **default backend** (`Engine.Backend=gxengine`: admitted builds and field-limited type-only queries; reads/edits and other shapes use SDK fallback; `auto` = builds only, `sdk` = engine off); see [engine routing](docs/engine_backend.md).
125
125
 
126
- ```text
127
- Overall SDK Replacement: [🟩🟩🟩🟩🟩⬜⬜⬜⬜⬜] 50.0% weighted (69.6% total areas touched: 39/56)
128
- ```
126
+ ### What builds today
129
127
 
130
- | Subsystem | Progress | Status | Covered / Total |
131
- | :--- | :---: | :---: | :---: |
132
- | **Language & Runtime Core** (Math, Decimals, Text, Dates, Calendar) | `[🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩] 100.0%` | Native Parity | 8 / 8 areas |
133
- | **Control Flow & Procedure Pipeline** (`If`, `Iif`, `For`, `For In`, `Exit`, `Case`, `Sub`/`Do`, `Call`/`.UDP`, `IsEmpty`/`SetEmpty`/`Nullvalue`) | `[🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩] 100.0%` | Native Parity | 6 / 6 areas |
134
- | **Structured Data & Collections** (SDT, `Add`, `Remove`, `Clear`, `IndexOf`, `Item`, `ToJson`, `FromJson`, `ToXml`, `FromXml`) | `[🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩] 100.0%` | Native Parity | 5 / 5 areas |
135
- | **Portable KB Catalog & XML Projection** (Procedures, SDT, Domain, Attribute, Transaction, Rules in `ExportFile` XML and portable catalog) | `[🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩] 100.0%` | Native Parity | 6 / 6 areas |
136
- | **Specifier & SQL Navigation** (Physical Tables, DDL, Navigation, `For Each`) | `[🟩🟩🟩🟩🟩🟩🟩🟩⬜⬜] 75.0%` | Navigation & Query Plan | 6 / 8 areas |
137
- | **Native KB Database Storage** (`.gxi`, `GXLOCK`, `DATA*`) | `[⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜] 0.0%` | Unsupported (SDK-only) | 0 / 5 areas |
138
- | **Full GeneXus Surface** (UI, Events, Generators) | `[⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜] 0.0%` | Unsupported | 0 / 18 areas |
128
+ The counts and timings below describe the published 4.0.0 baseline, not a fresh
129
+ validation of uncommitted generator changes. Checked emission now refuses
130
+ unsupported database statements rather than accepting incomplete behavior;
131
+ post-change whole-KB counts and SDK parity must be measured again.
139
132
 
140
- #### Gateway Capability Registry Gates
133
+ | Lane | Verified evidence | Boundary |
134
+ | :--- | :--- | :--- |
135
+ | Package build | `build.ps1` built Gateway, Worker, gxwire and gx-engine; local publish/backend engine hashes match. | Building the MCP distribution is not building every object in a KB. |
136
+ | Selected-object build | Five alternating local SDK/engine pairs regenerated and compiled `DCM37961700`; core APIs and actual CLI output matched. SDK median **14.756s**, engine **0.230s** (**64.19×**). | Synthetic warm fixture; AUTO_CLOSE=OFF on both sides, original ON restored. The packaged binary was not benchmarked; it passed a separate build/run smoke. |
137
+ | Full native KB build (`KBTeste`) | `rebuild-all`: **346 generated / 346 compiled, 0 skipped, 0 refused**. Against the SDK's own output for the same KB: **328/328 C# files byte-identical, 0 missing**; 24/24 web `.js`, `gxcfg.js`, `messages.eng.txt/.js`, `log.config`, `log.console.config` (+ `bin/` copies) and `CloudServices.config` byte-identical. | One oracle KB. Extra SDT and assembly-info output remains outside the matching-file denominator. Developer Menu not written (its object selection is not established). |
138
+
139
+ Use the SDK for required workflows outside validated engine coverage. See
140
+ [Plan 131](plans/131-sdk-performance-benchmark.md) for the exact binary, commands,
141
+ samples and caveats; [engine routing](docs/engine_backend.md) for default/explicit backend behavior.
141
142
 
142
- The MCP Gateway exposes a strict capability gate (`EngineCapabilityRegistry`) where operations are classified by measured parity before any traffic can be routed:
143
-
144
- | Capability | Status | Evidence & Performance |
145
- | :--- | :---: | :--- |
146
- | `str_format` | 🟩 **Parity** | `Str()` numeric picture rules: 36,246 native rows verified, 0 diffs. Measured ~121 ns/row vs ~280 ns/row SDK (~2.3x faster). |
147
- | `numeric_render` | 🟩 **Parity** | `&var.ToString()` / `Print()`: 120 native boundary cases verified (precision 1..18, scale corners, padding). |
148
- | `date_display` | 🟩 **Parity** | Date/DateTime rendering: 18 native boundary cases verified (`MM/dd/yy`, 12h AM/PM, empty sentinels). |
149
- | `text_functions` | 🟩 **Parity** | `Substr`/`Upper`/`Lower`/`StrReplace`: 63 native KBTeste cases verified (1-based, expand-casing, exact replace). |
150
- | `text_extended_functions` | 🟩 **Parity** | `LTrim`/`RTrim`/`PadL`/`PadR`/`Space`/`Concat`/`StartsWith`/`EndsWith`/`Contains`/`StrSearch`: 95 native `StringUtil` oracle rows verified (exact ASCII space trim, left/right pad truncation, single-sided concat trim, ordinal comparisons, 1-based index clamping). |
151
- | `numeric_math_functions` | 🟩 **Parity** | `Int`/`Round`/`Trunc`/`Val`/`Left`/`Right`/`Asc`/`Chr`/`NotNumeric`/`LTrimStr`: 107 native `NumberUtil` and `StringUtil` oracle rows verified (`Math.Floor`, `AwayFromZero` with negative digit support, truncation toward zero, numeric string parsing, ASCII char conversions). |
152
- | `collection_operations` | 🟩 **Parity** | `Add`/`Remove`/`Clear`/`IndexOf`, `For In` iteration and `Exit`: 24 native `GxSimpleCollection` and `GXBaseCollection` oracle rows verified (1-based indexing, insertion, out-of-bounds silent removal, element aliasing in loops, loop exit). |
153
- | `calendar_operations` | 🟩 **Parity** | `Day`/`Month`/`Year`/`Hour`/`Minute`/`Sec`/`Dow`, `AddYr`/`AddMth`/`DAdd`/`TAdd`, `DDiff`/`TDiff`, `Age`, `EndOfMonth`, `ResetTime`, and `.ToString()`: 83 native `DateTimeUtil` oracle rows verified (1=Sunday DOW, leap clamping, second rollover, whole-day truncated DDiff, completed years Age). |
154
- | `subroutine_control_flow` | 🟩 **Parity** | `Sub 'Name' ... EndSub` and `Do 'Name'`: 13 native-verified tests (procedure-scoped variable mutation, case-insensitive resolution, quote styles, nested subroutine calls, early `Return` propagation via `returnInSub` semantics, depth limit 128). |
155
- | `conditional_and_state_operations` | 🟩 **Parity** | `Iif(cond, trueExpr, falseExpr)` short-circuit conditional, universal `.IsEmpty()`/`IsEmpty()` and `.SetEmpty()` across all types, `Nullvalue(&var)`, `.UDP(...)` calls, and `Format`/`NewLine`/`Replicate`/`CharAt`/`StrSearchRev`/`.LastIndexOf`/`BoolToStr`/`ToBoolean`/`StrToBool`: 57 native `StringUtil` and state oracle rows verified. |
156
- | `sdt_and_collection_json` | 🟩 **Parity** | `&sdt.ToJson()`, `&sdt.FromJson()`, `&col.ToJson()`, `&col.FromJson()`: 32 native `GxUserType` and `GXBaseCollection<T>` oracle rows verified (compact representation, escaped strings, `"0000-00-00"` empty dates, case-insensitive keys, partial updates, and safe array repopulation). |
157
- | `sdt_and_collection_xml` | 🟩 **Parity** | `&sdt.ToXml([root])`, `&sdt.FromXml(xml, [root])`, `&col.ToXml([root])`, `&col.FromXml(xml, [root])`: 40 native `GxUserType` and `GXBaseCollection<T>` XML oracle rows verified (indentation, self-closing tags `<Tag />`, XML entity escaping, ISO `yyyy-MM-ddT00:00:00` date/time, booleans, case-insensitive element parsing, empty reset, and fail-closed error returns). |
158
- | `domain_attribute_projection` | 🟩 **Parity** | Domain (`00972a17-9975-449e-aab1-d26165d51393`) and Attribute (`adbb33c9-0906-4971-833c-998de27e0676`) projection and `BasedOn` resolution in portable catalog and SDK `ExportFile` XML: 10 native-verified integration tests (procedure variables, chained domains, SDT items, cycle detection, domain-cannot-be-based-on-attribute enforcement, and end-to-end `xml-run`). |
159
- | `transaction_structure_projection` | 🟩 **Parity** | Transaction (`1db606f2-af09-4cf9-a3b5-b481519d28f6`) structure, keys, and multi-level hierarchy projection in portable catalog and `ExportFile` XML: 10 native-verified integration tests (nested levels, root and child primary key enforcement, attribute references, recursion depth limit 16, Business Component `RecordType` schema lowering, procedure interoperability). |
160
- | `rules_and_parm_parity` | 🟩 **Parity** | GeneXus Rules part (`9b0a32a3-de6d-4be1-a4dd-1b85d3741534`) parser and AST with Parm interface parity in portable catalog and SDK `ExportFile` XML: 10 native-verified integration tests (`Parm`, `Error`, `Msg`, `Default`, `NoAccept`, `Accept`, `Order`, `Prompt`, `Serial`, `Hidden`, single/multi-line comments, strings with semicolons/escaped quotes, fail-closed diagnostics, procedure-scope enforcement, catalog and XML exchange integration). |
161
- | `transaction_control` | 🟩 **Parity** | Database transaction control procedural statements (`Commit` and `Rollback`, bare keywords or call syntax `Commit()`, `Rollback()` with optional semicolons): 7 native-verified integration tests (conditionals, loops, subroutines, while loops, format_version 1 fail-closed rejection, compiled executable execution, and ExportFile XML exchange). |
162
- | `physical_table_ddl` | 🟩 **Parity** | Physical Table schema normalization and multi-dialect SQL DDL generation (`CREATE TABLE`, primary keys, parent-child and cross-transaction foreign keys, indexes, ANSI/SQL Server/PostgreSQL/Oracle data types): 9 native-verified integration tests without database writes. |
163
- | `sql_navigation` | 🟩 **Parity** | Specifier, base table inference, For Each navigation, extended table joins, and multi-dialect SQL query planning (ANSI, SQL Server, PostgreSQL, Oracle): 10 native-verified integration tests, 13 frontend tests, fail-closed diagnostics (`spc0004`, `spc0005`), and zero SQL writes. |
164
- | `numeric_core`, `text_core`, `calendar_values`, `records_collections`, `procedure_pipeline`, `xml_projection`, `kb_catalog` | 🟨 **Partial** | Independently implemented in portable compiler and tested with synthetic or bounded fixtures; pending full parity claims. |
165
- | `native_kb_read`, `general_gx_surface` | ⬜ **Unsupported** | Not yet implemented in Rust. Always served 100% by the GeneXus SDK / Worker. |
143
+ | Subsystem | Evidence boundary / remaining work |
144
+ | :--- | :--- |
145
+ | Language, runtime, control flow, SDTs and collections | Bounded native differential corpora; not exhaustive GeneXus semantics. |
146
+ | Portable catalog and XML projection | Fixture-backed support; does not establish native KB round-trip parity. |
147
+ | Specifier, SQL navigation and datastore behavior | Portable tests do not prove complete live SDK navigation or database behavior. |
148
+ | Native UDM storage | Live read evidence and targeted tests; not a general SDK persistence replacement. |
149
+ | C# generation and Rebuild All | Live generated-object checks pass within a bounded set; refusals, missing objects and SDK-oracle gaps remain. |
150
+ | Web UI, Transactions, Reports and BCs | Partial implementations; a successful compile is not end-to-end product parity. |
151
+
152
+ See the [current acceptance/evidence ledger](plans/129-implementation-progress.md#current-acceptance-status--2026-10-18) for the tested binary, scope, failures and next actions.
153
+
154
+ #### Gateway Capability Registry Gates
166
155
 
156
+ The MCP Gateway exposes an evidence gate (`EngineCapabilityRegistry`). See the
157
+ [current capability table](docs/engine_backend.md) for each bounded status,
158
+ consumer and evidence source. Runtime oracle fixtures, portable model tests and
159
+ live MCP compatibility are different kinds of evidence; none is an overall SDK
160
+ replacement percentage.
161
+
162
+ - Native-runtime oracle rows cover only their recorded inputs, encodings and
163
+ environment; synthetic library tests alone do not establish native parity.
164
+ - Admitted type-only queries and blocking builds/rebuilds are the current native
165
+ MCP surface. Reads and edits remain SDK-backed or fail closed; routing a call
166
+ to a deferral guard is not native implementation coverage.
167
+ - Storage decoding, navigation planning, object modeling and C# emission remain
168
+ partial. Unsupported database statements must fail generation rather than
169
+ produce a successful Procedure with missing database behavior.
170
+
171
+ The published 4.0.0 `KBTeste` result (346 compiled classes, 328 matching SDK C#
172
+ files and 20 extra files) is historical, bounded evidence. It is not a fresh
173
+ validation of later safety changes, all object families or whole-SDK behavior.
174
+ The [full-parity acceptance plan](plans/132-gxengine-full-parity.md) tracks the
175
+ remaining workflows and evidence required.
167
176
 
168
177
  ### ⚡ Performance Benchmarks (gx-engine vs. GeneXus SDK)
169
178
 
170
- Every performance comparison requires **exact output parity** verified before measuring timings (zero mismatches, identical hash/byte output). The initial differential benchmarks measured on local Windows x86_64 hardware:
179
+ A speed comparison requires the same input workload, target, dependency closure, observable results and success criteria. Independent generators need not emit byte-identical source or assemblies. Keep full SDK specify/generate/compile timings separate from compile-only MSBuild timings and bounded runtime microbenchmarks. On the disposable `KBTeste`, a whole-KB Rebuild All with a full compile measures 51.7× against the SDK's specify + generate alone (median of a paired run); the selected-object result meets 50× only within its stated warm-fixture scope. Historical microbenchmarks do not establish a whole-KB speed goal:
171
180
 
172
181
  | Benchmark Workload | GeneXus SDK (.NET / MSBuild) | `gx-engine` (Rust) | Speedup / Gain | Verification & Oracle |
173
182
  | :--- | :---: | :---: | :---: | :--- |
183
+ | **Warm selected-object C# build** (`DCM37961700`) | **14,755.9 ms** *(local specify + generate + Rebuild/Publish)* | **229.9 ms** *(live read + emit + guarded compiler replay, setup included)* | **64.19×** | Five alternating pairs; bounded API and direct CLI checks, stable sources. Synthetic fixture, AUTO_CLOSE=OFF; not cold/full-KB or packaged-binary performance. [Protocol](plans/131-sdk-performance-benchmark.md). |
174
184
  | **`Str()` Numeric Picture Formatting** (Microbenchmark) | 274 – 286 ns / row *(1.75 ms / pass)* | **121 – 130 ns / row** *(0.75 ms / pass)* | **~2.25x faster** | 6,152 rows (`str_matrix.tsv`), 80,235 chars, identical FNV-1a UTF-16 hash (`0xb9e1b48fb72067b0`), 0 mismatches against official `GeneXus.Classes.Core` runtime. |
175
- | **End-to-end Procedure Compilation & Build** | 10,930 ms *(SDK stages)*<br>16,366 ms *(MSBuild total)* | **223 ms** *(Rust parse + emit + rustc link)* | **~49x faster** | Synthetic `RustTimingProbe` in authorized `KBTeste` (`21 * 2 = 42`). Identical exit 0 and stdout `42`. |
185
+ | **Live KB Metadata & Part Hydration** | 12,000 – 18,000 ms *(serial COM STA)* | **320 ms** *(direct TDS queries)* | **> 35x faster** | Verified on live LocalDB `GX_KB_KBTeste` (`test_udm_real_kb_live_read_procedure`). |
186
+ | **Whole-KB generation** (`KBTeste`, specify + generate, no compile; earlier engine binary) | **33.4 – 39.9 s** *(MSBuild `SpecifyAllOnly` + `GenerateOnly`, 3 runs)* | **0.61 – 0.68 s** *(`rebuild-all --skip-compile`, 3 runs alternating with the SDK runs; ~0.45 s of it is the KB catalog read)* | **~58× (median pair)** | Paired, one machine, 2026-10-21; neither side compiles; engine output unchanged after the SDK runs. Not a 50× claim: output parity is 328/328 C# identical with 20 extra files and no Developer Menu, so full SDK parity is unverified. The previous engine binary measured 1.29 – 1.40 s (12 alternating runs). |
187
+ | **Whole-KB Rebuild All, nothing changed** (`KBTeste`, 346 classes) | **42.2 s** median *(32.3 – 46.2 s; MSBuild `SpecifyAllOnly` + `GenerateOnly`, no compile, 3 runs)* | **289 ms** median *(271 – 306 ms, 9 runs: catalog ~150 ms + emit ~70 ms; compile skipped as up to date)* | **~146× (median)** | Paired and alternating, one machine, 2026-10-21, database held open by an idle connection as an opened KB holds it. The SDK side does not compile, the engine side does (or proves its outputs current). Output parity: 328/328 C# identical, 20 extra files, 0 missing; full SDK parity unverified. Script `bench-s42.py`. |
188
+ | **Whole-KB Rebuild All, forced full compile** (`KBTeste`, 346 classes) | **42.2 s** median *(same SDK runs, no compile)* | **816 ms** median *(739 – 989 ms, 9 runs: direct `csc` with `/shared` and `/skipanalyzers+`, ~0.6 – 0.7 s)* | **~51.7× (median)** | Same paired run; the compile record is removed before each sample so all 346 classes compile again. The ratio is a median of medians: against the fastest SDK run (32.3 s) and slowest engine run it is ~33×. A first build into a new folder takes ~1.9 s (`dotnet build`); a cold compiler server was measured once at ~22.8 s. The former 480,000 ms / 1,250 ms (>380×) comparison had no matched IDE measurement and stays withdrawn. |
189
+ | **Historical arithmetic fixture build** | 10,930 ms *(SDK stages)*<br>16,366 ms *(MSBuild process wall)* | **223 ms** *(Rust CLI + rustc build)* | **Not a whole-SDK speed ratio** | `RustTimingProbe` (`21 * 2 = 42`), three recorded samples, exit/output checked. Different pipelines and targets; the former ~49× stage/build ratio applies only to that tiny fixture. [Evidence and caveats](src/gx-engine/VALIDATION.md#verified-custom-msbuild--sdk-pipeline). |
176
190
  | **Generated Artifact Startup & Execution** | 123.06 ms *(CLR bootstrap + run)* | **5.75 ms** *(native binary bootstrap)* | **~21x faster** | Cold process launch and console output for the compiled arithmetic procedure artifact. |
177
191
 
178
192
  #### 📈 Benchmark Protocol & How to Record Improvements
@@ -189,23 +203,23 @@ As new capabilities reach parity and additional optimizations land, follow this
189
203
  ### Activation Flag & Safety Seam
190
204
 
191
205
  > [!IMPORTANT]
192
- > **Zero Automatic Routing:** By default, `Engine.Backend` is `"sdk"`. The Gateway serves 100% of tool calls through the official GeneXus SDK. Even when `gxengine` is enabled, the router fails closed: only capabilities with measured `Parity` and an explicitly registered consumer can route to the engine; everything else stays on the SDK.
206
+ > **Engine-first:** `Engine.Backend` defaults to `"gxengine"`. Blocking `genexus_lifecycle` builds/rebuilds inside the admitted space use gx-engine, and so do admitted type-only `genexus_query` calls selecting only `name`/`type` fields. A directed `build` with `mode=compile_check`, explicit `callers=false` and transitive callees also uses gx-engine, building only the target closure. Edits, async/other directed builds, all reads, `usedby:` searches, ranked fuzzy queries and unsupported request shapes fall back to the SDK. Capability and argument gates still apply. Build errors or uncertain outcomes after engine start never trigger automatic SDK replay. `"auto"` routes only builds to the engine; `"sdk"` keeps every operation on the SDK and never invokes the engine.
193
207
 
194
- To test or benchmark the engine from a source checkout, configure `config.json`:
208
+ No backend setting is needed. To narrow routing to builds (`"auto"`) or turn the engine off (`"sdk"`), configure `config.json`:
195
209
 
196
210
  ```json
197
211
  {
198
212
  "Engine": {
199
- "Backend": "gxengine",
213
+ "Backend": "auto",
200
214
  "Fallback": "sdk",
201
215
  "TimeoutSeconds": 120
202
216
  }
203
217
  }
204
218
  ```
205
219
 
206
- - **`Engine.Backend`**: `"sdk"` (default) or `"gxengine"` (opt-in).
207
- - **`Engine.Fallback`**: `"sdk"` (fallback to GeneXus SDK when not at parity) or `"error"` (fails closed with `EngineCapabilityNotParity` for strict verification).
208
- - **Diagnostics**: `genexus_doctor` inspects the engine via `--version` handshake and reports an `engine` status block with `backend`, `available`, `version`, `capabilities`, and `routedOperations`.
220
+ - **`Engine.Backend`**: `"gxengine"` (default: admitted builds and field-limited type-only queries; reads/edits use SDK fallback), `"auto"` (admitted builds only), or `"sdk"` (SDK only, engine never invoked).
221
+ - **`Engine.Fallback`**: `"sdk"` (fallback to GeneXus SDK outside admitted native coverage) or `"error"` (fails closed: `EngineCapabilityNotParity` for evidence-gate rejection; `EngineOperationOutsideAdmittedSpace` for read/edit deferrals and unsupported query/build arguments).
222
+ - **Diagnostics**: `genexus_doctor` inspects the engine via `--version` handshake and reports an `engine` status block with `backend`, `available`, `version`, and `capabilities`. Its `routedOperations` lists served native operations; `deferredOperations` lists read/edit deferrals separately, never as parity.
209
223
 
210
224
  To run compiler tests or standalone projects from checkout:
211
225
 
@@ -284,7 +298,7 @@ A quick map of what the agent can do against your real KB through the **60 tools
284
298
  | Area | What the agent can do |
285
299
  |---|---|
286
300
  | 🔎 **Explore** | Search & list objects, read any part (source, rules, events, structure, docs, pattern XML), inspect metadata & callers, regex-search source, view the navigation report |
287
- | 🧭 **Orient & trace** | Rank the objects a task touches, list direct and transitive callers, trace the shortest call path between two objects, check blast radius and safe-delete, follow one variable's data flow. Runs on exported sources through `genexus_wire` (read-only, token-budgeted) |
301
+ | 🧭 **Orient & trace** | Rank the objects a task touches, list direct and transitive callers, trace the shortest call path between two objects, check blast radius and safe-delete, follow one variable's data flow. Runs on exported sources through `genexus_wire` (read-only, token-budgeted); `pack_task` also works directly on the open native KB |
288
302
  | ✏️ **Edit code** | Edit any object part (`full`/`patch`/`ops` modes), variables CRUD, format, create & delete objects, scaffold a Procedure from a **curl command**, edit + rebuild callers in one shot |
289
303
  | 🗄️ **Author the data model** | Transaction structure (DSL), **unique/non-unique indexes** (create & drop), **attribute formulas & subtypes**, level Description/Image attributes, **Domain enum values**, folders & modules, table↔transaction relations & redundant-attribute detection |
290
304
  | 🧩 **Author other objects** | External Object methods & properties, Menu options, REST API objects, WorkWithPlus / WorkWith patterns, typed .NET generator references |
@@ -551,7 +565,7 @@ The worker exposes **60 tools** to the MCP router, grouped by capability below.
551
565
  **Architecture discovery & call graph**
552
566
  - `genexus_wire` — read-only, token-budgeted call-graph engine (bundled `gxwire.exe`). Actions: `pack_task` (default; one-shot orientation bundle for a task), `for` (intent ranking with domain synonyms such as `fat` → `faturamento`), `status` (graph size and top hubs), `callers` (direct and transitive), `impact` (blast radius, writers, readers), `path` (shortest call path from `from` to `to`), `slice` (definitions and uses of one variable, `target` = `Object:Variable`), `safe_delete` (blockers before deleting a symbol), `index` (rebuild the cache), `doctor` (engine and cache diagnostics)
553
567
 
554
- `genexus_wire` does not go through the Worker or the GeneXus SDK. The Gateway runs `gxwire.exe` on the target folder (`dir`, `kb`, or the active KB path) and returns its output. It reads exported source text (`.prc`, `.trn`, `.wp`, `.sdp`, `.xml`, `.txt`, `.gx`, `.gxd`) with regex heuristics, so answers reflect the exported files, not the live KB; an empty folder returns `empty="true"`. Use it to decide where to look and what a change touches. Use `genexus_query` to search live objects and `genexus_read` to read their parts. Parameters: `task` (`pack_task`, `for`), `target` (`callers`, `impact`, `slice`, `safe_delete`), `from`/`to` (`path`), `format`, `token_budget` (default 1200), `full`, `kb`/`dir`. `format` is `toon` (compact, recommended), `xml` (default), `json`, or `mermaid`; mermaid renders `status`, `callers`, `impact`, `path` and `pack_task`, and other actions return XML. The only file it writes is `.gxwire_cache.bin` in the target folder, on `index` and when the cache is stale.
568
+ `genexus_wire` goes through neither the Worker nor the GeneXus SDK, with one exception: `action=pack_task` on the native KB the session has open is answered by that KB's Worker from the SDK-backed index, with no text export. Pass `targets` (object names, `Type:Name` to disambiguate) and/or name the objects in `task`; the result lists the resolved objects with their direct callers and callees, and names every object it could not resolve, found ambiguous, skipped or left out of the token budget. It is read-only and reads no part body. For every other action the Gateway runs `gxwire.exe` on the target folder (`dir`, `kb`, or the active KB path) and returns its output; a native KB folder is refused with `GXWIRE_REQUIRES_TEXT_SOURCE_TREE`, so point `dir` at an exported text tree. It reads exported source text (`.prc`, `.trn`, `.wp`, `.sdp`, `.xml`, `.txt`, `.gx`, `.gxd`) with regex heuristics, so answers reflect the exported files, not the live KB; an empty folder returns `empty="true"`. Use it to decide where to look and what a change touches. Use `genexus_query` to search live objects and `genexus_read` to read their parts. Parameters: `task` (`pack_task`, `for`), `target` (`callers`, `impact`, `slice`, `safe_delete`), `from`/`to` (`path`), `format`, `token_budget` (default 1200), `full`, `kb`/`dir`. `format` is `toon` (compact, recommended), `xml` (default), `json`, or `mermaid`; mermaid renders `status`, `callers`, `impact`, `path` and `pack_task`, and other actions return XML. The only file it writes is `.gxwire_cache.bin` in the target folder, on `index` and when the cache is stale.
555
569
 
556
570
  **Search & discovery**
557
571
  - `genexus_query` — object search (prefixes `name:`, `type:`, `usedby:`, `parent:`, …)
package/cli/docs.test.js CHANGED
@@ -75,6 +75,107 @@ test('the README release section describes the release flow that actually ships'
75
75
  assert.match(section, /OIDC Trusted Publishing/);
76
76
  });
77
77
 
78
+ test('engine documentation keeps fixture results distinct from SDK replacement', () => {
79
+ const section = markdownSection(read('README.md'), '## Experimental `gx-engine` (Rust SDK Replacement Project)');
80
+
81
+ assert.doesNotMatch(section, /Overall SDK Replacement:[^\n]*100(?:\.0)?%/);
82
+ assert.doesNotMatch(section, /\*\*>\s*380x faster\*\*/);
83
+ assert.match(section, /Full SDK replacement is not verified/);
84
+ assert.match(section, /64\.19×/);
85
+ assert.match(section, /plans\/131-sdk-performance-benchmark\.md/);
86
+ assert.match(section, /plans\/129-implementation-progress\.md#current-acceptance-status--2026-10-18/);
87
+ assert.match(section, /Historical arithmetic fixture build/);
88
+ assert.match(section, /Different pipelines and targets/);
89
+ });
90
+
91
+ test('engine guidance separates package builds, fixture speed and full-KB coverage', () => {
92
+ const coverage = markdownSection(read('README.md'), '### What builds today');
93
+ assert.match(coverage, /Package build/);
94
+ assert.match(coverage, /Selected-object build/);
95
+ assert.match(coverage, /Full native KB build/);
96
+ assert.match(coverage, /346 generated \/ 346 compiled, 0 skipped, 0 refused/);
97
+ assert.match(coverage, /328\/328 C# files byte-identical/);
98
+ assert.match(coverage, /One oracle KB/);
99
+ assert.match(coverage, /packaged binary.*not benchmarked/);
100
+
101
+ const guidance = markdownSection(read('AGENTS.md'), '## gx-engine development');
102
+ assert.match(guidance, /full SDK replacement/);
103
+ assert.match(guidance, /refusals/);
104
+ assert.match(guidance, /Engine\.Backend/);
105
+ assert.match(guidance, /disposable/);
106
+ for (const document of ['src/gx-engine/README.md', 'docs/engine_backend.md', 'plans/131-sdk-performance-benchmark.md']) {
107
+ assert.ok(guidance.includes(`](${document})`), `Missing agent pointer: ${document}`);
108
+ assert.ok(fs.existsSync(path.join(repoRoot, document)), `Missing agent document: ${document}`);
109
+ }
110
+
111
+ const artifactSkill = '.agents/skills/gxe-artifact-parity/SKILL.md';
112
+ assert.ok(guidance.includes(`](${artifactSkill})`), 'Missing artifact-parity skill pointer');
113
+ assert.match(read(artifactSkill), /^name: gxe-artifact-parity$/m);
114
+ assert.match(read(artifactSkill), /scripts\/artifact_diff\.py/);
115
+ assert.ok(fs.existsSync(path.join(repoRoot, 'src/gx-engine/scripts/artifact_diff.py')));
116
+
117
+ const engineReadme = read('src/gx-engine/README.md');
118
+ const engineCoverage = markdownSection(engineReadme, '## Build coverage and routing');
119
+ assert.match(engineCoverage, /full SDK replacement is not established/);
120
+ assert.doesNotMatch(engineReadme, /Full Object Model:\*\* Complete support|compilation in < 20s/);
121
+ assert.match(engineReadme, /packaged binary was smoke-tested, not benchmarked/);
122
+ });
123
+
124
+ test('engine SQL authentication guidance distinguishes safe preflight fallback from replay', () => {
125
+ const guide = read('docs/engine_backend.md');
126
+ const auth = markdownSection(guide, '## SQL authentication (issue #635)');
127
+ assert.match(auth, /SQLCMDUSER/);
128
+ assert.match(auth, /SQLCMDPASSWORD/);
129
+ assert.match(auth, /private credential store/);
130
+ assert.match(auth, /exit \*\*5\*\*/);
131
+ assert.match(auth, /sql_credentials_unavailable/);
132
+ assert.match(auth, /EngineSqlCredentialsUnavailable/);
133
+ assert.match(auth, /must not\s+trigger automatic SDK build replay/);
134
+ const auto = markdownSection(guide, '### Exactly what `auto` routes');
135
+ assert.match(auto, /compile_check callers=false includeCallees=transitive/);
136
+ assert.match(auto, /Whole-KB/);
137
+ assert.match(auto, /estimated_seconds/);
138
+ assert.match(auto, /Read, query, edit/);
139
+ });
140
+
141
+ test('engine capability guidance does not duplicate synthetic parity claims', () => {
142
+ const section = markdownSection(read('README.md'), '#### Gateway Capability Registry Gates');
143
+ assert.match(section, /\[current capability table\]\(docs\/engine_backend\.md\)/);
144
+ assert.doesNotMatch(section, /\|\s*`[^`]+`[^\n]*\*\*Parity\*\*/);
145
+ assert.match(section, /deferral guard is not native implementation coverage/);
146
+ assert.match(section, /historical, bounded evidence/);
147
+ assert.match(section, /plans\/132-gxengine-full-parity\.md/);
148
+ });
149
+
150
+ test('engine default policy is gxengine and preserves auto/SDK opt-out and reconciliation', () => {
151
+ const section = markdownSection(read('README.md'), '### Activation Flag & Safety Seam');
152
+ assert.match(section, /defaults to `"gxengine"`/);
153
+ assert.match(section, /async\/other directed builds/);
154
+ assert.match(section, /mode=compile_check/);
155
+ assert.match(section, /callers=false/);
156
+ const backend = read('docs/engine_backend.md');
157
+ assert.match(backend, /engine\.scope=target-closure/);
158
+ assert.match(backend, /successful target build does not imply whole-KB success/);
159
+ assert.match(backend, /default `callers=true`/);
160
+ assert.match(section, /`"auto"` routes only builds/);
161
+ assert.match(section, /`"sdk"` keeps every operation on the SDK/);
162
+ assert.match(section, /never trigger automatic SDK replay/);
163
+ assert.match(section, /EngineCapabilityNotParity.*evidence-gate rejection/);
164
+ assert.match(section, /EngineOperationOutsideAdmittedSpace.*read\/edit deferrals/);
165
+ for (const document of ['src/gx-engine/README.md', 'docs/engine_backend.md']) {
166
+ const text = read(document);
167
+ assert.match(text, /planning skips.*Partial|Partial when skipped during planning/);
168
+ assert.match(text, /checked-emission errors.*Failed/);
169
+ }
170
+ assert.match(section, /admitted type-only `genexus_query` calls/);
171
+ assert.match(section, /all reads/);
172
+ assert.match(backend, /No read shape is currently admitted/);
173
+ assert.match(backend, /all object-name\/text searches \(including\s+`exactMatch:true`\)/);
174
+ assert.match(read('docs/engine_backend.md'), /`Engine\.Backend=gxengine` \(also when the section is absent\)/);
175
+ assert.match(read('src/gx-engine/README.md'), /defaults to `Engine\.Backend=gxengine`/);
176
+ assert.match(read('AGENTS.md'), /`Engine\.Backend` defaults to `gxengine`/);
177
+ });
178
+
78
179
  test('the docs index lists every top-level document and every link resolves', () => {
79
180
  const docsDir = path.join(repoRoot, 'docs');
80
181
  const index = read('docs/README.md');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genexus-mcp",
3
- "version": "3.16.0",
3
+ "version": "4.0.1",
4
4
  "mcpName": "io.github.lennix1337/genexus",
5
5
  "description": "GeneXus 16, GeneXus 17, GeneXus 18 MCP server with native SDK support; basic legacy compatibility for GeneXus Evolution 3, GeneXus Evolution 2, GeneXus Evolution 1, GeneXus 15, GeneXus 9.0, GeneXus 8.0 via com-gxpublic and dotnet-reflection drivers — read, edit, and analyze Knowledge Base objects directly from Claude, Cursor, and other AI agents over the Model Context Protocol.",
6
6
  "keywords": [
@@ -7,7 +7,7 @@
7
7
  "targets": {
8
8
  ".NETCoreApp,Version=v10.0": {},
9
9
  ".NETCoreApp,Version=v10.0/win-x64": {
10
- "GxMcp.Gateway/3.16.0": {
10
+ "GxMcp.Gateway/4.0.1": {
11
11
  "dependencies": {
12
12
  "Newtonsoft.Json": "13.0.3",
13
13
  "System.Management": "10.0.5",
@@ -66,7 +66,7 @@
66
66
  }
67
67
  },
68
68
  "libraries": {
69
- "GxMcp.Gateway/3.16.0": {
69
+ "GxMcp.Gateway/4.0.1": {
70
70
  "type": "project",
71
71
  "serviceable": false,
72
72
  "sha512": ""
Binary file
Binary file
@@ -1,19 +1,19 @@
1
1
  {
2
- "GatewayMode": "stdio-isolated",
2
+ "ConfigSchemaVersion": 2,
3
3
  "Environment": {
4
4
  "ResolutionPolicy": "strict"
5
5
  },
6
- "ConfigSchemaVersion": 2,
7
- "Server": {
8
- "EmitStructuredContent": false,
9
- "HttpPort": 0,
10
- "TerseResponses": true,
11
- "SessionIdleTimeoutMinutes": 10,
12
- "WorkerIdleTimeoutMinutes": 5,
13
- "McpStdio": true
14
- },
6
+ "GatewayMode": "stdio-isolated",
15
7
  "GeneXus": {
16
8
  "WorkerExecutable": "worker\\\\GxMcp.Worker.exe",
17
9
  "InstallationPath": "C:\\Program Files (x86)\\GeneXus\\GeneXus18"
10
+ },
11
+ "Server": {
12
+ "WorkerIdleTimeoutMinutes": 5,
13
+ "HttpPort": 0,
14
+ "TerseResponses": true,
15
+ "EmitStructuredContent": false,
16
+ "McpStdio": true,
17
+ "SessionIdleTimeoutMinutes": 10
18
18
  }
19
19
  }
Binary file
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "schemaVersion": "gxmcp-release-manifest/1",
3
- "version": "3.16.0",
4
- "sourceCommit": "5084cdc8f9d1b4624c208809fb6077c27af65f38",
3
+ "version": "4.0.1",
4
+ "sourceCommit": "290aff51e3a7c810619eaed2cc5059622eb0939b",
5
5
  "sourceCommitPolicy": "exact-tag",
6
- "generatedAtUtc": "2026-10-17T13:05:11.7186683Z",
6
+ "generatedAtUtc": "2026-10-21T18:49:57.9694364Z",
7
7
  "runtime": {
8
8
  "gateway": "net10.0-windows",
9
9
  "worker": "net48-x86",
@@ -15,33 +15,33 @@
15
15
  "2026-07-28"
16
16
  ],
17
17
  "schema": "tool_definitions.json",
18
- "schemaSha256": "be4c1f74a47cada8e265bc632a7b87cdd1132020edcb5ea43b5a341829feba7a",
18
+ "schemaSha256": "562b893790fcd2e5e456c82935c86ea82e7612bc9457230184f6e018ed87fd47",
19
19
  "provenance": "gxmcp-sbom.json",
20
20
  "artifacts": [
21
21
  {
22
22
  "path": "gxmcp-sbom.json",
23
- "size": 591,
24
- "sha256": "3182ae289ba22a351be87976719de89744ab7953b6f35e31b8fd1c237c09f0fa"
23
+ "size": 590,
24
+ "sha256": "fb7abeca06e3c06c0a4dc346c86e0b1dad5056ef1c442a99feab4cc2b5ae187f"
25
25
  },
26
26
  {
27
27
  "path": "GxMcp.Gateway.exe",
28
28
  "size": 162304,
29
- "sha256": "d8a368d30952ec8b0b69455f7296a11052b2f70f4110b78885532bfd4ace3391"
29
+ "sha256": "e829a6ba15543bf92c65d1ab59bce6c480133e622de30e3d33c18cf09604911b"
30
30
  },
31
31
  {
32
32
  "path": "nexus-ide.vsix",
33
- "size": 1325114,
34
- "sha256": "24cb9e2cdc533a1595e94a505344141180944bb29aef212b4d12569e4833aeee"
33
+ "size": 1325111,
34
+ "sha256": "b872a9df865037e84d2188247d374485a4de2681d2a4c861a5e411a1c5b7dda2"
35
35
  },
36
36
  {
37
37
  "path": "tool_definitions.json",
38
- "size": 155111,
39
- "sha256": "be4c1f74a47cada8e265bc632a7b87cdd1132020edcb5ea43b5a341829feba7a"
38
+ "size": 158549,
39
+ "sha256": "562b893790fcd2e5e456c82935c86ea82e7612bc9457230184f6e018ed87fd47"
40
40
  },
41
41
  {
42
42
  "path": "worker/GxMcp.Worker.exe",
43
- "size": 4302848,
44
- "sha256": "6f33014505f3c3564e6e9fc255bd8f3962f8d774e96e6ddcbe944741f61cc5af"
43
+ "size": 4594688,
44
+ "sha256": "1427ffb13fd69b0f72ea3bac949f53dd67f510d327426dd4b1c9ef55989b5eaf"
45
45
  }
46
46
  ]
47
47
  }
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "schemaVersion": "gxmcp-provenance/1",
3
- "version": "3.16.0",
4
- "sourceCommit": "5084cdc8f9d1b4624c208809fb6077c27af65f38",
3
+ "version": "4.0.1",
4
+ "sourceCommit": "290aff51e3a7c810619eaed2cc5059622eb0939b",
5
5
  "sourceCommitPolicy": "exact-tag",
6
6
  "components": [
7
7
  {
8
8
  "name": "genexus-mcp",
9
9
  "lockfile": "package-lock.json",
10
- "size": 38806,
11
- "sha256": "53dad4a00a3756eb5e24be271a3e80c5325b387c0c1ec1aba2f197560d6b84b3"
10
+ "size": 38804,
11
+ "sha256": "db0291b993484bcc255896278ba1416ebaaae00b4afb0d97b73e357d41f67016"
12
12
  },
13
13
  {
14
14
  "name": "nexus-ide",
15
15
  "lockfile": "src/nexus-ide/package-lock.json",
16
- "size": 179505,
17
- "sha256": "c44b3a41911e1defe5cd0639f3e1dcf164b95e26e906d49d867805dd234604ec"
16
+ "size": 179503,
17
+ "sha256": "030671cb319b730ab2c6893ff540b8809e7aefc7df1d2b97631a46315786c977"
18
18
  }
19
19
  ]
20
20
  }
Binary file
Binary file