@mflrevan/ucp 0.3.2 → 0.3.3
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 +2 -2
- package/bridge/com.ucp.bridge/CHANGELOG.md +14 -0
- package/bridge/com.ucp.bridge/Editor/Bridge/BridgeServer.cs +1 -1
- package/bridge/com.ucp.bridge/Editor/Controllers/EditorController.cs.meta +2 -0
- package/bridge/com.ucp.bridge/Editor/Controllers/ObjectReferenceResolver.cs.meta +2 -0
- package/bridge/com.ucp.bridge/Editor/Protocol/CommandRouter.cs +8 -0
- package/bridge/com.ucp.bridge/Tests/Editor/ControllerSmokeTests.cs +2 -1
- package/bridge/com.ucp.bridge/package.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @mflrevan/ucp
|
|
2
2
|
|
|
3
|
-
Version `0.3.
|
|
3
|
+
Version `0.3.3` of the Unity Control Protocol CLI.
|
|
4
4
|
|
|
5
5
|
This package installs the `ucp` command, downloads the matching published binary for your platform during `postinstall`, and ships the matching Unity bridge payload inside the npm package.
|
|
6
6
|
|
|
@@ -49,7 +49,7 @@ Or add this to `Packages/manifest.json`:
|
|
|
49
49
|
```json
|
|
50
50
|
{
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"com.ucp.bridge": "https://github.com/mflRevan/unity-control-protocol.git?path=unity-package/com.ucp.bridge#v0.3.
|
|
52
|
+
"com.ucp.bridge": "https://github.com/mflRevan/unity-control-protocol.git?path=unity-package/com.ucp.bridge#v0.3.3"
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
```
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.3] - 2026-03-14
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Added missing Unity metadata for `EditorController.cs` and `ObjectReferenceResolver.cs` so both controllers import reliably in embedded and tracked package installs.
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- `CommandRouter` now maps `ArgumentException` to `InvalidParams` and `UnauthorizedAccessException` to `FileAccessDenied` without emitting misleading internal-error logs.
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- Fixed negative smoke tests around unresolved object references and project-root path traversal.
|
|
16
|
+
|
|
3
17
|
## [0.3.2] - 2026-03-14
|
|
4
18
|
|
|
5
19
|
### Added
|
|
@@ -26,7 +26,7 @@ namespace UCP.Bridge
|
|
|
26
26
|
private const int DefaultPort = 21342;
|
|
27
27
|
private const int MaxPort = 21352;
|
|
28
28
|
private const int MaxConnections = 4;
|
|
29
|
-
private const string ProtocolVersion = "0.3.
|
|
29
|
+
private const string ProtocolVersion = "0.3.3";
|
|
30
30
|
|
|
31
31
|
private static TcpListener s_listener;
|
|
32
32
|
private static CancellationTokenSource s_cts;
|
|
@@ -31,6 +31,14 @@ namespace UCP.Bridge
|
|
|
31
31
|
var result = handler(paramsJson);
|
|
32
32
|
return JsonRpcResponse.Success(id, result);
|
|
33
33
|
}
|
|
34
|
+
catch (ArgumentException ex)
|
|
35
|
+
{
|
|
36
|
+
return JsonRpcResponse.Error(id, ErrorCodes.InvalidParams, ex.Message);
|
|
37
|
+
}
|
|
38
|
+
catch (UnauthorizedAccessException ex)
|
|
39
|
+
{
|
|
40
|
+
return JsonRpcResponse.Error(id, ErrorCodes.FileAccessDenied, ex.Message);
|
|
41
|
+
}
|
|
34
42
|
catch (Exception ex)
|
|
35
43
|
{
|
|
36
44
|
Debug.LogError($"[UCP] Error handling '{method}': {ex}");
|
|
@@ -301,6 +301,7 @@ namespace UCP.Bridge.Tests
|
|
|
301
301
|
);
|
|
302
302
|
|
|
303
303
|
Assert.That(response.error, Is.Not.Null);
|
|
304
|
+
Assert.That(response.error.code, Is.EqualTo(ErrorCodes.InvalidParams));
|
|
304
305
|
}
|
|
305
306
|
|
|
306
307
|
[Test]
|
|
@@ -348,9 +349,9 @@ namespace UCP.Bridge.Tests
|
|
|
348
349
|
var readResult = (Dictionary<string, object>)read.result;
|
|
349
350
|
Assert.That(readResult["content"].ToString(), Is.EqualTo("hello patched"));
|
|
350
351
|
|
|
351
|
-
LogAssert.Expect(LogType.Error, new Regex("\\[UCP\\] Error handling 'file/read':"));
|
|
352
352
|
var traversal = _router.Dispatch("file/read", 1, "{\"path\":\"../outside.txt\"}");
|
|
353
353
|
Assert.That(traversal.error, Is.Not.Null);
|
|
354
|
+
Assert.That(traversal.error.code, Is.EqualTo(ErrorCodes.FileAccessDenied));
|
|
354
355
|
}
|
|
355
356
|
|
|
356
357
|
[Test]
|