pcx-ai-toolkit 1.16.0__tar.gz

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 (106) hide show
  1. pcx_ai_toolkit-1.16.0/LICENSE +21 -0
  2. pcx_ai_toolkit-1.16.0/PKG-INFO +463 -0
  3. pcx_ai_toolkit-1.16.0/README.md +451 -0
  4. pcx_ai_toolkit-1.16.0/VERSION +1 -0
  5. pcx_ai_toolkit-1.16.0/docs/COUNTS.json +12 -0
  6. pcx_ai_toolkit-1.16.0/docs/llms-perception-angelscript.md +15522 -0
  7. pcx_ai_toolkit-1.16.0/docs/llms-perception-enma.md +22360 -0
  8. pcx_ai_toolkit-1.16.0/docs/llms.txt +348 -0
  9. pcx_ai_toolkit-1.16.0/knowledge/pcx-api-index.json +21743 -0
  10. pcx_ai_toolkit-1.16.0/knowledge/unsupported-symbols.json +12 -0
  11. pcx_ai_toolkit-1.16.0/pcx_ai_toolkit.egg-info/PKG-INFO +463 -0
  12. pcx_ai_toolkit-1.16.0/pcx_ai_toolkit.egg-info/SOURCES.txt +104 -0
  13. pcx_ai_toolkit-1.16.0/pcx_ai_toolkit.egg-info/dependency_links.txt +1 -0
  14. pcx_ai_toolkit-1.16.0/pcx_ai_toolkit.egg-info/entry_points.txt +2 -0
  15. pcx_ai_toolkit-1.16.0/pcx_ai_toolkit.egg-info/top_level.txt +1 -0
  16. pcx_ai_toolkit-1.16.0/pyproject.toml +83 -0
  17. pcx_ai_toolkit-1.16.0/setup.cfg +4 -0
  18. pcx_ai_toolkit-1.16.0/templates/README.md +35 -0
  19. pcx_ai_toolkit-1.16.0/templates/aimbot-skeleton.em +218 -0
  20. pcx_ai_toolkit-1.16.0/templates/cheat-skeleton-as/README.md +32 -0
  21. pcx_ai_toolkit-1.16.0/templates/cheat-skeleton-as/aim.as +61 -0
  22. pcx_ai_toolkit-1.16.0/templates/cheat-skeleton-as/esp.as +70 -0
  23. pcx_ai_toolkit-1.16.0/templates/cheat-skeleton-as/globals.as +58 -0
  24. pcx_ai_toolkit-1.16.0/templates/cheat-skeleton-as/main.as +51 -0
  25. pcx_ai_toolkit-1.16.0/templates/cheat-skeleton-as/menu.as +83 -0
  26. pcx_ai_toolkit-1.16.0/templates/cheat-skeleton-as/offsets.as +35 -0
  27. pcx_ai_toolkit-1.16.0/templates/cheat-skeleton-as/radar.as +49 -0
  28. pcx_ai_toolkit-1.16.0/templates/cheat-skeleton-as/triggerbot.as +30 -0
  29. pcx_ai_toolkit-1.16.0/templates/cheat-skeleton-as/utils.as +89 -0
  30. pcx_ai_toolkit-1.16.0/templates/cheat-skeleton-em/README.md +32 -0
  31. pcx_ai_toolkit-1.16.0/templates/cheat-skeleton-em/aim.em +64 -0
  32. pcx_ai_toolkit-1.16.0/templates/cheat-skeleton-em/esp.em +73 -0
  33. pcx_ai_toolkit-1.16.0/templates/cheat-skeleton-em/globals.em +61 -0
  34. pcx_ai_toolkit-1.16.0/templates/cheat-skeleton-em/main.em +48 -0
  35. pcx_ai_toolkit-1.16.0/templates/cheat-skeleton-em/menu.em +80 -0
  36. pcx_ai_toolkit-1.16.0/templates/cheat-skeleton-em/offsets.em +35 -0
  37. pcx_ai_toolkit-1.16.0/templates/cheat-skeleton-em/radar.em +50 -0
  38. pcx_ai_toolkit-1.16.0/templates/cheat-skeleton-em/triggerbot.em +32 -0
  39. pcx_ai_toolkit-1.16.0/templates/cheat-skeleton-em/utils.em +90 -0
  40. pcx_ai_toolkit-1.16.0/templates/full-project/feature.em +32 -0
  41. pcx_ai_toolkit-1.16.0/templates/full-project/globals.em +19 -0
  42. pcx_ai_toolkit-1.16.0/templates/full-project/main.em +39 -0
  43. pcx_ai_toolkit-1.16.0/templates/full-project/menu.em +51 -0
  44. pcx_ai_toolkit-1.16.0/templates/full-project/offsets.em +35 -0
  45. pcx_ai_toolkit-1.16.0/templates/full-project-as/README.md +56 -0
  46. pcx_ai_toolkit-1.16.0/templates/full-project-as/feature.as +52 -0
  47. pcx_ai_toolkit-1.16.0/templates/full-project-as/globals.as +34 -0
  48. pcx_ai_toolkit-1.16.0/templates/full-project-as/main.as +78 -0
  49. pcx_ai_toolkit-1.16.0/templates/hello-world.em +22 -0
  50. pcx_ai_toolkit-1.16.0/templates/minimap.em +212 -0
  51. pcx_ai_toolkit-1.16.0/templates/overlay-basic.em +75 -0
  52. pcx_ai_toolkit-1.16.0/tests/test_api_index.py +83 -0
  53. pcx_ai_toolkit-1.16.0/tests/test_api_lookup.py +63 -0
  54. pcx_ai_toolkit-1.16.0/tests/test_check_llm_answer.py +64 -0
  55. pcx_ai_toolkit-1.16.0/tests/test_distribution.py +47 -0
  56. pcx_ai_toolkit-1.16.0/tests/test_doc_drift_json.py +28 -0
  57. pcx_ai_toolkit-1.16.0/tests/test_enma_docs_coverage.py +20 -0
  58. pcx_ai_toolkit-1.16.0/tests/test_mcp_package.py +19 -0
  59. pcx_ai_toolkit-1.16.0/tests/test_mcp_validate_code.py +155 -0
  60. pcx_ai_toolkit-1.16.0/tests/test_project_workflow.py +107 -0
  61. pcx_ai_toolkit-1.16.0/tests/test_scenarios.py +56 -0
  62. pcx_ai_toolkit-1.16.0/tests/test_symbol_check.py +200 -0
  63. pcx_ai_toolkit-1.16.0/tests/test_update_command.py +95 -0
  64. pcx_ai_toolkit-1.16.0/tools/__init__.py +1 -0
  65. pcx_ai_toolkit-1.16.0/tools/analyze-vmprotect.py +332 -0
  66. pcx_ai_toolkit-1.16.0/tools/anti-debug-scanner.py +407 -0
  67. pcx_ai_toolkit-1.16.0/tools/api-lookup.py +89 -0
  68. pcx_ai_toolkit-1.16.0/tools/as-linter.py +216 -0
  69. pcx_ai_toolkit-1.16.0/tools/binary-diff-summary.py +242 -0
  70. pcx_ai_toolkit-1.16.0/tools/build-api-index.py +381 -0
  71. pcx_ai_toolkit-1.16.0/tools/build-counts.py +136 -0
  72. pcx_ai_toolkit-1.16.0/tools/build-llms-index.py +380 -0
  73. pcx_ai_toolkit-1.16.0/tools/build-provenance.py +141 -0
  74. pcx_ai_toolkit-1.16.0/tools/check-doc-drift.py +163 -0
  75. pcx_ai_toolkit-1.16.0/tools/check-internal-links.py +34 -0
  76. pcx_ai_toolkit-1.16.0/tools/check-llm-answer.py +83 -0
  77. pcx_ai_toolkit-1.16.0/tools/check-llm-contract.py +82 -0
  78. pcx_ai_toolkit-1.16.0/tools/check-mcp-config.py +97 -0
  79. pcx_ai_toolkit-1.16.0/tools/check-skill-contract.py +96 -0
  80. pcx_ai_toolkit-1.16.0/tools/check-version-matrix.py +118 -0
  81. pcx_ai_toolkit-1.16.0/tools/dump-strings-xor.py +165 -0
  82. pcx_ai_toolkit-1.16.0/tools/dumper-to-enma.py +332 -0
  83. pcx_ai_toolkit-1.16.0/tools/evidence-log-validator.py +263 -0
  84. pcx_ai_toolkit-1.16.0/tools/hallucination-eval.py +88 -0
  85. pcx_ai_toolkit-1.16.0/tools/identify-protector.py +274 -0
  86. pcx_ai_toolkit-1.16.0/tools/lib/__init__.py +0 -0
  87. pcx_ai_toolkit-1.16.0/tools/lib/pcx_grounding.py +510 -0
  88. pcx_ai_toolkit-1.16.0/tools/lib/pcx_parser.py +446 -0
  89. pcx_ai_toolkit-1.16.0/tools/lib/pcx_paths.py +35 -0
  90. pcx_ai_toolkit-1.16.0/tools/lib/pcx_scaffold.py +275 -0
  91. pcx_ai_toolkit-1.16.0/tools/lib/pe_parse.py +142 -0
  92. pcx_ai_toolkit-1.16.0/tools/module-export-mapper.py +275 -0
  93. pcx_ai_toolkit-1.16.0/tools/offset-diff.py +230 -0
  94. pcx_ai_toolkit-1.16.0/tools/pattern-format-converter.py +205 -0
  95. pcx_ai_toolkit-1.16.0/tools/pcx.py +450 -0
  96. pcx_ai_toolkit-1.16.0/tools/pe-section-analyzer.py +171 -0
  97. pcx_ai_toolkit-1.16.0/tools/re-importer.py +241 -0
  98. pcx_ai_toolkit-1.16.0/tools/regenerate-docs.py +109 -0
  99. pcx_ai_toolkit-1.16.0/tools/resolve-api-hashes.py +290 -0
  100. pcx_ai_toolkit-1.16.0/tools/script-linter.py +349 -0
  101. pcx_ai_toolkit-1.16.0/tools/setup-core.py +209 -0
  102. pcx_ai_toolkit-1.16.0/tools/sig-uniqueness-checker.py +289 -0
  103. pcx_ai_toolkit-1.16.0/tools/symbol-check.py +141 -0
  104. pcx_ai_toolkit-1.16.0/tools/update-toolkit.ps1 +240 -0
  105. pcx_ai_toolkit-1.16.0/tools/update-toolkit.sh +233 -0
  106. pcx_ai_toolkit-1.16.0/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,463 @@
1
+ Metadata-Version: 2.4
2
+ Name: pcx-ai-toolkit
3
+ Version: 1.16.0
4
+ Summary: Source-grounded Enma and AngelScript toolkit for Perception.cx
5
+ License-Expression: MIT
6
+ Project-URL: Homepage, https://github.com/VoidChecksum/pcx-ai-toolkit
7
+ Project-URL: Issues, https://github.com/VoidChecksum/pcx-ai-toolkit/issues
8
+ Requires-Python: >=3.10
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE
11
+ Dynamic: license-file
12
+
13
+ <div align="center">
14
+
15
+ <img src="assets/perception-banner.png" alt="Perception.cx" width="760">
16
+
17
+ # pcx-ai-toolkit
18
+
19
+ ### The Source-Grounded AI Toolkit for Perception.cx Enma + AngelScript
20
+
21
+ [![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)
22
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
23
+ [![Scope](https://img.shields.io/badge/Scope-Enma%20%2B%20AngelScript-f97316.svg)](#language-scope)
24
+ [![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)
25
+ [![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)
26
+ [![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)
27
+ [![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)
28
+ [![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)
29
+
30
+ **Make LLMs write Perception.cx code from verified Enma and AngelScript sources, not guessed APIs.**
31
+
32
+ `llms.txt` context packs | source-backed API oracle | MCP tools | validators | native Rust RE tools | templates | AI skills | VS Code and Visual Studio packages
33
+
34
+ [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)
35
+
36
+ </div>
37
+
38
+ ---
39
+ ## First Decision
40
+
41
+ ```text
42
+ Writing Enma? Load docs/llms-perception-enma.md, then run pcx symbol-check.
43
+ Writing AngelScript? Load docs/llms-perception-angelscript.md, then run pcx verify.
44
+ Need API proof? Run pcx api <symbol> --lang enma|angelscript.
45
+ Need MCP context? Run pcx-rs mcp, pcx-rs mcp-schema --json, or pcx-knowledge-mcp.
46
+ Need RE artifacts? Use re-importer.py exporters; keep evidence before shipping.
47
+ ```
48
+
49
+ Unsupported or hallucinated surfaces live in [`knowledge/unsupported-symbols.json`](knowledge/unsupported-symbols.json) and are rejected by validators when seen.
50
+
51
+ <table>
52
+ <tr>
53
+ <td width="50%">
54
+
55
+ ## What This Is
56
+
57
+ `pcx-ai-toolkit` is an AI-facing knowledge and validation layer for Perception.cx scripting.
58
+
59
+ 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.
60
+
61
+ </td>
62
+ <td width="50%">
63
+
64
+ ## What This Is Not
65
+
66
+ This is not a generic cheat dump, offset pack, malware toolkit, or unsupported language bundle.
67
+
68
+ 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.
69
+
70
+ </td>
71
+ </tr>
72
+ </table>
73
+
74
+ ## AI Start Here
75
+
76
+ Load this sequence before writing any Perception code:
77
+
78
+ ```text
79
+ 1. docs/AI_AGENT_OPERATING_MANUAL.md
80
+ 2. docs/perception/llm-routing.md
81
+ 3. Choose Enma (.em) or AngelScript (.as)
82
+ 4. Load the matching llms-perception-* context pack
83
+ 5. Verify every API or language add-on symbol with pcx api or MCP api_lookup
84
+ 6. Validate code with pcx symbol-check, pcx verify, or MCP validate_answer
85
+ ```
86
+
87
+ | Must Load | Purpose |
88
+ |---|---|
89
+ | [docs/AI_AGENT_OPERATING_MANUAL.md](docs/AI_AGENT_OPERATING_MANUAL.md) | Minimal safe workflow for LLM and MCP agents |
90
+ | [docs/perception/llm-routing.md](docs/perception/llm-routing.md) | Binding split between Enma and AngelScript |
91
+ | [docs/llms-perception-enma.md](docs/llms-perception-enma.md) | Single-file Enma + PCX context pack |
92
+ | [docs/llms-perception-angelscript.md](docs/llms-perception-angelscript.md) | Single-file AngelScript + PCX context pack |
93
+ | [knowledge/pcx-api-index.json](knowledge/pcx-api-index.json) | Machine-readable oracle for PCX host APIs and language add-ons |
94
+ | [knowledge/perception-forum-insights.md](knowledge/perception-forum-insights.md) | Secondary forum/changelog context, never an API contract |
95
+
96
+ Recommended model instruction:
97
+
98
+ ```text
99
+ Before writing Perception code, load docs/AI_AGENT_OPERATING_MANUAL.md and docs/perception/llm-routing.md.
100
+ Use Enma docs for .em files and AngelScript docs for .as files.
101
+ Verify every Perception host API and language/add-on symbol with pcx api or MCP api_lookup.
102
+ Validate final code or Markdown answers before returning them.
103
+ If the docs/API index do not prove a symbol exists, say so instead of guessing.
104
+ ```
105
+
106
+ ## Language Scope
107
+
108
+ The toolkit is intentionally scoped to **Perception-supported Enma and AngelScript**.
109
+
110
+ | Contract | Enma `.em` | AngelScript `.as` |
111
+ |---|---|---|
112
+ | Entry point | `int64 main()` | `int main()` |
113
+ | Repeating work | `register_routine(cast<int64>(fn), data)` | `register_callback(fn, interval, data)` |
114
+ | Callback shape | `void fn(int64 data)` | `void fn(int id, int data_index)` |
115
+ | Logging | `println(...)` | `log(...)` |
116
+ | Process handle | `proc_t` value, RAII | `proc_t@` handle, explicit cleanup patterns |
117
+ | Containers | `T[]`, `map<K,V>` | `array<T>`, `dictionary` |
118
+ | Render positions | `vec2(...)` values | Raw parameters unless the AS page says otherwise |
119
+ | Render colors | `color(r,g,b,a)` values | Integer RGBA parameters unless the AS page says otherwise |
120
+
121
+ If code crosses this table without source proof, treat it as wrong.
122
+
123
+ ## Quick Start
124
+
125
+ PyPI:
126
+
127
+ ```bash
128
+ python -m pip install pcx-ai-toolkit
129
+ pcx doctor
130
+ ```
131
+
132
+ npm / Bun:
133
+
134
+ ```bash
135
+ npm install -g pcx-ai-toolkit
136
+ # or
137
+ bun add -g pcx-ai-toolkit
138
+ pcx doctor
139
+ ```
140
+
141
+ Source checkout:
142
+
143
+ ```bash
144
+ git clone --recursive https://github.com/VoidChecksum/pcx-ai-toolkit.git
145
+ cd pcx-ai-toolkit
146
+ ./setup.sh
147
+ ```
148
+
149
+ Windows PowerShell:
150
+
151
+ ```powershell
152
+ git clone --recursive https://github.com/VoidChecksum/pcx-ai-toolkit.git
153
+ cd pcx-ai-toolkit
154
+ powershell -ExecutionPolicy Bypass -File setup.ps1
155
+ ```
156
+
157
+ Requirements: Git, Python 3.10+, Node.js 18+. Git submodules are required for LSP and `.vsix` packaging.
158
+
159
+ ## Anti-Hallucination Pipeline
160
+
161
+ Use these checks before trusting generated code:
162
+
163
+ ```bash
164
+ # Exact source-backed lookup.
165
+ pcx api draw_text --lang enma
166
+ pcx api register_callback --lang angelscript
167
+ pcx api json_object --lang enma
168
+
169
+ # Script validation.
170
+ pcx symbol-check my_script.em
171
+ pcx verify my_script.as
172
+ pcx verify-project ./my-project
173
+
174
+ # Markdown answer validation.
175
+ pcx check-answer answer.md
176
+
177
+ # Regression benchmark for hallucinated answers/snippets.
178
+ python3 tools/hallucination-eval.py
179
+ ```
180
+
181
+ MCP-aware clients should use this sequence:
182
+
183
+ ```text
184
+ overview()
185
+ recommend_context(task, language)
186
+ generate_script_plan(task, language)
187
+ scaffold_project(..., dry_run=true)
188
+ get_skill(name)
189
+ get_file(path)
190
+ api_lookup(symbol, language)
191
+ validate_code(code, language)
192
+ validate_answer(markdown)
193
+ validate_project(path)
194
+ ```
195
+
196
+ | Failure Mode | Countermeasure |
197
+ |---|---|
198
+ | Invented API names like `draw_esp()` | `pcx api`, MCP `api_lookup`, and `knowledge/pcx-api-index.json` |
199
+ | Enma lifecycle inside `.as` | `docs/perception/llm-routing.md`, symbol validation, wrong-language detection |
200
+ | Missing Enma imports | `validate_code` missing-import findings for `vec`, `color`, `math`, `json`, and more |
201
+ | Enma semantic traps | Rust `symbol-check` flags integer-keyed `map<K,V>`, escaping `return &local`, and missing `PERM_FILE` for file APIs |
202
+ | Stale docs | provenance, drift checks, `tools/regenerate-docs.py`, regenerated `llms-*` bundles |
203
+ | Forum facts treated as APIs | `knowledge/perception-forum-insights.md` is marked secondary |
204
+ | Regressed validators | `tools/hallucination-eval.py` golden corpus |
205
+
206
+ ## Knowledge Surface
207
+
208
+ | Docs | Doc Lines | API Docs Indexed | API Functions | API Methods | Skills | Templates | MCP Tools | Native Tools |
209
+ |---:|---:|---:|---:|---:|---:|---:|---:|---:|
210
+ | 124 | 32,186 | 39 | 836 | 333 | 25 | 30 | 59 | 13 |
211
+
212
+ | Surface | Path | Best For |
213
+ |---|---|---|
214
+ | LLM entry index | [docs/llms.txt](docs/llms.txt) | Auto-fetch tools and first-touch sessions |
215
+ | Full context pack | [docs/llms-full.txt](docs/llms-full.txt) | One preload for both supported languages |
216
+ | Enma context pack | [docs/llms-perception-enma.md](docs/llms-perception-enma.md) | Enma-only work |
217
+ | AngelScript context pack | [docs/llms-perception-angelscript.md](docs/llms-perception-angelscript.md) | AngelScript-only work |
218
+ | Skills bundle | [docs/llms-skills.md](docs/llms-skills.md) | Agent behavior and workflow rules |
219
+ | Knowledge bundle | [docs/llms-knowledge.md](docs/llms-knowledge.md) | Patterns, forum-derived context, RE references |
220
+ | API oracle | [knowledge/pcx-api-index.json](knowledge/pcx-api-index.json) | Exact signatures with source URLs |
221
+ | Dynamic MCP | [mcp/pcx-knowledge-mcp](mcp/pcx-knowledge-mcp) | Long sessions, lazy loading, validation |
222
+
223
+ High-value files:
224
+
225
+ | File | Use |
226
+ |---|---|
227
+ | [knowledge/pcx-api-cheatsheet.md](knowledge/pcx-api-cheatsheet.md) | PCX APIs at a glance |
228
+ | [knowledge/common-patterns.md](knowledge/common-patterns.md) | Working Enma patterns |
229
+ | [knowledge/custom-draw-patterns.md](knowledge/custom-draw-patterns.md) | GPU/custom draw examples |
230
+ | [knowledge/pcx-version-matrix.md](knowledge/pcx-version-matrix.md) | Version and changelog availability matrix |
231
+ | [knowledge/perception-forum-insights.md](knowledge/perception-forum-insights.md) | Forum-derived Enma rollout, overlay, IDE, analyzer, changelog context |
232
+
233
+ Regenerate and verify generated knowledge:
234
+
235
+ ```bash
236
+ python3 tools/build-counts.py
237
+ python3 tools/build-api-index.py
238
+ python3 tools/build-llms-index.py
239
+ python3 tools/build-provenance.py
240
+ python3 tools/regenerate-docs.py --check
241
+ python3 tools/check-llm-contract.py
242
+ python3 tools/check-skill-contract.py
243
+ ```
244
+
245
+ ## PCX CLI
246
+
247
+ ```bash
248
+ pcx setup
249
+ pcx update
250
+ pcx doctor
251
+ pcx api draw_text --lang enma
252
+ pcx symbol-check file.em
253
+ pcx verify file.as
254
+ pcx check-answer answer.md
255
+ pcx create --wizard
256
+ pcx create --name "My ESP" --language enma --kind full --target game.exe --output ./my-esp
257
+ pcx verify-project ./my-esp --allow-placeholders --allow-unverified
258
+ ```
259
+
260
+ | Tool | Purpose |
261
+ |---|---|
262
+ | [tools/api-lookup.py](tools/api-lookup.py) | Exact API oracle |
263
+ | [tools/symbol-check.py](tools/symbol-check.py) | Script-level source-grounded validation |
264
+ | [tools/as-linter.py](tools/as-linter.py) | AngelScript PCX discipline linting |
265
+ | [tools/verify-project.py](tools/verify-project.py) | Project-wide lint, symbol, hygiene, and evidence verification |
266
+ | [tools/check-llm-answer.py](tools/check-llm-answer.py) | Markdown answer code-block validation |
267
+ | [tools/hallucination-eval.py](tools/hallucination-eval.py) | Golden regression benchmark for hallucination gates |
268
+ | [tools/build-api-index.py](tools/build-api-index.py) | Rebuild source-backed API index |
269
+ | [tools/check-doc-drift.py](tools/check-doc-drift.py) | Compare local docs against upstream |
270
+ | [tools/regenerate-docs.py](tools/regenerate-docs.py) | Fetch drift-checkable upstream Markdown into `docs/` |
271
+ | [tools/re-importer.py](tools/re-importer.py) | Convert IDA/Ghidra/Binja/ReClass exports into PCX offset/evidence seeds |
272
+ | [tools/anti-debug-scanner.py](tools/anti-debug-scanner.py) | Native-backed anti-debug import, byte-pattern, and string scanner |
273
+ | [tools/identify-protector.py](tools/identify-protector.py) | Native-backed protector, packer, overlay, and anti-debug indicator scan |
274
+ | [tools/pe-section-analyzer.py](tools/pe-section-analyzer.py) | Native-backed section entropy, flag, overlay, and anomaly report |
275
+ | [tools/analyze-vmprotect.py](tools/analyze-vmprotect.py) | Native-backed VMProtect section, VM-entry, and workflow analyzer |
276
+ | [tools/dump-strings-xor.py](tools/dump-strings-xor.py) | Native-backed single-byte XOR string extraction |
277
+ | [tools/module-export-mapper.py](tools/module-export-mapper.py) | Native-backed export listing and named consumer cross-reference |
278
+ | [tools/sig-uniqueness-checker.py](tools/sig-uniqueness-checker.py) | Validate byte signatures; proxies to native Rust when built |
279
+ | [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 |
280
+ | [tools/offset-diff.py](tools/offset-diff.py) | Diff named direct/RIP signatures across binary versions; proxies to native Rust when built |
281
+ | [tools/check-skill-contract.py](tools/check-skill-contract.py) | Reject stale or unsupported AI-skill contracts |
282
+ | [tools/check-mcp-config.py](tools/check-mcp-config.py) | Keep runtime MCP config aligned with docs |
283
+
284
+ ## Native RE Tools
285
+
286
+ 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.
287
+
288
+ ```bash
289
+ cargo build --release --manifest-path tools/pe-parser/Cargo.toml
290
+ mkdir -p tools/bin
291
+ for tool in pe-parser anti-debug-scanner identify-protector pe-section-analyzer \
292
+ pcx-rs api-lookup pattern-format-converter analyze-vmprotect \
293
+ dump-strings-xor module-export-mapper \
294
+ sig-uniqueness-checker binary-diff-summary offset-diff; do
295
+ cp "tools/pe-parser/target/release/$tool" "tools/bin/$tool"
296
+ done
297
+ ```
298
+
299
+ | Native binary | Wrapper | Use |
300
+ |---|---|---|
301
+ | `pcx-rs` | [tools/pcx](tools/pcx) | Rust-first manager command layer and native command router |
302
+ | `api-lookup` | [tools/api-lookup.py](tools/api-lookup.py) | Source-backed Enma and AngelScript API lookup |
303
+ | `pattern-format-converter` | [tools/pattern-format-converter.py](tools/pattern-format-converter.py) | Pattern conversion across IDA, Ghidra, x64dbg, CE, Enma, and mask formats |
304
+ | `pe-parser` | [tools/lib/pe_parse.py](tools/lib/pe_parse.py) | PE/ELF/Mach-O metadata extraction for all RE tools |
305
+ | `anti-debug-scanner` | [tools/anti-debug-scanner.py](tools/anti-debug-scanner.py) | Anti-debug imports, byte patterns, timing, context, and debugger-string scan |
306
+ | `identify-protector` | [tools/identify-protector.py](tools/identify-protector.py) | Protector and packer heuristics from sections, imports, stubs, and overlays |
307
+ | `pe-section-analyzer` | [tools/pe-section-analyzer.py](tools/pe-section-analyzer.py) | Entropy, flags, overlay, and section anomaly analysis |
308
+ | `analyze-vmprotect` | [tools/analyze-vmprotect.py](tools/analyze-vmprotect.py) | VMProtect-specific section, entry-stub, and tooling recommendations |
309
+ | `dump-strings-xor` | [tools/dump-strings-xor.py](tools/dump-strings-xor.py) | XOR-hidden string extraction across selected sections |
310
+ | `module-export-mapper` | [tools/module-export-mapper.py](tools/module-export-mapper.py) | Export table mapping and named import consumer cross-reference |
311
+ | `sig-uniqueness-checker` | [tools/sig-uniqueness-checker.py](tools/sig-uniqueness-checker.py) | Unique/stale/ambiguous signature verdicts with near-miss support |
312
+ | `binary-diff-summary` | [tools/binary-diff-summary.py](tools/binary-diff-summary.py) | Fast patch-day section survival summary |
313
+ | `offset-diff` | [tools/offset-diff.py](tools/offset-diff.py) | Direct and RIP-relative offset movement report |
314
+
315
+ 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.
316
+
317
+ ## Gap Analysis And Feature Improvements
318
+
319
+ 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:
320
+
321
+ | Gap | Why It Matters | Improvement |
322
+ |---|---|---|
323
+ | 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 |
324
+ | 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 |
325
+ | 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 |
326
+ | 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 |
327
+ | 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 |
328
+ | 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 |
329
+ | 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 |
330
+
331
+ ## AI Agent Stack
332
+
333
+ | Layer | Files |
334
+ |---|---|
335
+ | Global rules | [.clinerules](.clinerules), [.cursorrules](.cursorrules), [.windsurfrules](.windsurfrules), [.github/copilot-instructions.md](.github/copilot-instructions.md) |
336
+ | Drop-in rules | [rules/](rules/) |
337
+ | Claude skills | [.claude/skills/](.claude/skills/) |
338
+ | Agent manual | [docs/AI_AGENT_OPERATING_MANUAL.md](docs/AI_AGENT_OPERATING_MANUAL.md) |
339
+ | Routing contract | [docs/perception/llm-routing.md](docs/perception/llm-routing.md) |
340
+ | Knowledge MCP | [mcp/pcx-knowledge-mcp/](mcp/pcx-knowledge-mcp/) |
341
+
342
+ Core skills:
343
+
344
+ | Skill | Use |
345
+ |---|---|
346
+ | `pcx-enma-discipline` | Enma syntax, lifecycle, imports, and binding discipline |
347
+ | `pcx-angelscript-discipline` | AngelScript lifecycle and PCX binding discipline |
348
+ | `game-cheat-script-master` | End-to-end script architecture patterns |
349
+ | `game-cheat-guidelines` | Behavioral guardrails and anti-hallucination rules |
350
+ | `pcx-knowledge-index` | Which docs and knowledge files to load |
351
+ | `mcp-tool-routing` | When and how to call MCP tools |
352
+
353
+ ## MCP Integration
354
+
355
+ | MCP Surface | Purpose |
356
+ |---|---|
357
+ | [mcp/pcx-knowledge-mcp](mcp/pcx-knowledge-mcp) | Searchable corpus, API lookup, project scaffolding, code/project validation, answer validation |
358
+ | [mcp/perception-mcp-config.json](mcp/perception-mcp-config.json) | Runtime Perception MCP config with 59 live-process tools |
359
+
360
+ Install the knowledge server:
361
+
362
+ ```bash
363
+ pip install -e mcp/pcx-knowledge-mcp/
364
+ pcx-knowledge-mcp --help
365
+ ```
366
+
367
+ Client setup:
368
+
369
+ | Client | Guide |
370
+ |---|---|
371
+ | Claude Code | [mcp/claude-code-setup.md](mcp/claude-code-setup.md) |
372
+ | Cursor | [mcp/cursor-setup.md](mcp/cursor-setup.md) |
373
+ | Cline | [mcp/pcx-knowledge-mcp/README.md](mcp/pcx-knowledge-mcp/README.md) |
374
+ | Continue | [mcp/continue-setup.md](mcp/continue-setup.md) |
375
+ | Zed | [mcp/zed-setup.md](mcp/zed-setup.md) |
376
+ | Aider | [mcp/aider-setup.md](mcp/aider-setup.md) |
377
+
378
+ ## Editor and VSIX Packages
379
+
380
+ Prebuilt VS Code extension packages are stored in the LSP submodules:
381
+
382
+ | Package | Path | Language |
383
+ |---|---|---|
384
+ | Enma Language | `lsp/enma-lsp/enma-language-1.1.22.vsix` | `.em`, `.em.predefined`, `.emb` |
385
+ | AngelScript for Perception | `lsp/angel-lsp-pcx/angel-lsp-0.4.1.vsix` | `.as`, `.as.predefined` |
386
+
387
+ Build locally:
388
+
389
+ ```bash
390
+ ./tools/package-vsix.sh
391
+ ```
392
+
393
+ Manual packaging:
394
+
395
+ ```bash
396
+ cd lsp/enma-lsp
397
+ npm install
398
+ npm run compile
399
+ npm run package
400
+
401
+ cd ../angel-lsp-pcx
402
+ npm install
403
+ npm run compile
404
+ npx vsce package
405
+ ```
406
+
407
+ Visual Studio packages live under [visualstudio/](visualstudio/). They require Windows, MSBuild, and the Visual Studio extension development workload.
408
+
409
+ ```powershell
410
+ msbuild visualstudio\EnmaVS\EnmaVS.csproj /p:Configuration=Release /restore
411
+ msbuild visualstudio\AngelScriptVS\AngelScriptVS.csproj /p:Configuration=Release /restore
412
+ ```
413
+
414
+ ## Templates
415
+
416
+ | Template | Language | Use |
417
+ |---|---|---|
418
+ | `hello-world` | Enma | Minimal lifecycle sanity check |
419
+ | `cheat-skeleton-em` | Enma | Modular ESP, aim, menu, radar, triggerbot scaffold |
420
+ | `cheat-skeleton-as` | AngelScript | Equivalent AS scaffold |
421
+ | `full-project` | Enma | Multi-file Enma project layout |
422
+ | `full-project-as` | AngelScript | Multi-file AS project layout |
423
+ | `overlay-basic`, `minimap`, `aimbot-skeleton` | Enma | Focused examples |
424
+
425
+ Create one:
426
+
427
+ ```bash
428
+ pcx create --wizard
429
+ pcx create --name "PCX Enma Script" --language enma --kind cheat --target game.exe --output ./pcx-enma-script
430
+ pcx create --name "PCX AS Script" --language angelscript --kind cheat --target game.exe --output ./pcx-as-script
431
+ pcx verify-project ./pcx-enma-script --allow-placeholders --allow-unverified
432
+ ```
433
+
434
+ ## Repository Map
435
+
436
+ ```text
437
+ pcx-ai-toolkit/
438
+ ├── docs/ Generated LLM bundles + local docs mirror
439
+ ├── docs/perception/ Perception Enma and AngelScript API docs
440
+ ├── docs/enma/ Enma language and SDK references
441
+ ├── docs/angelscript-lang/ AngelScript core language manual
442
+ ├── knowledge/ API index, patterns, forum insights, RE references
443
+ ├── templates/ Enma and AngelScript scaffolds
444
+ ├── tools/ CLI, validators, builders, RE helpers
445
+ ├── tools/pe-parser/ Rust-native parser, signature, diff, and offset tools
446
+ ├── evals/ Hallucination regression corpus
447
+ ├── signatures/ Engine and protector reversal signature packs
448
+ ├── mcp/ Knowledge MCP and Perception MCP setup
449
+ ├── rules/ Drop-in agent instruction files
450
+ ├── .claude/skills/ Agent skills for PCX work
451
+ ├── lsp/ Enma and AngelScript VS Code extension submodules
452
+ └── visualstudio/ Visual Studio 2022 extension projects
453
+ ```
454
+
455
+ ## Safety and Scope
456
+
457
+ 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.
458
+
459
+ 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).
460
+
461
+ ## License
462
+
463
+ MIT. See [LICENSE](LICENSE).