@aeonsparx/pi-unreal 1.0.0 → 1.1.0

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.
@@ -53,6 +53,12 @@ export interface UbtModuleRefs {
53
53
  shortName: string;
54
54
  moduleDirectory: string;
55
55
  intermediateDirectory: string;
56
+ /**
57
+ * `Type` from the Query JSON when present (TargetModuleReferences in some engine versions carries
58
+ * it; the .uplugin/.Build.cs value is the fallback source). `unreal_context` prints it because
59
+ * 'Runtime' vs 'Editor' vs 'External' is what tells you whether a game target can link the module.
60
+ */
61
+ type: string;
56
62
  public: string[];
57
63
  private: string[];
58
64
  publicInclude: string[];
@@ -348,6 +354,7 @@ export function parseModuleReferences(json: unknown): Map<string, UbtModuleRefs>
348
354
  shortName: typeof value.shortName === "string" ? value.shortName : "",
349
355
  moduleDirectory: normalizePath((value.moduleDirectory as string) ?? ""),
350
356
  intermediateDirectory: normalizePath((value.intermediateDirectory as string) ?? ""),
357
+ type: typeof value.Type === "string" ? (value.Type as string) : typeof value.type === "string" ? (value.type as string) : "",
351
358
  public: asStrings(value.public),
352
359
  private: asStrings(value.private),
353
360
  publicInclude: asStrings(value.publicInclude),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeonsparx/pi-unreal",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Read-only Pi extension that resolves Unreal Engine associations and project/plugin descriptors from engine-authored schemas instead of guesswork.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -20,6 +20,7 @@
20
20
  "prompts",
21
21
  "docs",
22
22
  "README.md",
23
+ "CHANGELOG.md",
23
24
  "LICENSE"
24
25
  ],
25
26
  "keywords": [
@@ -15,6 +15,16 @@ Before any edit, build, or engine-version claim, establish the facts with the Un
15
15
  each one resolves (Engine / Project / Mod / External), JSONC diagnostics, `TargetPlatforms`,
16
16
  `AdditionalPluginDirectories`.
17
17
  3. For a plugin-centric task, `unreal_plugin_inspect` on the plugin name or `.uplugin` path.
18
+ 4. Before writing or editing C++ that names engine types, ground the names — do not type an
19
+ include from memory:
20
+ - `unreal_index` with `action: "headers"` and `name: "ThatHeader.h"` answers *does this file
21
+ exist in this engine version*, with the owning plugin, its `EnabledByDefault`, and whether the
22
+ `.uproject` references it. An invented name must be caught here, not written into an `#include`.
23
+ - `unreal_symbol` with `scope: "engine"` (add `engineAreas: ["Plugins"]` for plugins the project
24
+ does not reference) confirms the type and its module. A 0 answer names the roots it scanned —
25
+ it is not "the engine has no such type".
26
+ - `unreal_context` with `module: "X"` says whether X is in the target's module graph, which tells
27
+ you whether a `*.Build.cs` needs the dependency at all.
18
28
 
19
29
  Then state the constraints that follow from those facts:
20
30
 
@@ -67,23 +67,56 @@ shadowing earlier ones on name collision. Use the reported status (`resolved`, `
67
67
  `disabled`, `version-warning`, `shadowed`, `no-modules`) instead of assuming a plugin is
68
68
  available. `Binaries/`, `Intermediate/`, `Saved/`, and `ThirdParty/` are never scanned.
69
69
 
70
+ Two facts are separate and both matter, and the report keeps them apart:
71
+
72
+ - **Reference status**: `Mover: resolved ← Engine · modules Mover(Runtime), MoverCVDData(Runtime),
73
+ MoverEditor(UncookedOnly)`. The modules are what the reference buys; "resolved" alone never said
74
+ which C++ exists.
75
+ - **Availability without a reference**: engine plugins with `EnabledByDefault: true` load even when
76
+ the `.uproject` does not list them, and a module can be inside the target's link graph without the
77
+ plugin being referenced. `unreal_context` with `module: "PhysicsControl"` reports the graph check,
78
+ the module directory, the declared `Type`, and the `.uproject` status as separate lines — "the
79
+ project lacks plugin X" is not "module X is unavailable", and not "X does not exist".
80
+
70
81
  ## After resolution: where declarations and build context come from
71
82
 
72
83
  `unreal_resolve_engine` answers *which engine*. The rest of the navigation questions are answered
73
84
  by the index tools, and they use the resolved root — a wrong engine root means a wrong index:
74
85
 
75
86
  - `unreal_symbol` — declaration site + owning module for a type, function, `UPROPERTY`, delegate.
76
- Engine scope is opt-in (`scope: "engine"`) and its areas come from
77
- `PublicDependencyModuleNames` in the modules under `Engine/Source/<area>`, so the scan follows
78
- what the project actually depends on.
87
+ Engine scope is opt-in (`scope: "engine"`). Its roots are `Engine/Source/<area>` **plus the plugin
88
+ roots the `.uproject` enables** — in an installed engine most gameplay types ship as plugins
89
+ (`Mover`, `PoseSearch`, `SmartObjects`, `BlendStack`, `StateTree`, `GameplayAbilities`), so an
90
+ index of `Engine/Source/Runtime` alone reports 0 rows for `UMoverComponent`. Plugins the project
91
+ does not reference are opt-in too: `engineAreas: ["Plugins"]` (every `Engine/Plugins` source,
92
+ ~2.8× the `Runtime` scan) or `engineAreas: ["Plugins/Animation/PhysicsControl"]` (one plugin).
93
+ - **A 0-row answer is about the roots scanned, not about the engine.** It prints the index keys, the
94
+ root kinds (`279 engine-source root(s), 62 engine-plugin root(s)`) and the next call. Run
95
+ `unreal_index` with `action: "status"` before trusting a 0: an index key encodes its root set, so
96
+ an index you did not build is not what was searched.
97
+ - `unreal_index` with `action: "headers"` — "does this header exist in this engine version?" A
98
+ path-only index (no content read, seconds, ~38 000 header paths on a UE 5.8 install): exact path,
99
+ owning module, owning plugin, `EnabledByDefault`, `.uproject` reference. Invented names return
100
+ *not a file path* plus the closest real **file** names — a file name is not a type, and a token
101
+ match is not proof of existence. Never built implicitly.
79
102
  - `unreal_context` — include paths, C++ standard, compiler, the real `WITH_*` defines read from
80
- `Definitions.<Module>.h`, and the module's public/private dependency lists.
103
+ `Definitions.<Module>.h`, and the module's public/private dependency lists. Scope is derived from
104
+ path shape, so `Engine/Plugins/.../Public/X.h` is searched as engine scope, and a miss answers the
105
+ path question separately from the symbol question.
81
106
  - `unreal_index` — build/refresh/patch/status, `moduleRefs` for the dependency graph, and the
82
107
  UnrealBuildTool `-Mode=Query` cache underneath.
83
108
 
84
109
  No compiler, no IDE database, nothing written inside the project: the index lives in
85
110
  `~/.pi/agent/unreal-cache` (`$PI_UNREAL_CACHE_DIR`). clangd stays the authority for references,
86
- overrides, and diagnostics — see `ue-symbol-navigation` in a UE project's `.agents/skills/`.
111
+ overrides, and diagnostics — see `ue-symbol-navigation` in a UE project's `.agents/skills/`. An
112
+ empty clangd answer is **evidence**: on an installed engine the compile database has no engine
113
+ translation units, so "clangd found nothing in engine code" describes the setup, not a defect to
114
+ route around.
115
+
116
+ The boundary this package does not cross: it answers C++ **declaration, module, include-path and
117
+ dependency** facts. Asset questions — UENUM index order, UStruct field types, UCLASS/CDO instance
118
+ values, component lists, parent chains, Blueprint graphs — need the `unreal-engine` editor MCP with
119
+ the editor running. A C++ scan cannot see them; ask a scan only what a scan can answer.
87
120
 
88
121
  ## Conventions this package enforces
89
122