blueprint-extractor-mcp 8.2.4 → 8.2.5
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
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
|
|
20
20
|
Blueprint Extractor MCP is a [Model Context Protocol](https://modelcontextprotocol.io) server that bridges AI coding assistants (Claude Code, Codex, OpenCode, etc.) to a running Unreal Editor instance via the Remote Control HTTP API.
|
|
21
21
|
|
|
22
|
+
For compatible tools, the server can also execute through a commandlet lane when no reachable editor session is available. When an editor is already running, editor execution stays preferred for editor-only flows and for save paths that need to avoid package-lock contention.
|
|
23
|
+
|
|
22
24
|
```
|
|
23
25
|
AI Assistant stdio MCP Server HTTP :30010 Unreal Editor
|
|
24
26
|
───────────── ◄────────────► ───────────────── ◄──────────────────► ─────────────────
|
|
@@ -116,11 +118,11 @@ npm install --prefix ~/.config/opencode --save-exact blueprint-extractor-mcp@lat
|
|
|
116
118
|
|
|
117
119
|
## Tool Surface
|
|
118
120
|
|
|
119
|
-
Use `activate_tool_profile` to switch between the compact `default` surface and the full `expert` surface. The default profile keeps the context window lean and loads specialized families on demand via `activate_workflow_scope`.
|
|
121
|
+
Use `activate_tool_profile` to switch between the compact `default` surface and the full `expert` surface. The default profile keeps the context window lean with a retrieval-first core and loads specialized families on demand via `activate_workflow_scope`.
|
|
120
122
|
|
|
121
123
|
| Scope | What It Unlocks |
|
|
122
124
|
|:------|:----------------|
|
|
123
|
-
| **Core** *(always on in `default` profile)* |
|
|
125
|
+
| **Core** *(always on in `default` profile)* | Retrieval-first discovery and persistence: `search_assets`, `find_and_extract`, `extract_blueprint`, `extract_asset`, `check_asset_exists`, `save_assets`, `get_tool_help`, `activate_tool_profile`, and `activate_workflow_scope` |
|
|
124
126
|
| `widget_authoring` | Parent scope that loads `widget_authoring_structure`, `widget_authoring_visual`, and `widget_verification` together |
|
|
125
127
|
| `widget_authoring_structure` | Recipe-first widget authoring, tree replacement, unified-diff patching, and focused structure edits without the deprecated widget aliases |
|
|
126
128
|
| `widget_authoring_visual` | Widget compile flows, CommonUI styles, widget animations, and widget preview capture |
|
|
@@ -146,6 +148,7 @@ The tool contract is optimized for model reliability:
|
|
|
146
148
|
- **`structuredContent`** carries the canonical success and error payload for MCP clients that consume structured results directly
|
|
147
149
|
- **Structured error envelopes** with diagnostic codes and recovery hints
|
|
148
150
|
- **Explicit-save semantics** — nothing persists until `save_assets` is called
|
|
151
|
+
- **Dual execution lanes** — compatible tools can fall back to commandlet execution when no editor is reachable, while `save_assets` prefers a running editor and can reroute there on file-lock contention
|
|
149
152
|
- **Next-step hints** guiding the assistant toward the logical follow-up action
|
|
150
153
|
|
|
151
154
|
See [../docs/CURRENT_STATUS.md](../docs/CURRENT_STATUS.md) for the current validation snapshot, normative docs, and the one-shot stabilization ledger.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { access } from 'node:fs/promises';
|
|
2
2
|
import { constants as fsConstants } from 'node:fs';
|
|
3
3
|
import path, { posix as posixPath, win32 as win32Path } from 'node:path';
|
|
4
|
-
import { buildEngineAssociationCandidates, isWindowsStylePath, isWslMountedWindowsPath, readProjectEngineAssociation, toHostFilesystemPath, toWindowsStylePath, } from './workspace-project.js';
|
|
4
|
+
import { buildEngineAssociationCandidates, filesystemPathsEqual, isWindowsStylePath, isWslMountedWindowsPath, readProjectEngineAssociation, toHostFilesystemPath, toWindowsStylePath, } from './workspace-project.js';
|
|
5
5
|
export function rememberExternalBuild(result) {
|
|
6
6
|
return {
|
|
7
7
|
success: result.success === true,
|
|
@@ -114,6 +114,32 @@ async function probePreferredEngineRoot(candidates, hostPlatform) {
|
|
|
114
114
|
}
|
|
115
115
|
return undefined;
|
|
116
116
|
}
|
|
117
|
+
function hasConcreteAssociationCandidate(candidates) {
|
|
118
|
+
return candidates.some((candidate) => (isWindowsStylePath(candidate.path)
|
|
119
|
+
|| isWslMountedWindowsPath(candidate.path)
|
|
120
|
+
|| candidate.path.startsWith('/')));
|
|
121
|
+
}
|
|
122
|
+
function matchesAssociationCandidate(engineRoot, candidates) {
|
|
123
|
+
if (!engineRoot) {
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
return candidates.some((candidate) => filesystemPathsEqual(engineRoot, candidate.path));
|
|
127
|
+
}
|
|
128
|
+
function buildEngineRootConflict(engineAssociation, candidates, implicitRoots) {
|
|
129
|
+
if (!engineAssociation || implicitRoots.length === 0) {
|
|
130
|
+
return undefined;
|
|
131
|
+
}
|
|
132
|
+
const roots = implicitRoots.map(({ source, path }) => `${source}:${path}`).join(', ');
|
|
133
|
+
const concreteCandidates = candidates
|
|
134
|
+
.map((candidate) => candidate.path)
|
|
135
|
+
.filter((candidate, index, all) => all.indexOf(candidate) === index)
|
|
136
|
+
.filter((candidate) => (isWindowsStylePath(candidate)
|
|
137
|
+
|| isWslMountedWindowsPath(candidate)
|
|
138
|
+
|| candidate.startsWith('/')));
|
|
139
|
+
return concreteCandidates.length > 0
|
|
140
|
+
? `project EngineAssociation "${engineAssociation}" conflicts with implicit engine roots (${roots}); expected one of ${concreteCandidates.join(' | ')}`
|
|
141
|
+
: `project EngineAssociation "${engineAssociation}" conflicts with implicit engine roots (${roots})`;
|
|
142
|
+
}
|
|
117
143
|
export async function resolveProjectInputs(request, deps) {
|
|
118
144
|
const { getProjectAutomationContext, firstDefinedString, env = process.env, workspaceProjectPath, platform = process.platform, } = deps;
|
|
119
145
|
let context = null;
|
|
@@ -149,11 +175,45 @@ export async function resolveProjectInputs(request, deps) {
|
|
|
149
175
|
path: candidate,
|
|
150
176
|
platform: candidatePlatform,
|
|
151
177
|
}))));
|
|
178
|
+
const associationIsConcrete = hasConcreteAssociationCandidate(associationCandidates);
|
|
179
|
+
const matchingContextEngineRoot = associationIsConcrete && matchesAssociationCandidate(engineRootFromContext, associationCandidates)
|
|
180
|
+
? engineRootFromContext
|
|
181
|
+
: undefined;
|
|
182
|
+
const matchingEnvEngineRoot = associationIsConcrete && matchesAssociationCandidate(engineRootFromEnv, associationCandidates)
|
|
183
|
+
? engineRootFromEnv
|
|
184
|
+
: undefined;
|
|
185
|
+
const conflictingImplicitRoots = associationIsConcrete
|
|
186
|
+
? [
|
|
187
|
+
...(engineRootFromContext && !matchingContextEngineRoot ? [{ source: 'editor_context', path: engineRootFromContext }] : []),
|
|
188
|
+
...(engineRootFromEnv && !matchingEnvEngineRoot ? [{ source: 'environment', path: engineRootFromEnv }] : []),
|
|
189
|
+
]
|
|
190
|
+
: [];
|
|
152
191
|
let engineRoot = firstDefinedString(request.engine_root, engineRootFromContext, engineRootFromEnv);
|
|
153
192
|
let engineRootSource;
|
|
193
|
+
let engineRootConflict;
|
|
154
194
|
if (request.engine_root) {
|
|
155
195
|
engineRootSource = 'explicit';
|
|
156
196
|
}
|
|
197
|
+
else if (associationIsConcrete) {
|
|
198
|
+
const preferredCandidate = await probePreferredEngineRoot(associationCandidates, platform);
|
|
199
|
+
if (matchingContextEngineRoot) {
|
|
200
|
+
engineRoot = matchingContextEngineRoot;
|
|
201
|
+
engineRootSource = 'editor_context';
|
|
202
|
+
}
|
|
203
|
+
else if (matchingEnvEngineRoot) {
|
|
204
|
+
engineRoot = matchingEnvEngineRoot;
|
|
205
|
+
engineRootSource = 'environment';
|
|
206
|
+
}
|
|
207
|
+
else if (preferredCandidate) {
|
|
208
|
+
engineRoot = preferredCandidate;
|
|
209
|
+
engineRootSource = 'project_association';
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
engineRoot = undefined;
|
|
213
|
+
engineRootSource = 'missing';
|
|
214
|
+
engineRootConflict = buildEngineRootConflict(engineAssociation, associationCandidates, conflictingImplicitRoots);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
157
217
|
else if (engineRootFromContext) {
|
|
158
218
|
engineRootSource = 'editor_context';
|
|
159
219
|
}
|
|
@@ -161,8 +221,7 @@ export async function resolveProjectInputs(request, deps) {
|
|
|
161
221
|
engineRootSource = 'environment';
|
|
162
222
|
}
|
|
163
223
|
else {
|
|
164
|
-
|
|
165
|
-
let heuristicRoot = preferredCandidate;
|
|
224
|
+
let heuristicRoot;
|
|
166
225
|
if (!heuristicRoot) {
|
|
167
226
|
for (const candidatePlatform of heuristicPlatforms) {
|
|
168
227
|
heuristicRoot = await probeEngineRootHeuristic(candidatePlatform, platform);
|
|
@@ -185,6 +244,8 @@ export async function resolveProjectInputs(request, deps) {
|
|
|
185
244
|
target,
|
|
186
245
|
context,
|
|
187
246
|
contextError,
|
|
247
|
+
projectEngineAssociation: engineAssociation,
|
|
248
|
+
engineRootConflict,
|
|
188
249
|
sources: {
|
|
189
250
|
engineRoot: engineRootSource,
|
|
190
251
|
projectPath: request.project_path ? 'explicit' : projectPathFromContext ? 'editor_context' : projectPathFromWorkspace ? 'workspace' : projectPathFromEnv ? 'environment' : 'missing',
|
|
@@ -10,11 +10,17 @@ export function buildProjectResolutionDiagnostics(resolved) {
|
|
|
10
10
|
`project_path=${resolved.sources.projectPath}`,
|
|
11
11
|
`target=${resolved.sources.target}`,
|
|
12
12
|
];
|
|
13
|
+
if (resolved.projectEngineAssociation) {
|
|
14
|
+
diagnostics.push(`project_engine_association=${resolved.projectEngineAssociation}`);
|
|
15
|
+
}
|
|
16
|
+
if (resolved.engineRootConflict) {
|
|
17
|
+
diagnostics.push(`engine_root_conflict=${resolved.engineRootConflict}`);
|
|
18
|
+
}
|
|
13
19
|
if (resolved.contextError) {
|
|
14
20
|
diagnostics.push(`editor_context_error=${resolved.contextError}`);
|
|
15
21
|
}
|
|
16
22
|
return diagnostics;
|
|
17
23
|
}
|
|
18
24
|
export function explainProjectResolutionFailure(prefix, resolved) {
|
|
19
|
-
return new Error(`${prefix}; attempted explicit args -> editor context -> environment (${buildProjectResolutionDiagnostics(resolved).join(', ')})`);
|
|
25
|
+
return new Error(`${prefix}; attempted explicit args -> project association -> editor context -> environment (${buildProjectResolutionDiagnostics(resolved).join(', ')})`);
|
|
20
26
|
}
|
|
@@ -225,7 +225,7 @@ export function registerStaticDocResources(server) {
|
|
|
225
225
|
'- list_message_log_listings probes known built-in and caller-supplied Message Log listing names and reports which ones are currently registered.',
|
|
226
226
|
'- read_message_log reads one registered Message Log listing with severity, token, text, and paging filters.',
|
|
227
227
|
'- compile_project_code runs an external UBT build from the MCP host.',
|
|
228
|
-
'- compile_project_code and sync_project_code resolve
|
|
228
|
+
'- compile_project_code and sync_project_code resolve project inputs by preferring explicit args, then honoring a concrete .uproject EngineAssociation before falling back to editor context and environment defaults.',
|
|
229
229
|
'- trigger_live_coding requests an editor-side Live Coding compile and is only supported on Windows-focused setups. changed_paths remains an accepted compatibility input but the current editor-side trigger ignores it. When Live Coding reports NoChanges or another fallback state, the result includes fallbackRecommended, reason, and the last external build context when available.',
|
|
230
230
|
'- restart_editor requests an editor restart, then waits for Remote Control to disconnect and reconnect. When save_dirty_assets is true, all dirty packages are saved before the restart to prevent modal save dialogs.',
|
|
231
231
|
'- wait_for_editor polls Remote Control once per second and returns a normalized readiness result that callers can use after restart windows or transient disconnects.',
|
package/dist/tool-context.d.ts
CHANGED
|
@@ -47,13 +47,15 @@ export type EditorContextSnapshot = {
|
|
|
47
47
|
partial?: boolean;
|
|
48
48
|
unsupportedSections?: string[];
|
|
49
49
|
};
|
|
50
|
-
export type ProjectInputSource = 'explicit' | 'editor_context' | 'workspace' | 'environment' | 'filesystem_heuristic' | 'missing';
|
|
50
|
+
export type ProjectInputSource = 'explicit' | 'editor_context' | 'workspace' | 'environment' | 'project_association' | 'filesystem_heuristic' | 'missing';
|
|
51
51
|
export type ResolvedProjectInputs = {
|
|
52
52
|
engineRoot?: string;
|
|
53
53
|
projectPath?: string;
|
|
54
54
|
target?: string;
|
|
55
55
|
context: ProjectAutomationContext | null;
|
|
56
56
|
contextError?: string;
|
|
57
|
+
projectEngineAssociation?: string;
|
|
58
|
+
engineRootConflict?: string;
|
|
57
59
|
sources: {
|
|
58
60
|
engineRoot: ProjectInputSource;
|
|
59
61
|
projectPath: ProjectInputSource;
|