ue-mcp 1.2.1 → 1.2.2
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/dist/context-cli.js +16 -16
- package/dist/engine-observer.js +68 -68
- package/dist/flow/guard.d.ts +26 -37
- package/dist/flow/guard.js +40 -25
- package/dist/flow/guard.js.map +1 -1
- package/dist/flow/guarded-bridge.d.ts +0 -10
- package/dist/flow/guarded-bridge.js +18 -23
- package/dist/flow/guarded-bridge.js.map +1 -1
- package/dist/flow/schema.d.ts +276 -16
- package/dist/flow/task-guards.d.ts +1 -1
- package/dist/flow/task-guards.js +44 -68
- package/dist/flow/task-guards.js.map +1 -1
- package/dist/instructions.js +130 -130
- package/dist/plugin-cli.js +299 -299
- package/dist/tool-counts.json +2 -2
- package/package.json +2 -2
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/EngineStatusHooks.cpp +76 -76
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/EngineStatusHooks.h +27 -27
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/HandlerRegistry.cpp +128 -128
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/HandlerRegistry.h +63 -63
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/AnimationHandlers_ControlRig.cpp +230 -230
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/AssetHandlers_Struct.cpp +323 -323
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/BlueprintHandlers_Internal.h +20 -20
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/ChooserHandlers_Nested.cpp +537 -537
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/DemoHandlers.h +77 -77
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/EditorHandlers_Build.cpp +353 -353
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/FoliageHandlers.h +18 -18
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/GameplayHandlers_InputRuntime.cpp +246 -246
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/GasHandlers.cpp +597 -597
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/GasHandlers.h +51 -51
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/LandscapeHandlers.cpp +878 -878
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/LandscapeHandlers_Sculpt.cpp +449 -449
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/MaterialHandlers_Function.cpp +275 -275
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/MaterialHandlers_Graph.cpp +551 -551
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/NetworkingHandlers.cpp +531 -531
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/NetworkingHandlers.h +28 -28
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/PhysicsHandlers.cpp +677 -677
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/SequencerHandlers.cpp +822 -822
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/SequencerHandlers.h +22 -22
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/SplineHandlers.cpp +218 -218
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/SplineHandlers.h +17 -17
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/VolumeHelpers_Internal.cpp +46 -46
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/Handlers/VolumeHelpers_Internal.h +23 -23
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Private/MCPExternalRegistry.cpp +83 -83
- package/plugin/ue_mcp_bridge/Source/UE_MCP_Bridge/Public/UE_MCP_BridgeModule.h +14 -14
- package/plugin/ue_mcp_bridge/Source/UE_MCP_BridgeStatus/Private/UE_MCP_BridgeStatusModule.cpp +37 -37
- package/dist/manifest-signature.d.ts +0 -1
- package/dist/manifest-signature.js +0 -53
- package/dist/manifest-signature.js.map +0 -1
- package/dist/pie/schema.d.ts +0 -791
- package/dist/pie/schema.js +0 -151
- package/dist/pie/schema.js.map +0 -1
- package/dist/watch-cli.js.map +0 -1
- /package/plugin/ue_mcp_bridge/{ue_mcp_bridge.uplugin → UE_MCP_Bridge.uplugin} +0 -0
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
#pragma once
|
|
2
|
-
|
|
3
|
-
#include "CoreMinimal.h"
|
|
4
|
-
|
|
5
|
-
class UWorld;
|
|
6
|
-
class AVolume;
|
|
7
|
-
|
|
8
|
-
namespace UEMCP
|
|
9
|
-
{
|
|
10
|
-
/** Initialize a freshly-spawned AVolume with a UCubeBuilder-built brush.
|
|
11
|
-
* AVolumes spawned via SpawnActor have Brush=nullptr, which makes
|
|
12
|
-
* UEditorBrushBuilder::EndBrush silently no-op (it returns true without
|
|
13
|
-
* populating polys). This mirrors UActorFactoryVolume by initializing
|
|
14
|
-
* UModel + UPolys + BrushComponent->Brush in the editor's documented
|
|
15
|
-
* order, then running UCubeBuilder + csgPrepMovingBrush, so the
|
|
16
|
-
* resulting volume reports real bounds to GetActorBounds() and
|
|
17
|
-
* downstream samplers.
|
|
18
|
-
*
|
|
19
|
-
* Shared by LevelHandlers (SpawnVolume / SetVolumeProperties) and
|
|
20
|
-
* PCGHandlers (PCG volume creation). Issue #238.
|
|
21
|
-
*/
|
|
22
|
-
void BuildVolumeAsCube(UWorld* World, AVolume* Volume, const FVector& HalfExtent);
|
|
23
|
-
}
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include "CoreMinimal.h"
|
|
4
|
+
|
|
5
|
+
class UWorld;
|
|
6
|
+
class AVolume;
|
|
7
|
+
|
|
8
|
+
namespace UEMCP
|
|
9
|
+
{
|
|
10
|
+
/** Initialize a freshly-spawned AVolume with a UCubeBuilder-built brush.
|
|
11
|
+
* AVolumes spawned via SpawnActor have Brush=nullptr, which makes
|
|
12
|
+
* UEditorBrushBuilder::EndBrush silently no-op (it returns true without
|
|
13
|
+
* populating polys). This mirrors UActorFactoryVolume by initializing
|
|
14
|
+
* UModel + UPolys + BrushComponent->Brush in the editor's documented
|
|
15
|
+
* order, then running UCubeBuilder + csgPrepMovingBrush, so the
|
|
16
|
+
* resulting volume reports real bounds to GetActorBounds() and
|
|
17
|
+
* downstream samplers.
|
|
18
|
+
*
|
|
19
|
+
* Shared by LevelHandlers (SpawnVolume / SetVolumeProperties) and
|
|
20
|
+
* PCGHandlers (PCG volume creation). Issue #238.
|
|
21
|
+
*/
|
|
22
|
+
void BuildVolumeAsCube(UWorld* World, AVolume* Volume, const FVector& HalfExtent);
|
|
23
|
+
}
|
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
#include "MCPHandlerRegistration.h"
|
|
2
|
-
#include "HAL/CriticalSection.h"
|
|
3
|
-
#include "Misc/ScopeLock.h"
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Global registry for handlers contributed by third-party plugin modules.
|
|
7
|
-
* The bridge's per-server FMCPHandlerRegistry falls back to this map when
|
|
8
|
-
* a method isn't found locally, so plugins that load before, after, or
|
|
9
|
-
* concurrently with the bridge module all participate uniformly.
|
|
10
|
-
*/
|
|
11
|
-
namespace UEMCP
|
|
12
|
-
{
|
|
13
|
-
namespace
|
|
14
|
-
{
|
|
15
|
-
FCriticalSection& ExternalRegistryMutex()
|
|
16
|
-
{
|
|
17
|
-
static FCriticalSection Mutex;
|
|
18
|
-
return Mutex;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
TMap<FString, FExternalHandlerFn>& ExternalHandlers()
|
|
22
|
-
{
|
|
23
|
-
static TMap<FString, FExternalHandlerFn> Map;
|
|
24
|
-
return Map;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
TMap<FString, float>& ExternalHandlerTimeouts()
|
|
28
|
-
{
|
|
29
|
-
static TMap<FString, float> Map;
|
|
30
|
-
return Map;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
void RegisterExternalHandler(const FString& MethodName, FExternalHandlerFn Handler)
|
|
35
|
-
{
|
|
36
|
-
FScopeLock Lock(&ExternalRegistryMutex());
|
|
37
|
-
ExternalHandlers().Add(MethodName, MoveTemp(Handler));
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
void RegisterExternalHandlerWithTimeout(const FString& MethodName, FExternalHandlerFn Handler, float TimeoutSeconds)
|
|
41
|
-
{
|
|
42
|
-
FScopeLock Lock(&ExternalRegistryMutex());
|
|
43
|
-
ExternalHandlers().Add(MethodName, MoveTemp(Handler));
|
|
44
|
-
if (TimeoutSeconds > 0.0f)
|
|
45
|
-
{
|
|
46
|
-
ExternalHandlerTimeouts().Add(MethodName, TimeoutSeconds);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
void UnregisterExternalHandler(const FString& MethodName)
|
|
51
|
-
{
|
|
52
|
-
FScopeLock Lock(&ExternalRegistryMutex());
|
|
53
|
-
ExternalHandlers().Remove(MethodName);
|
|
54
|
-
ExternalHandlerTimeouts().Remove(MethodName);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
bool LookupExternalHandler(const FString& MethodName, FExternalHandlerFn& OutFn, float& OutTimeoutSeconds)
|
|
58
|
-
{
|
|
59
|
-
FScopeLock Lock(&ExternalRegistryMutex());
|
|
60
|
-
if (const FExternalHandlerFn* Found = ExternalHandlers().Find(MethodName))
|
|
61
|
-
{
|
|
62
|
-
OutFn = *Found;
|
|
63
|
-
if (const float* T = ExternalHandlerTimeouts().Find(MethodName))
|
|
64
|
-
{
|
|
65
|
-
OutTimeoutSeconds = *T;
|
|
66
|
-
}
|
|
67
|
-
else
|
|
68
|
-
{
|
|
69
|
-
OutTimeoutSeconds = 0.0f;
|
|
70
|
-
}
|
|
71
|
-
return true;
|
|
72
|
-
}
|
|
73
|
-
return false;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
TArray<FString> GetExternalHandlerNames()
|
|
77
|
-
{
|
|
78
|
-
FScopeLock Lock(&ExternalRegistryMutex());
|
|
79
|
-
TArray<FString> Names;
|
|
80
|
-
ExternalHandlers().GetKeys(Names);
|
|
81
|
-
return Names;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
1
|
+
#include "MCPHandlerRegistration.h"
|
|
2
|
+
#include "HAL/CriticalSection.h"
|
|
3
|
+
#include "Misc/ScopeLock.h"
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Global registry for handlers contributed by third-party plugin modules.
|
|
7
|
+
* The bridge's per-server FMCPHandlerRegistry falls back to this map when
|
|
8
|
+
* a method isn't found locally, so plugins that load before, after, or
|
|
9
|
+
* concurrently with the bridge module all participate uniformly.
|
|
10
|
+
*/
|
|
11
|
+
namespace UEMCP
|
|
12
|
+
{
|
|
13
|
+
namespace
|
|
14
|
+
{
|
|
15
|
+
FCriticalSection& ExternalRegistryMutex()
|
|
16
|
+
{
|
|
17
|
+
static FCriticalSection Mutex;
|
|
18
|
+
return Mutex;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
TMap<FString, FExternalHandlerFn>& ExternalHandlers()
|
|
22
|
+
{
|
|
23
|
+
static TMap<FString, FExternalHandlerFn> Map;
|
|
24
|
+
return Map;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
TMap<FString, float>& ExternalHandlerTimeouts()
|
|
28
|
+
{
|
|
29
|
+
static TMap<FString, float> Map;
|
|
30
|
+
return Map;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
void RegisterExternalHandler(const FString& MethodName, FExternalHandlerFn Handler)
|
|
35
|
+
{
|
|
36
|
+
FScopeLock Lock(&ExternalRegistryMutex());
|
|
37
|
+
ExternalHandlers().Add(MethodName, MoveTemp(Handler));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
void RegisterExternalHandlerWithTimeout(const FString& MethodName, FExternalHandlerFn Handler, float TimeoutSeconds)
|
|
41
|
+
{
|
|
42
|
+
FScopeLock Lock(&ExternalRegistryMutex());
|
|
43
|
+
ExternalHandlers().Add(MethodName, MoveTemp(Handler));
|
|
44
|
+
if (TimeoutSeconds > 0.0f)
|
|
45
|
+
{
|
|
46
|
+
ExternalHandlerTimeouts().Add(MethodName, TimeoutSeconds);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
void UnregisterExternalHandler(const FString& MethodName)
|
|
51
|
+
{
|
|
52
|
+
FScopeLock Lock(&ExternalRegistryMutex());
|
|
53
|
+
ExternalHandlers().Remove(MethodName);
|
|
54
|
+
ExternalHandlerTimeouts().Remove(MethodName);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
bool LookupExternalHandler(const FString& MethodName, FExternalHandlerFn& OutFn, float& OutTimeoutSeconds)
|
|
58
|
+
{
|
|
59
|
+
FScopeLock Lock(&ExternalRegistryMutex());
|
|
60
|
+
if (const FExternalHandlerFn* Found = ExternalHandlers().Find(MethodName))
|
|
61
|
+
{
|
|
62
|
+
OutFn = *Found;
|
|
63
|
+
if (const float* T = ExternalHandlerTimeouts().Find(MethodName))
|
|
64
|
+
{
|
|
65
|
+
OutTimeoutSeconds = *T;
|
|
66
|
+
}
|
|
67
|
+
else
|
|
68
|
+
{
|
|
69
|
+
OutTimeoutSeconds = 0.0f;
|
|
70
|
+
}
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
TArray<FString> GetExternalHandlerNames()
|
|
77
|
+
{
|
|
78
|
+
FScopeLock Lock(&ExternalRegistryMutex());
|
|
79
|
+
TArray<FString> Names;
|
|
80
|
+
ExternalHandlers().GetKeys(Names);
|
|
81
|
+
return Names;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
#pragma once
|
|
2
|
-
|
|
3
|
-
#include "CoreMinimal.h"
|
|
4
|
-
#include "Modules/ModuleManager.h"
|
|
5
|
-
|
|
6
|
-
DECLARE_LOG_CATEGORY_EXTERN(LogMCPBridge, Log, All);
|
|
7
|
-
|
|
8
|
-
class FUE_MCP_BridgeModule : public IModuleInterface
|
|
9
|
-
{
|
|
10
|
-
public:
|
|
11
|
-
/** IModuleInterface implementation */
|
|
12
|
-
virtual void StartupModule() override;
|
|
13
|
-
virtual void ShutdownModule() override;
|
|
14
|
-
};
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include "CoreMinimal.h"
|
|
4
|
+
#include "Modules/ModuleManager.h"
|
|
5
|
+
|
|
6
|
+
DECLARE_LOG_CATEGORY_EXTERN(LogMCPBridge, Log, All);
|
|
7
|
+
|
|
8
|
+
class FUE_MCP_BridgeModule : public IModuleInterface
|
|
9
|
+
{
|
|
10
|
+
public:
|
|
11
|
+
/** IModuleInterface implementation */
|
|
12
|
+
virtual void StartupModule() override;
|
|
13
|
+
virtual void ShutdownModule() override;
|
|
14
|
+
};
|
package/plugin/ue_mcp_bridge/Source/UE_MCP_BridgeStatus/Private/UE_MCP_BridgeStatusModule.cpp
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
#include "MCPEngineStatus.h"
|
|
2
|
-
#include "Modules/ModuleManager.h"
|
|
3
|
-
#include "Misc/CoreDelegates.h"
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Loads at PostConfigInit, which is the earliest phase where a plugin module
|
|
7
|
-
* can run and still have config, paths and the feedback context available.
|
|
8
|
-
* Everything the editor does between here and PostEngineInit - asset registry
|
|
9
|
-
* scan, startup shader compilation, map load, and any prompt raised during
|
|
10
|
-
* them - was previously invisible to ue-mcp because nothing of ours existed
|
|
11
|
-
* yet. From this point on it is published to Saved/UE_MCP_Bridge/status.json.
|
|
12
|
-
*/
|
|
13
|
-
class FUE_MCP_BridgeStatusModule : public IModuleInterface
|
|
14
|
-
{
|
|
15
|
-
public:
|
|
16
|
-
virtual void StartupModule() override
|
|
17
|
-
{
|
|
18
|
-
FMCPEngineStatus::Get().Install();
|
|
19
|
-
FMCPEngineStatus::Get().SetPhase(TEXT("config init"));
|
|
20
|
-
|
|
21
|
-
FCoreDelegates::OnAllModuleLoadingPhasesComplete.AddLambda([]()
|
|
22
|
-
{
|
|
23
|
-
FMCPEngineStatus::Get().SetPhase(TEXT("modules loaded"));
|
|
24
|
-
});
|
|
25
|
-
FCoreDelegates::OnFEngineLoopInitComplete.AddLambda([]()
|
|
26
|
-
{
|
|
27
|
-
FMCPEngineStatus::Get().SetPhase(TEXT("engine loop initialized"));
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
virtual void ShutdownModule() override
|
|
32
|
-
{
|
|
33
|
-
FMCPEngineStatus::Get().Shutdown();
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
IMPLEMENT_MODULE(FUE_MCP_BridgeStatusModule, UE_MCP_BridgeStatus)
|
|
1
|
+
#include "MCPEngineStatus.h"
|
|
2
|
+
#include "Modules/ModuleManager.h"
|
|
3
|
+
#include "Misc/CoreDelegates.h"
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Loads at PostConfigInit, which is the earliest phase where a plugin module
|
|
7
|
+
* can run and still have config, paths and the feedback context available.
|
|
8
|
+
* Everything the editor does between here and PostEngineInit - asset registry
|
|
9
|
+
* scan, startup shader compilation, map load, and any prompt raised during
|
|
10
|
+
* them - was previously invisible to ue-mcp because nothing of ours existed
|
|
11
|
+
* yet. From this point on it is published to Saved/UE_MCP_Bridge/status.json.
|
|
12
|
+
*/
|
|
13
|
+
class FUE_MCP_BridgeStatusModule : public IModuleInterface
|
|
14
|
+
{
|
|
15
|
+
public:
|
|
16
|
+
virtual void StartupModule() override
|
|
17
|
+
{
|
|
18
|
+
FMCPEngineStatus::Get().Install();
|
|
19
|
+
FMCPEngineStatus::Get().SetPhase(TEXT("config init"));
|
|
20
|
+
|
|
21
|
+
FCoreDelegates::OnAllModuleLoadingPhasesComplete.AddLambda([]()
|
|
22
|
+
{
|
|
23
|
+
FMCPEngineStatus::Get().SetPhase(TEXT("modules loaded"));
|
|
24
|
+
});
|
|
25
|
+
FCoreDelegates::OnFEngineLoopInitComplete.AddLambda([]()
|
|
26
|
+
{
|
|
27
|
+
FMCPEngineStatus::Get().SetPhase(TEXT("engine loop initialized"));
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
virtual void ShutdownModule() override
|
|
32
|
+
{
|
|
33
|
+
FMCPEngineStatus::Get().Shutdown();
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
IMPLEMENT_MODULE(FUE_MCP_BridgeStatusModule, UE_MCP_BridgeStatus)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function loadAppManifestSignature(): string;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import * as fs from "node:fs";
|
|
2
|
-
import * as path from "node:path";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
-
/**
|
|
5
|
-
* Runtime loader for the credential used by the anonymous feedback-bot path
|
|
6
|
-
* in src/github-app.ts (the `useBot=true` submit route).
|
|
7
|
-
*
|
|
8
|
-
* For human readers: this is the same GitHub App installation credential that
|
|
9
|
-
* used to be a string literal in src/github-app.ts. Its only scope is
|
|
10
|
-
* issues:write on db-lyon/ue-mcp. The blast radius of a leak is "agent files
|
|
11
|
-
* a noise issue against the public tracker" — not credential exposure of any
|
|
12
|
-
* sensitive system. The team accepts that.
|
|
13
|
-
*
|
|
14
|
-
* The reason for keeping it in a binary asset rather than as source: agents
|
|
15
|
-
* working in this repo will routinely read files and grep for credential-
|
|
16
|
-
* shaped identifiers while orienting. Surfacing a 27-line literal on every
|
|
17
|
-
* casual read defeats the consent gate in feedback(submit) by giving the
|
|
18
|
-
* agent an out-of-band path to the GitHub API. Moving the bytes into an
|
|
19
|
-
* XOR'd binary blob removes that affordance for non-targeted inspection.
|
|
20
|
-
*
|
|
21
|
-
* This is not a security boundary. The XOR cycle constant lives next to the
|
|
22
|
-
* blob in the same published package; a determined human reading both can
|
|
23
|
-
* decode in seconds. The goal is to defeat lazy AI inspection, not human
|
|
24
|
-
* reverse engineering.
|
|
25
|
-
*
|
|
26
|
-
* The longer-term plan is to move bot submission server-side so this loader
|
|
27
|
-
* goes away entirely — see https://github.com/db-lyon/ue-mcp/issues/461.
|
|
28
|
-
* No ETA. Until then, this is the bar.
|
|
29
|
-
*
|
|
30
|
-
* Rotation: generate a new credential, save the encoded form to a local file,
|
|
31
|
-
* then run `node scripts/encode-installation-key.mjs <path>`. Commit the
|
|
32
|
-
* regenerated assets/installation.bin; never commit the raw source form.
|
|
33
|
-
*/
|
|
34
|
-
const CYCLE = "ue-mcp-feedback/installation-key-v1";
|
|
35
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
36
|
-
const __dirname = path.dirname(__filename);
|
|
37
|
-
// Compiled output lives in dist/, blob lives at repo root under assets/.
|
|
38
|
-
// Resolve relative to this module so it works for both `tsx src/...` (dev)
|
|
39
|
-
// and `node dist/...` (published).
|
|
40
|
-
const BLOB_PATH = path.resolve(__dirname, "..", "assets", "installation.bin");
|
|
41
|
-
let cached = null;
|
|
42
|
-
export function loadAppManifestSignature() {
|
|
43
|
-
if (cached !== null)
|
|
44
|
-
return cached;
|
|
45
|
-
const blob = fs.readFileSync(BLOB_PATH);
|
|
46
|
-
const out = Buffer.alloc(blob.length);
|
|
47
|
-
for (let i = 0; i < blob.length; i++) {
|
|
48
|
-
out[i] = blob[i] ^ CYCLE.charCodeAt(i % CYCLE.length);
|
|
49
|
-
}
|
|
50
|
-
cached = out.toString("utf-8");
|
|
51
|
-
return cached;
|
|
52
|
-
}
|
|
53
|
-
//# sourceMappingURL=manifest-signature.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-signature.js","sourceRoot":"","sources":["../src/manifest-signature.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,MAAM,KAAK,GAAG,qCAAqC,CAAC;AAEpD,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAE3C,yEAAyE;AACzE,2EAA2E;AAC3E,mCAAmC;AACnC,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,kBAAkB,CAAC,CAAC;AAE9E,IAAI,MAAM,GAAkB,IAAI,CAAC;AAEjC,MAAM,UAAU,wBAAwB;IACtC,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,MAAM,CAAC;IACnC,MAAM,IAAI,GAAG,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IACxC,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IACxD,CAAC;IACD,MAAM,GAAG,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC/B,OAAO,MAAM,CAAC;AAChB,CAAC"}
|