cheatengine 5.8.28 → 5.8.29
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/ce_mcp_bridge.lua +5 -43
- package/package.json +1 -1
- package/src/tool-registry.js +2 -22
package/ce_mcp_bridge.lua
CHANGED
|
@@ -1500,46 +1500,9 @@ Handlers.execute_lua = function(p)
|
|
|
1500
1500
|
local ok, result = pcall(fn)
|
|
1501
1501
|
if not ok then error("Runtime error: " .. tostring(result)) end
|
|
1502
1502
|
return { result = result }
|
|
1503
|
-
end
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
local mv = getMemoryViewForm()
|
|
1507
|
-
if mv then
|
|
1508
|
-
local dv = mv.DisassemblerView
|
|
1509
|
-
if dv and dv.SelectedAddress then
|
|
1510
|
-
return { address = Utils.formatHex(dv.SelectedAddress) }
|
|
1511
|
-
end
|
|
1512
|
-
end
|
|
1513
|
-
error("No address selected in Memory View")
|
|
1514
|
-
end
|
|
1515
|
-
|
|
1516
|
-
-- Handler: get_logs - Retrieve log entries with filtering
|
|
1517
|
-
Handlers.get_logs = function(p)
|
|
1518
|
-
local count = p.count or 100
|
|
1519
|
-
local minLevel = p.min_level or p.minLevel or LogLevel.DEBUG
|
|
1520
|
-
|
|
1521
|
-
-- Convert string level to number if needed
|
|
1522
|
-
if type(minLevel) == "string" then
|
|
1523
|
-
local levelMap = {
|
|
1524
|
-
debug = LogLevel.DEBUG,
|
|
1525
|
-
info = LogLevel.INFO,
|
|
1526
|
-
warn = LogLevel.WARN,
|
|
1527
|
-
error = LogLevel.ERROR
|
|
1528
|
-
}
|
|
1529
|
-
minLevel = levelMap[minLevel:lower()] or LogLevel.DEBUG
|
|
1530
|
-
end
|
|
1531
|
-
|
|
1532
|
-
local entries = Logger.getEntries(count, minLevel)
|
|
1533
|
-
local stats = Logger.getStats()
|
|
1534
|
-
|
|
1535
|
-
return {
|
|
1536
|
-
entries = entries,
|
|
1537
|
-
count = #entries,
|
|
1538
|
-
stats = stats
|
|
1539
|
-
}
|
|
1540
|
-
end
|
|
1541
|
-
|
|
1542
|
-
-- Handler: stats - Return comprehensive execution statistics
|
|
1503
|
+
end
|
|
1504
|
+
|
|
1505
|
+
-- Handler: stats - Return comprehensive execution statistics
|
|
1543
1506
|
Handlers.stats = function(p)
|
|
1544
1507
|
local metrics = Metrics.getSummary()
|
|
1545
1508
|
local logStats = Logger.getStats()
|
|
@@ -7473,9 +7436,8 @@ local SYNC_COMMANDS = {
|
|
|
7473
7436
|
register_symbol = true,
|
|
7474
7437
|
unregister_symbol = true,
|
|
7475
7438
|
allocate_memory = true,
|
|
7476
|
-
execute_lua = true,
|
|
7477
|
-
|
|
7478
|
-
-- Hook commands
|
|
7439
|
+
execute_lua = true,
|
|
7440
|
+
-- Hook commands
|
|
7479
7441
|
hook_function = true,
|
|
7480
7442
|
unhook_function = true,
|
|
7481
7443
|
-- Emulation commands
|
package/package.json
CHANGED
package/src/tool-registry.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Tool Registry for MCP Tools
|
|
3
|
-
* Defines all
|
|
3
|
+
* Defines all 55 tools available in the Cheat Engine MCP Bridge
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
const ToolCategory = {
|
|
@@ -108,32 +108,12 @@ class ToolRegistry {
|
|
|
108
108
|
|
|
109
109
|
this._register(new Tool(
|
|
110
110
|
'ce_execute_lua',
|
|
111
|
-
'Execute
|
|
111
|
+
'Execute Lua code with full access to CE APIs. Returns {result}.',
|
|
112
112
|
'execute_lua',
|
|
113
113
|
ToolCategory.SYSTEM,
|
|
114
114
|
[new ToolParam('code', 'string', 'Lua code to execute', true)]
|
|
115
115
|
));
|
|
116
116
|
|
|
117
|
-
this._register(new Tool(
|
|
118
|
-
'ce_get_selected_address',
|
|
119
|
-
'Get the currently selected address in CE Memory View/Disassembler',
|
|
120
|
-
'get_selected_address',
|
|
121
|
-
ToolCategory.SYSTEM
|
|
122
|
-
));
|
|
123
|
-
|
|
124
|
-
this._register(new Tool(
|
|
125
|
-
'ce_get_logs',
|
|
126
|
-
'Get log entries from the Cheat Engine MCP Bridge Lua side. ' +
|
|
127
|
-
'Returns: {entries: [{timestamp, level, category, message, data}], count}. ' +
|
|
128
|
-
'Useful for debugging and monitoring bridge operations.',
|
|
129
|
-
'get_logs',
|
|
130
|
-
ToolCategory.SYSTEM,
|
|
131
|
-
[
|
|
132
|
-
new ToolParam('count', 'integer', 'Maximum number of log entries to return (default: 100)', false, 100),
|
|
133
|
-
new ToolParam('min_level', 'integer', 'Minimum log level to include: 1=DEBUG, 2=INFO, 3=WARN, 4=ERROR (default: 1)', false, 1),
|
|
134
|
-
]
|
|
135
|
-
));
|
|
136
|
-
|
|
137
117
|
this._register(new Tool(
|
|
138
118
|
'ce_list_processes',
|
|
139
119
|
'List running processes. Use before ce_attach_process to find available targets. ' +
|