pcx-ai-toolkit 1.16.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.
Files changed (94) hide show
  1. pcx_ai_toolkit-1.16.0.data/data/LICENSE +21 -0
  2. pcx_ai_toolkit-1.16.0.data/data/README.md +451 -0
  3. pcx_ai_toolkit-1.16.0.data/data/VERSION +1 -0
  4. pcx_ai_toolkit-1.16.0.data/data/docs/COUNTS.json +12 -0
  5. pcx_ai_toolkit-1.16.0.data/data/docs/llms-perception-angelscript.md +15522 -0
  6. pcx_ai_toolkit-1.16.0.data/data/docs/llms-perception-enma.md +22360 -0
  7. pcx_ai_toolkit-1.16.0.data/data/docs/llms.txt +348 -0
  8. pcx_ai_toolkit-1.16.0.data/data/knowledge/pcx-api-index.json +21743 -0
  9. pcx_ai_toolkit-1.16.0.data/data/knowledge/unsupported-symbols.json +12 -0
  10. pcx_ai_toolkit-1.16.0.data/data/templates/README.md +35 -0
  11. pcx_ai_toolkit-1.16.0.data/data/templates/aimbot-skeleton.em +218 -0
  12. pcx_ai_toolkit-1.16.0.data/data/templates/cheat-skeleton-as/README.md +32 -0
  13. pcx_ai_toolkit-1.16.0.data/data/templates/cheat-skeleton-as/aim.as +61 -0
  14. pcx_ai_toolkit-1.16.0.data/data/templates/cheat-skeleton-as/esp.as +70 -0
  15. pcx_ai_toolkit-1.16.0.data/data/templates/cheat-skeleton-as/globals.as +58 -0
  16. pcx_ai_toolkit-1.16.0.data/data/templates/cheat-skeleton-as/main.as +51 -0
  17. pcx_ai_toolkit-1.16.0.data/data/templates/cheat-skeleton-as/menu.as +83 -0
  18. pcx_ai_toolkit-1.16.0.data/data/templates/cheat-skeleton-as/offsets.as +35 -0
  19. pcx_ai_toolkit-1.16.0.data/data/templates/cheat-skeleton-as/radar.as +49 -0
  20. pcx_ai_toolkit-1.16.0.data/data/templates/cheat-skeleton-as/triggerbot.as +30 -0
  21. pcx_ai_toolkit-1.16.0.data/data/templates/cheat-skeleton-as/utils.as +89 -0
  22. pcx_ai_toolkit-1.16.0.data/data/templates/cheat-skeleton-em/README.md +32 -0
  23. pcx_ai_toolkit-1.16.0.data/data/templates/cheat-skeleton-em/aim.em +64 -0
  24. pcx_ai_toolkit-1.16.0.data/data/templates/cheat-skeleton-em/esp.em +73 -0
  25. pcx_ai_toolkit-1.16.0.data/data/templates/cheat-skeleton-em/globals.em +61 -0
  26. pcx_ai_toolkit-1.16.0.data/data/templates/cheat-skeleton-em/main.em +48 -0
  27. pcx_ai_toolkit-1.16.0.data/data/templates/cheat-skeleton-em/menu.em +80 -0
  28. pcx_ai_toolkit-1.16.0.data/data/templates/cheat-skeleton-em/offsets.em +35 -0
  29. pcx_ai_toolkit-1.16.0.data/data/templates/cheat-skeleton-em/radar.em +50 -0
  30. pcx_ai_toolkit-1.16.0.data/data/templates/cheat-skeleton-em/triggerbot.em +32 -0
  31. pcx_ai_toolkit-1.16.0.data/data/templates/cheat-skeleton-em/utils.em +90 -0
  32. pcx_ai_toolkit-1.16.0.data/data/templates/full-project/feature.em +32 -0
  33. pcx_ai_toolkit-1.16.0.data/data/templates/full-project/globals.em +19 -0
  34. pcx_ai_toolkit-1.16.0.data/data/templates/full-project/main.em +39 -0
  35. pcx_ai_toolkit-1.16.0.data/data/templates/full-project/menu.em +51 -0
  36. pcx_ai_toolkit-1.16.0.data/data/templates/full-project/offsets.em +35 -0
  37. pcx_ai_toolkit-1.16.0.data/data/templates/full-project-as/README.md +56 -0
  38. pcx_ai_toolkit-1.16.0.data/data/templates/full-project-as/feature.as +52 -0
  39. pcx_ai_toolkit-1.16.0.data/data/templates/full-project-as/globals.as +34 -0
  40. pcx_ai_toolkit-1.16.0.data/data/templates/full-project-as/main.as +78 -0
  41. pcx_ai_toolkit-1.16.0.data/data/templates/hello-world.em +22 -0
  42. pcx_ai_toolkit-1.16.0.data/data/templates/minimap.em +212 -0
  43. pcx_ai_toolkit-1.16.0.data/data/templates/overlay-basic.em +75 -0
  44. pcx_ai_toolkit-1.16.0.data/data/tools/update-toolkit.ps1 +240 -0
  45. pcx_ai_toolkit-1.16.0.data/data/tools/update-toolkit.sh +233 -0
  46. pcx_ai_toolkit-1.16.0.dist-info/METADATA +463 -0
  47. pcx_ai_toolkit-1.16.0.dist-info/RECORD +94 -0
  48. pcx_ai_toolkit-1.16.0.dist-info/WHEEL +5 -0
  49. pcx_ai_toolkit-1.16.0.dist-info/entry_points.txt +2 -0
  50. pcx_ai_toolkit-1.16.0.dist-info/licenses/LICENSE +21 -0
  51. pcx_ai_toolkit-1.16.0.dist-info/top_level.txt +1 -0
  52. tools/__init__.py +1 -0
  53. tools/analyze-vmprotect.py +332 -0
  54. tools/anti-debug-scanner.py +407 -0
  55. tools/api-lookup.py +89 -0
  56. tools/as-linter.py +216 -0
  57. tools/binary-diff-summary.py +242 -0
  58. tools/build-api-index.py +381 -0
  59. tools/build-counts.py +136 -0
  60. tools/build-llms-index.py +380 -0
  61. tools/build-provenance.py +141 -0
  62. tools/check-doc-drift.py +163 -0
  63. tools/check-internal-links.py +34 -0
  64. tools/check-llm-answer.py +83 -0
  65. tools/check-llm-contract.py +82 -0
  66. tools/check-mcp-config.py +97 -0
  67. tools/check-skill-contract.py +96 -0
  68. tools/check-version-matrix.py +118 -0
  69. tools/dump-strings-xor.py +165 -0
  70. tools/dumper-to-enma.py +332 -0
  71. tools/evidence-log-validator.py +263 -0
  72. tools/hallucination-eval.py +88 -0
  73. tools/identify-protector.py +274 -0
  74. tools/lib/__init__.py +0 -0
  75. tools/lib/pcx_grounding.py +510 -0
  76. tools/lib/pcx_parser.py +446 -0
  77. tools/lib/pcx_paths.py +35 -0
  78. tools/lib/pcx_scaffold.py +275 -0
  79. tools/lib/pe_parse.py +142 -0
  80. tools/module-export-mapper.py +275 -0
  81. tools/offset-diff.py +230 -0
  82. tools/pattern-format-converter.py +205 -0
  83. tools/pcx.py +450 -0
  84. tools/pe-section-analyzer.py +171 -0
  85. tools/re-importer.py +241 -0
  86. tools/regenerate-docs.py +109 -0
  87. tools/resolve-api-hashes.py +290 -0
  88. tools/script-linter.py +349 -0
  89. tools/setup-core.py +209 -0
  90. tools/sig-uniqueness-checker.py +289 -0
  91. tools/symbol-check.py +141 -0
  92. tools/update-toolkit.ps1 +240 -0
  93. tools/update-toolkit.sh +233 -0
  94. tools/verify-project.py +158 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 pcx-ai-toolkit contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,451 @@
1
+ <div align="center">
2
+
3
+ <img src="assets/perception-banner.png" alt="Perception.cx" width="760">
4
+
5
+ # pcx-ai-toolkit
6
+
7
+ ### The Source-Grounded AI Toolkit for Perception.cx Enma + AngelScript
8
+
9
+ [![CI](https://github.com/VoidChecksum/pcx-ai-toolkit/actions/workflows/ci.yml/badge.svg)](https://github.com/VoidChecksum/pcx-ai-toolkit/actions/workflows/ci.yml)
10
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
11
+ [![Scope](https://img.shields.io/badge/Scope-Enma%20%2B%20AngelScript-f97316.svg)](#language-scope)
12
+ [![Docs](https://img.shields.io/badge/dynamic/json?url=https://raw.githubusercontent.com/VoidChecksum/pcx-ai-toolkit/main/docs/COUNTS.json&query=$.docs&label=Docs&suffix=%20pages&color=22c55e)](#knowledge-surface)
13
+ [![Doc Lines](https://img.shields.io/badge/dynamic/json?url=https://raw.githubusercontent.com/VoidChecksum/pcx-ai-toolkit/main/docs/COUNTS.json&query=$.doc_lines&label=Doc%20Lines&color=22c55e)](#knowledge-surface)
14
+ [![MCP Tools](https://img.shields.io/badge/dynamic/json?url=https://raw.githubusercontent.com/VoidChecksum/pcx-ai-toolkit/main/docs/COUNTS.json&query=$.mcp_tools&label=MCP%20Tools&color=0ea5e9)](#mcp-integration)
15
+ [![AI Skills](https://img.shields.io/badge/dynamic/json?url=https://raw.githubusercontent.com/VoidChecksum/pcx-ai-toolkit/main/docs/COUNTS.json&query=$.skills&label=AI%20Skills&color=eab308)](#ai-agent-stack)
16
+ [![Native Tools](https://img.shields.io/badge/dynamic/json?url=https://raw.githubusercontent.com/VoidChecksum/pcx-ai-toolkit/main/docs/COUNTS.json&query=$.native_tools&label=Native%20Tools&color=64748b)](#native-re-tools)
17
+
18
+ **Make LLMs write Perception.cx code from verified Enma and AngelScript sources, not guessed APIs.**
19
+
20
+ `llms.txt` context packs | source-backed API oracle | MCP tools | validators | native Rust RE tools | templates | AI skills | VS Code and Visual Studio packages
21
+
22
+ [AI Start Here](#ai-start-here) | [Anti-Hallucination](#anti-hallucination-pipeline) | [Knowledge](#knowledge-surface) | [MCP](#mcp-integration) | [Editors](#editor-and-vsix-packages) | [Safety](#safety-and-scope)
23
+
24
+ </div>
25
+
26
+ ---
27
+ ## First Decision
28
+
29
+ ```text
30
+ Writing Enma? Load docs/llms-perception-enma.md, then run pcx symbol-check.
31
+ Writing AngelScript? Load docs/llms-perception-angelscript.md, then run pcx verify.
32
+ Need API proof? Run pcx api <symbol> --lang enma|angelscript.
33
+ Need MCP context? Run pcx-rs mcp, pcx-rs mcp-schema --json, or pcx-knowledge-mcp.
34
+ Need RE artifacts? Use re-importer.py exporters; keep evidence before shipping.
35
+ ```
36
+
37
+ Unsupported or hallucinated surfaces live in [`knowledge/unsupported-symbols.json`](knowledge/unsupported-symbols.json) and are rejected by validators when seen.
38
+
39
+ <table>
40
+ <tr>
41
+ <td width="50%">
42
+
43
+ ## What This Is
44
+
45
+ `pcx-ai-toolkit` is an AI-facing knowledge and validation layer for Perception.cx scripting.
46
+
47
+ It teaches agents the supported **Enma** and **AngelScript** APIs, routes them to the right docs, rejects wrong-language symbols, and validates generated code before it reaches PCX.
48
+
49
+ </td>
50
+ <td width="50%">
51
+
52
+ ## What This Is Not
53
+
54
+ This is not a generic cheat dump, offset pack, malware toolkit, or unsupported language bundle.
55
+
56
+ Lua and other historical surfaces are intentionally excluded from the AI contract. If a symbol is not proven by docs or the API index, the agent must not invent it.
57
+
58
+ </td>
59
+ </tr>
60
+ </table>
61
+
62
+ ## AI Start Here
63
+
64
+ Load this sequence before writing any Perception code:
65
+
66
+ ```text
67
+ 1. docs/AI_AGENT_OPERATING_MANUAL.md
68
+ 2. docs/perception/llm-routing.md
69
+ 3. Choose Enma (.em) or AngelScript (.as)
70
+ 4. Load the matching llms-perception-* context pack
71
+ 5. Verify every API or language add-on symbol with pcx api or MCP api_lookup
72
+ 6. Validate code with pcx symbol-check, pcx verify, or MCP validate_answer
73
+ ```
74
+
75
+ | Must Load | Purpose |
76
+ |---|---|
77
+ | [docs/AI_AGENT_OPERATING_MANUAL.md](docs/AI_AGENT_OPERATING_MANUAL.md) | Minimal safe workflow for LLM and MCP agents |
78
+ | [docs/perception/llm-routing.md](docs/perception/llm-routing.md) | Binding split between Enma and AngelScript |
79
+ | [docs/llms-perception-enma.md](docs/llms-perception-enma.md) | Single-file Enma + PCX context pack |
80
+ | [docs/llms-perception-angelscript.md](docs/llms-perception-angelscript.md) | Single-file AngelScript + PCX context pack |
81
+ | [knowledge/pcx-api-index.json](knowledge/pcx-api-index.json) | Machine-readable oracle for PCX host APIs and language add-ons |
82
+ | [knowledge/perception-forum-insights.md](knowledge/perception-forum-insights.md) | Secondary forum/changelog context, never an API contract |
83
+
84
+ Recommended model instruction:
85
+
86
+ ```text
87
+ Before writing Perception code, load docs/AI_AGENT_OPERATING_MANUAL.md and docs/perception/llm-routing.md.
88
+ Use Enma docs for .em files and AngelScript docs for .as files.
89
+ Verify every Perception host API and language/add-on symbol with pcx api or MCP api_lookup.
90
+ Validate final code or Markdown answers before returning them.
91
+ If the docs/API index do not prove a symbol exists, say so instead of guessing.
92
+ ```
93
+
94
+ ## Language Scope
95
+
96
+ The toolkit is intentionally scoped to **Perception-supported Enma and AngelScript**.
97
+
98
+ | Contract | Enma `.em` | AngelScript `.as` |
99
+ |---|---|---|
100
+ | Entry point | `int64 main()` | `int main()` |
101
+ | Repeating work | `register_routine(cast<int64>(fn), data)` | `register_callback(fn, interval, data)` |
102
+ | Callback shape | `void fn(int64 data)` | `void fn(int id, int data_index)` |
103
+ | Logging | `println(...)` | `log(...)` |
104
+ | Process handle | `proc_t` value, RAII | `proc_t@` handle, explicit cleanup patterns |
105
+ | Containers | `T[]`, `map<K,V>` | `array<T>`, `dictionary` |
106
+ | Render positions | `vec2(...)` values | Raw parameters unless the AS page says otherwise |
107
+ | Render colors | `color(r,g,b,a)` values | Integer RGBA parameters unless the AS page says otherwise |
108
+
109
+ If code crosses this table without source proof, treat it as wrong.
110
+
111
+ ## Quick Start
112
+
113
+ PyPI:
114
+
115
+ ```bash
116
+ python -m pip install pcx-ai-toolkit
117
+ pcx doctor
118
+ ```
119
+
120
+ npm / Bun:
121
+
122
+ ```bash
123
+ npm install -g pcx-ai-toolkit
124
+ # or
125
+ bun add -g pcx-ai-toolkit
126
+ pcx doctor
127
+ ```
128
+
129
+ Source checkout:
130
+
131
+ ```bash
132
+ git clone --recursive https://github.com/VoidChecksum/pcx-ai-toolkit.git
133
+ cd pcx-ai-toolkit
134
+ ./setup.sh
135
+ ```
136
+
137
+ Windows PowerShell:
138
+
139
+ ```powershell
140
+ git clone --recursive https://github.com/VoidChecksum/pcx-ai-toolkit.git
141
+ cd pcx-ai-toolkit
142
+ powershell -ExecutionPolicy Bypass -File setup.ps1
143
+ ```
144
+
145
+ Requirements: Git, Python 3.10+, Node.js 18+. Git submodules are required for LSP and `.vsix` packaging.
146
+
147
+ ## Anti-Hallucination Pipeline
148
+
149
+ Use these checks before trusting generated code:
150
+
151
+ ```bash
152
+ # Exact source-backed lookup.
153
+ pcx api draw_text --lang enma
154
+ pcx api register_callback --lang angelscript
155
+ pcx api json_object --lang enma
156
+
157
+ # Script validation.
158
+ pcx symbol-check my_script.em
159
+ pcx verify my_script.as
160
+ pcx verify-project ./my-project
161
+
162
+ # Markdown answer validation.
163
+ pcx check-answer answer.md
164
+
165
+ # Regression benchmark for hallucinated answers/snippets.
166
+ python3 tools/hallucination-eval.py
167
+ ```
168
+
169
+ MCP-aware clients should use this sequence:
170
+
171
+ ```text
172
+ overview()
173
+ recommend_context(task, language)
174
+ generate_script_plan(task, language)
175
+ scaffold_project(..., dry_run=true)
176
+ get_skill(name)
177
+ get_file(path)
178
+ api_lookup(symbol, language)
179
+ validate_code(code, language)
180
+ validate_answer(markdown)
181
+ validate_project(path)
182
+ ```
183
+
184
+ | Failure Mode | Countermeasure |
185
+ |---|---|
186
+ | Invented API names like `draw_esp()` | `pcx api`, MCP `api_lookup`, and `knowledge/pcx-api-index.json` |
187
+ | Enma lifecycle inside `.as` | `docs/perception/llm-routing.md`, symbol validation, wrong-language detection |
188
+ | Missing Enma imports | `validate_code` missing-import findings for `vec`, `color`, `math`, `json`, and more |
189
+ | Enma semantic traps | Rust `symbol-check` flags integer-keyed `map<K,V>`, escaping `return &local`, and missing `PERM_FILE` for file APIs |
190
+ | Stale docs | provenance, drift checks, `tools/regenerate-docs.py`, regenerated `llms-*` bundles |
191
+ | Forum facts treated as APIs | `knowledge/perception-forum-insights.md` is marked secondary |
192
+ | Regressed validators | `tools/hallucination-eval.py` golden corpus |
193
+
194
+ ## Knowledge Surface
195
+
196
+ | Docs | Doc Lines | API Docs Indexed | API Functions | API Methods | Skills | Templates | MCP Tools | Native Tools |
197
+ |---:|---:|---:|---:|---:|---:|---:|---:|---:|
198
+ | 124 | 32,186 | 39 | 836 | 333 | 25 | 30 | 59 | 13 |
199
+
200
+ | Surface | Path | Best For |
201
+ |---|---|---|
202
+ | LLM entry index | [docs/llms.txt](docs/llms.txt) | Auto-fetch tools and first-touch sessions |
203
+ | Full context pack | [docs/llms-full.txt](docs/llms-full.txt) | One preload for both supported languages |
204
+ | Enma context pack | [docs/llms-perception-enma.md](docs/llms-perception-enma.md) | Enma-only work |
205
+ | AngelScript context pack | [docs/llms-perception-angelscript.md](docs/llms-perception-angelscript.md) | AngelScript-only work |
206
+ | Skills bundle | [docs/llms-skills.md](docs/llms-skills.md) | Agent behavior and workflow rules |
207
+ | Knowledge bundle | [docs/llms-knowledge.md](docs/llms-knowledge.md) | Patterns, forum-derived context, RE references |
208
+ | API oracle | [knowledge/pcx-api-index.json](knowledge/pcx-api-index.json) | Exact signatures with source URLs |
209
+ | Dynamic MCP | [mcp/pcx-knowledge-mcp](mcp/pcx-knowledge-mcp) | Long sessions, lazy loading, validation |
210
+
211
+ High-value files:
212
+
213
+ | File | Use |
214
+ |---|---|
215
+ | [knowledge/pcx-api-cheatsheet.md](knowledge/pcx-api-cheatsheet.md) | PCX APIs at a glance |
216
+ | [knowledge/common-patterns.md](knowledge/common-patterns.md) | Working Enma patterns |
217
+ | [knowledge/custom-draw-patterns.md](knowledge/custom-draw-patterns.md) | GPU/custom draw examples |
218
+ | [knowledge/pcx-version-matrix.md](knowledge/pcx-version-matrix.md) | Version and changelog availability matrix |
219
+ | [knowledge/perception-forum-insights.md](knowledge/perception-forum-insights.md) | Forum-derived Enma rollout, overlay, IDE, analyzer, changelog context |
220
+
221
+ Regenerate and verify generated knowledge:
222
+
223
+ ```bash
224
+ python3 tools/build-counts.py
225
+ python3 tools/build-api-index.py
226
+ python3 tools/build-llms-index.py
227
+ python3 tools/build-provenance.py
228
+ python3 tools/regenerate-docs.py --check
229
+ python3 tools/check-llm-contract.py
230
+ python3 tools/check-skill-contract.py
231
+ ```
232
+
233
+ ## PCX CLI
234
+
235
+ ```bash
236
+ pcx setup
237
+ pcx update
238
+ pcx doctor
239
+ pcx api draw_text --lang enma
240
+ pcx symbol-check file.em
241
+ pcx verify file.as
242
+ pcx check-answer answer.md
243
+ pcx create --wizard
244
+ pcx create --name "My ESP" --language enma --kind full --target game.exe --output ./my-esp
245
+ pcx verify-project ./my-esp --allow-placeholders --allow-unverified
246
+ ```
247
+
248
+ | Tool | Purpose |
249
+ |---|---|
250
+ | [tools/api-lookup.py](tools/api-lookup.py) | Exact API oracle |
251
+ | [tools/symbol-check.py](tools/symbol-check.py) | Script-level source-grounded validation |
252
+ | [tools/as-linter.py](tools/as-linter.py) | AngelScript PCX discipline linting |
253
+ | [tools/verify-project.py](tools/verify-project.py) | Project-wide lint, symbol, hygiene, and evidence verification |
254
+ | [tools/check-llm-answer.py](tools/check-llm-answer.py) | Markdown answer code-block validation |
255
+ | [tools/hallucination-eval.py](tools/hallucination-eval.py) | Golden regression benchmark for hallucination gates |
256
+ | [tools/build-api-index.py](tools/build-api-index.py) | Rebuild source-backed API index |
257
+ | [tools/check-doc-drift.py](tools/check-doc-drift.py) | Compare local docs against upstream |
258
+ | [tools/regenerate-docs.py](tools/regenerate-docs.py) | Fetch drift-checkable upstream Markdown into `docs/` |
259
+ | [tools/re-importer.py](tools/re-importer.py) | Convert IDA/Ghidra/Binja/ReClass exports into PCX offset/evidence seeds |
260
+ | [tools/anti-debug-scanner.py](tools/anti-debug-scanner.py) | Native-backed anti-debug import, byte-pattern, and string scanner |
261
+ | [tools/identify-protector.py](tools/identify-protector.py) | Native-backed protector, packer, overlay, and anti-debug indicator scan |
262
+ | [tools/pe-section-analyzer.py](tools/pe-section-analyzer.py) | Native-backed section entropy, flag, overlay, and anomaly report |
263
+ | [tools/analyze-vmprotect.py](tools/analyze-vmprotect.py) | Native-backed VMProtect section, VM-entry, and workflow analyzer |
264
+ | [tools/dump-strings-xor.py](tools/dump-strings-xor.py) | Native-backed single-byte XOR string extraction |
265
+ | [tools/module-export-mapper.py](tools/module-export-mapper.py) | Native-backed export listing and named consumer cross-reference |
266
+ | [tools/sig-uniqueness-checker.py](tools/sig-uniqueness-checker.py) | Validate byte signatures; proxies to native Rust when built |
267
+ | [tools/binary-diff-summary.py](tools/binary-diff-summary.py) | Patch-day section diff and recompile/refactor/major-change classifier; proxies to native Rust when built |
268
+ | [tools/offset-diff.py](tools/offset-diff.py) | Diff named direct/RIP signatures across binary versions; proxies to native Rust when built |
269
+ | [tools/check-skill-contract.py](tools/check-skill-contract.py) | Reject stale or unsupported AI-skill contracts |
270
+ | [tools/check-mcp-config.py](tools/check-mcp-config.py) | Keep runtime MCP config aligned with docs |
271
+
272
+ ## Native RE Tools
273
+
274
+ The high-volume binary-analysis path is Rust-first with Python compatibility wrappers. Running `setup.sh`, `setup.ps1`, or CI builds these binaries into `tools/bin/`; if Cargo is unavailable, the same Python commands fall back automatically.
275
+
276
+ ```bash
277
+ cargo build --release --manifest-path tools/pe-parser/Cargo.toml
278
+ mkdir -p tools/bin
279
+ for tool in pe-parser anti-debug-scanner identify-protector pe-section-analyzer \
280
+ pcx-rs api-lookup pattern-format-converter analyze-vmprotect \
281
+ dump-strings-xor module-export-mapper \
282
+ sig-uniqueness-checker binary-diff-summary offset-diff; do
283
+ cp "tools/pe-parser/target/release/$tool" "tools/bin/$tool"
284
+ done
285
+ ```
286
+
287
+ | Native binary | Wrapper | Use |
288
+ |---|---|---|
289
+ | `pcx-rs` | [tools/pcx](tools/pcx) | Rust-first manager command layer and native command router |
290
+ | `api-lookup` | [tools/api-lookup.py](tools/api-lookup.py) | Source-backed Enma and AngelScript API lookup |
291
+ | `pattern-format-converter` | [tools/pattern-format-converter.py](tools/pattern-format-converter.py) | Pattern conversion across IDA, Ghidra, x64dbg, CE, Enma, and mask formats |
292
+ | `pe-parser` | [tools/lib/pe_parse.py](tools/lib/pe_parse.py) | PE/ELF/Mach-O metadata extraction for all RE tools |
293
+ | `anti-debug-scanner` | [tools/anti-debug-scanner.py](tools/anti-debug-scanner.py) | Anti-debug imports, byte patterns, timing, context, and debugger-string scan |
294
+ | `identify-protector` | [tools/identify-protector.py](tools/identify-protector.py) | Protector and packer heuristics from sections, imports, stubs, and overlays |
295
+ | `pe-section-analyzer` | [tools/pe-section-analyzer.py](tools/pe-section-analyzer.py) | Entropy, flags, overlay, and section anomaly analysis |
296
+ | `analyze-vmprotect` | [tools/analyze-vmprotect.py](tools/analyze-vmprotect.py) | VMProtect-specific section, entry-stub, and tooling recommendations |
297
+ | `dump-strings-xor` | [tools/dump-strings-xor.py](tools/dump-strings-xor.py) | XOR-hidden string extraction across selected sections |
298
+ | `module-export-mapper` | [tools/module-export-mapper.py](tools/module-export-mapper.py) | Export table mapping and named import consumer cross-reference |
299
+ | `sig-uniqueness-checker` | [tools/sig-uniqueness-checker.py](tools/sig-uniqueness-checker.py) | Unique/stale/ambiguous signature verdicts with near-miss support |
300
+ | `binary-diff-summary` | [tools/binary-diff-summary.py](tools/binary-diff-summary.py) | Fast patch-day section survival summary |
301
+ | `offset-diff` | [tools/offset-diff.py](tools/offset-diff.py) | Direct and RIP-relative offset movement report |
302
+
303
+ Keep new binary-analysis tools in the same Cargo package under [tools/pe-parser](tools/pe-parser), then expose a small Python wrapper so existing agent commands do not change.
304
+
305
+ ## Gap Analysis And Feature Improvements
306
+
307
+ The docs surface is strong, but the toolkit still has a few high-value gaps when measured against the current Perception Enma and AngelScript surfaces:
308
+
309
+ | Gap | Why It Matters | Improvement |
310
+ |---|---|---|
311
+ | Native parity is still incomplete | `symbol-check`, `verify-project`, `check-answer`, `create`, `counts`, `build-provenance`, offline `check-drift`, and core MCP handlers now run in Rust, but docs/index generation and some compatibility commands remain Python-backed | Port `build-api-index` and package/update commands only where native speed or release reliability pays for the code |
312
+ | MCP server parity is partial | `pcx-rs mcp` supports line-delimited JSON-RPC plus `initialize`, `ping`, `tools/list`, `tools/call`, and toolkit validation tools, but not Streamable HTTP | Add HTTP transport only if real MCP clients need direct `pcx-rs` attachment instead of stdio |
313
+ | Enma and AngelScript language services are separate TypeScript packages | The unified release workflow now ships both LSPs and the Rust CLI together, but the language packages still maintain separate generated API/predefined data | Share generated API/predefined data across both LSP packages once that duplication starts causing release drift |
314
+ | API drift checks still rely on live Python doc scraping | The upstream docs change frequently, and live CI checks can fail from network instability | Keep native `pcx-rs build-provenance` and offline `pcx-rs check-drift` as the CI-safe path; add explicit `--live` Rust fetching and API-index parsing only if the Python scripts keep causing release failures |
315
+ | Binary-analysis tools report findings but do not produce every PCX-ready remediation artifact | Analysts still manually turn some RE findings into Enma offsets, signatures, and evidence logs | Expand direct exporters for `offsets.em`, `offsets.as`, `evidence.jsonl`, signature health reports, and patch-day migration summaries |
316
+ | Scenario coverage can go deeper | Current fixtures cover the major API families plus Enma JSON/map/file/OOB usage, and red/green validator tests cover cast, pointer escape, permission, and map-key mistakes | Add more tiny scenarios only when they catch a documented compiler/runtime edge that current tests miss |
317
+ | Safety scope is metadata-backed but not policy-enforced | Templates and MCP responses preserve authorized-use context, but tooling does not block all dual-use misuse patterns | Keep metadata in generated artifacts and add narrow denylist checks only for common hallucinated abuse helpers |
318
+
319
+ ## AI Agent Stack
320
+
321
+ | Layer | Files |
322
+ |---|---|
323
+ | Global rules | [.clinerules](.clinerules), [.cursorrules](.cursorrules), [.windsurfrules](.windsurfrules), [.github/copilot-instructions.md](.github/copilot-instructions.md) |
324
+ | Drop-in rules | [rules/](rules/) |
325
+ | Claude skills | [.claude/skills/](.claude/skills/) |
326
+ | Agent manual | [docs/AI_AGENT_OPERATING_MANUAL.md](docs/AI_AGENT_OPERATING_MANUAL.md) |
327
+ | Routing contract | [docs/perception/llm-routing.md](docs/perception/llm-routing.md) |
328
+ | Knowledge MCP | [mcp/pcx-knowledge-mcp/](mcp/pcx-knowledge-mcp/) |
329
+
330
+ Core skills:
331
+
332
+ | Skill | Use |
333
+ |---|---|
334
+ | `pcx-enma-discipline` | Enma syntax, lifecycle, imports, and binding discipline |
335
+ | `pcx-angelscript-discipline` | AngelScript lifecycle and PCX binding discipline |
336
+ | `game-cheat-script-master` | End-to-end script architecture patterns |
337
+ | `game-cheat-guidelines` | Behavioral guardrails and anti-hallucination rules |
338
+ | `pcx-knowledge-index` | Which docs and knowledge files to load |
339
+ | `mcp-tool-routing` | When and how to call MCP tools |
340
+
341
+ ## MCP Integration
342
+
343
+ | MCP Surface | Purpose |
344
+ |---|---|
345
+ | [mcp/pcx-knowledge-mcp](mcp/pcx-knowledge-mcp) | Searchable corpus, API lookup, project scaffolding, code/project validation, answer validation |
346
+ | [mcp/perception-mcp-config.json](mcp/perception-mcp-config.json) | Runtime Perception MCP config with 59 live-process tools |
347
+
348
+ Install the knowledge server:
349
+
350
+ ```bash
351
+ pip install -e mcp/pcx-knowledge-mcp/
352
+ pcx-knowledge-mcp --help
353
+ ```
354
+
355
+ Client setup:
356
+
357
+ | Client | Guide |
358
+ |---|---|
359
+ | Claude Code | [mcp/claude-code-setup.md](mcp/claude-code-setup.md) |
360
+ | Cursor | [mcp/cursor-setup.md](mcp/cursor-setup.md) |
361
+ | Cline | [mcp/pcx-knowledge-mcp/README.md](mcp/pcx-knowledge-mcp/README.md) |
362
+ | Continue | [mcp/continue-setup.md](mcp/continue-setup.md) |
363
+ | Zed | [mcp/zed-setup.md](mcp/zed-setup.md) |
364
+ | Aider | [mcp/aider-setup.md](mcp/aider-setup.md) |
365
+
366
+ ## Editor and VSIX Packages
367
+
368
+ Prebuilt VS Code extension packages are stored in the LSP submodules:
369
+
370
+ | Package | Path | Language |
371
+ |---|---|---|
372
+ | Enma Language | `lsp/enma-lsp/enma-language-1.1.22.vsix` | `.em`, `.em.predefined`, `.emb` |
373
+ | AngelScript for Perception | `lsp/angel-lsp-pcx/angel-lsp-0.4.1.vsix` | `.as`, `.as.predefined` |
374
+
375
+ Build locally:
376
+
377
+ ```bash
378
+ ./tools/package-vsix.sh
379
+ ```
380
+
381
+ Manual packaging:
382
+
383
+ ```bash
384
+ cd lsp/enma-lsp
385
+ npm install
386
+ npm run compile
387
+ npm run package
388
+
389
+ cd ../angel-lsp-pcx
390
+ npm install
391
+ npm run compile
392
+ npx vsce package
393
+ ```
394
+
395
+ Visual Studio packages live under [visualstudio/](visualstudio/). They require Windows, MSBuild, and the Visual Studio extension development workload.
396
+
397
+ ```powershell
398
+ msbuild visualstudio\EnmaVS\EnmaVS.csproj /p:Configuration=Release /restore
399
+ msbuild visualstudio\AngelScriptVS\AngelScriptVS.csproj /p:Configuration=Release /restore
400
+ ```
401
+
402
+ ## Templates
403
+
404
+ | Template | Language | Use |
405
+ |---|---|---|
406
+ | `hello-world` | Enma | Minimal lifecycle sanity check |
407
+ | `cheat-skeleton-em` | Enma | Modular ESP, aim, menu, radar, triggerbot scaffold |
408
+ | `cheat-skeleton-as` | AngelScript | Equivalent AS scaffold |
409
+ | `full-project` | Enma | Multi-file Enma project layout |
410
+ | `full-project-as` | AngelScript | Multi-file AS project layout |
411
+ | `overlay-basic`, `minimap`, `aimbot-skeleton` | Enma | Focused examples |
412
+
413
+ Create one:
414
+
415
+ ```bash
416
+ pcx create --wizard
417
+ pcx create --name "PCX Enma Script" --language enma --kind cheat --target game.exe --output ./pcx-enma-script
418
+ pcx create --name "PCX AS Script" --language angelscript --kind cheat --target game.exe --output ./pcx-as-script
419
+ pcx verify-project ./pcx-enma-script --allow-placeholders --allow-unverified
420
+ ```
421
+
422
+ ## Repository Map
423
+
424
+ ```text
425
+ pcx-ai-toolkit/
426
+ ├── docs/ Generated LLM bundles + local docs mirror
427
+ ├── docs/perception/ Perception Enma and AngelScript API docs
428
+ ├── docs/enma/ Enma language and SDK references
429
+ ├── docs/angelscript-lang/ AngelScript core language manual
430
+ ├── knowledge/ API index, patterns, forum insights, RE references
431
+ ├── templates/ Enma and AngelScript scaffolds
432
+ ├── tools/ CLI, validators, builders, RE helpers
433
+ ├── tools/pe-parser/ Rust-native parser, signature, diff, and offset tools
434
+ ├── evals/ Hallucination regression corpus
435
+ ├── signatures/ Engine and protector reversal signature packs
436
+ ├── mcp/ Knowledge MCP and Perception MCP setup
437
+ ├── rules/ Drop-in agent instruction files
438
+ ├── .claude/skills/ Agent skills for PCX work
439
+ ├── lsp/ Enma and AngelScript VS Code extension submodules
440
+ └── visualstudio/ Visual Studio 2022 extension projects
441
+ ```
442
+
443
+ ## Safety and Scope
444
+
445
+ This toolkit is for authorized Perception.cx scripting, reverse engineering, security research, single-player modding, and defensive analysis. Only analyze software you own or are explicitly authorized to test.
446
+
447
+ The repo does not provide malware, stolen offsets, credential material, or binary payloads. See [SECURITY.md](SECURITY.md), [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md), and [CONTRIBUTING.md](CONTRIBUTING.md).
448
+
449
+ ## License
450
+
451
+ MIT. See [LICENSE](LICENSE).
@@ -0,0 +1 @@
1
+ 1.16.0
@@ -0,0 +1,12 @@
1
+ {
2
+ "doc_lines": 32935,
3
+ "docs": 129,
4
+ "engines": 5,
5
+ "knowledge": 26,
6
+ "mcp_tools": 59,
7
+ "native_tools": 13,
8
+ "signatures": 11,
9
+ "skills": 25,
10
+ "templates": 30,
11
+ "tools": 41
12
+ }