@atelierai/uco 1.0.1 → 1.0.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/CHANGELOG.md +25 -1
- package/README.md +3 -3
- package/dist/codegen/emit.js +1 -1
- package/dist/codegen/fetch.js +1 -1
- package/dist/codegen/fetch.js.map +1 -1
- package/dist/commands/devops/login.js +1 -1
- package/dist/commands/devops/login.js.map +1 -1
- package/dist/commands/devops/setup-mcp.js +1 -1
- package/dist/commands/devops/setup-mcp.js.map +1 -1
- package/dist/commands/gen.js +2 -2
- package/dist/commands/gen.js.map +1 -1
- package/dist/commands/init.js +31 -10
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/ping.js +2 -2
- package/dist/commands/ping.js.map +1 -1
- package/dist/config/resolve.js +1 -1
- package/dist/config/resolve.js.map +1 -1
- package/dist/devops/utils/agents.js +1 -1
- package/dist/devops/utils/agents.js.map +1 -1
- package/dist/generated/tools.js +1 -1
- package/dist/generated/tools.js.map +1 -1
- package/docs/INSTALL.zh-CN.md +1 -1
- package/package.json +13 -4
- package/skills/uco-setup/SKILL.md +2 -2
- package/skills/uco-setup/references/recovery.md +26 -2
- package/skills/unity-editor/SKILL.md +1 -1
- package/vendor/plugin/com.atelierai.unity.copilot/CHANGELOG.md +48 -15
- package/vendor/plugin/com.atelierai.unity.copilot/Editor/DependencyResolver/NuGetResolverMenu.cs +3 -1
- package/vendor/plugin/com.atelierai.unity.copilot/Editor/Scripts/Branding/ProductInfo.cs +4 -5
- package/vendor/plugin/com.atelierai.unity.copilot/Editor/Scripts/CopilotServerManager.cs +32 -42
- package/vendor/plugin/com.atelierai.unity.copilot/Editor/Scripts/Skills/Skill_InitialSetup.cs +1 -1
- package/vendor/plugin/com.atelierai.unity.copilot/Editor/Scripts/UI/MenuItems.cs +7 -66
- package/vendor/plugin/com.atelierai.unity.copilot/Editor/Scripts/UI/Overlay/OpenWindowButton.cs +2 -2
- package/vendor/plugin/com.atelierai.unity.copilot/Editor/Scripts/UI/UnityCopilotProjectSettingsProvider.cs +5 -5
- package/vendor/plugin/com.atelierai.unity.copilot/Editor/Scripts/UI/Window/MainWindowEditor.Connection.cs +177 -409
- package/vendor/plugin/com.atelierai.unity.copilot/Editor/Scripts/UI/Window/MainWindowEditor.CreateGUI.cs +3 -10
- package/vendor/plugin/com.atelierai.unity.copilot/Editor/Scripts/UI/Window/MainWindowEditor.cs +2 -71
- package/vendor/plugin/com.atelierai.unity.copilot/Editor/Scripts/UI/Window/UpdatePopupWindow.cs +2 -2
- package/vendor/plugin/com.atelierai.unity.copilot/Editor/Scripts/UnityCopilotPluginEditor.Config.cs +6 -1
- package/vendor/plugin/com.atelierai.unity.copilot/Editor/Scripts/UnityCopilotPluginEditor.Static.cs +9 -12
- package/vendor/plugin/com.atelierai.unity.copilot/Editor/Scripts/UnityCopilotPluginEditor.cs +1 -1
- package/vendor/plugin/com.atelierai.unity.copilot/Editor/Scripts/Utils/ToolsManifestGenerator.cs +1 -1
- package/vendor/plugin/com.atelierai.unity.copilot/Editor/Scripts/Utils/UnityCopilotUpdateProjectSettings.cs +2 -2
- package/vendor/plugin/com.atelierai.unity.copilot/Editor/Scripts/Utils/UpdateChecker.cs +3 -3
- package/vendor/plugin/com.atelierai.unity.copilot/README.md +2 -2
- package/vendor/plugin/com.atelierai.unity.copilot/Runtime/UnityCopilotPlugin.Config.cs +11 -62
- package/vendor/plugin/com.atelierai.unity.copilot/Runtime/UnityCopilotPlugin.cs +1 -1
- package/vendor/plugin/com.atelierai.unity.copilot/Runtime/Utils/EnvironmentUtils.cs +7 -25
- package/vendor/plugin/com.atelierai.unity.copilot/Tests/Editor/Environment/EnvironmentUtilsTests.cs +260 -320
- package/vendor/plugin/com.atelierai.unity.copilot/Tests/Editor/Tool/Tool/ToolSetEnabledStateTests.cs +1 -1
- package/vendor/plugin/com.atelierai.unity.copilot/Tests/Editor/UI/MainWindowEditor.StatusLogicTests.cs +0 -125
- package/vendor/plugin/com.atelierai.unity.copilot/Tests/Editor/UI/SceneViewToolbarOverlayTests.cs +1 -1
- package/vendor/plugin/com.atelierai.unity.copilot/package.json +3 -3
- package/vendor/plugin/com.atelierai.unity.copilot/Editor/Scripts/Services/DeviceAuthFlow.cs +0 -133
- package/vendor/plugin/com.atelierai.unity.copilot/Editor/Scripts/Services/DeviceAuthFlow.cs.meta +0 -11
- package/vendor/plugin/com.atelierai.unity.copilot/Tests/Editor/CopilotServerManagerAutoStartTests.cs +0 -43
- package/vendor/plugin/com.atelierai.unity.copilot/Tests/Editor/CopilotServerManagerAutoStartTests.cs.meta +0 -11
|
@@ -155,133 +155,8 @@ namespace com.AtelierAI.Unity.Copilot.Editor.Tests
|
|
|
155
155
|
|
|
156
156
|
#endregion
|
|
157
157
|
|
|
158
|
-
#region ComputeCloudAuthState
|
|
159
158
|
|
|
160
|
-
[Test]
|
|
161
|
-
public void ComputeCloudAuthState_Cloud_NullToken()
|
|
162
|
-
{
|
|
163
|
-
var (needsAuth, hasToken, isCloud) = MainWindowEditor.ComputeCloudAuthState(ConnectionMode.Cloud, null);
|
|
164
|
-
Assert.IsTrue(needsAuth);
|
|
165
|
-
Assert.IsFalse(hasToken);
|
|
166
|
-
Assert.IsTrue(isCloud);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
[Test]
|
|
170
|
-
public void ComputeCloudAuthState_Cloud_EmptyToken()
|
|
171
|
-
{
|
|
172
|
-
var (needsAuth, hasToken, isCloud) = MainWindowEditor.ComputeCloudAuthState(ConnectionMode.Cloud, "");
|
|
173
|
-
Assert.IsTrue(needsAuth);
|
|
174
|
-
Assert.IsFalse(hasToken);
|
|
175
|
-
Assert.IsTrue(isCloud);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
[Test]
|
|
179
|
-
public void ComputeCloudAuthState_Cloud_ValidToken()
|
|
180
|
-
{
|
|
181
|
-
var (needsAuth, hasToken, isCloud) = MainWindowEditor.ComputeCloudAuthState(ConnectionMode.Cloud, "abc");
|
|
182
|
-
Assert.IsFalse(needsAuth);
|
|
183
|
-
Assert.IsTrue(hasToken);
|
|
184
|
-
Assert.IsTrue(isCloud);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
[Test]
|
|
188
|
-
public void ComputeCloudAuthState_Custom_NullToken()
|
|
189
|
-
{
|
|
190
|
-
var (needsAuth, hasToken, isCloud) = MainWindowEditor.ComputeCloudAuthState(ConnectionMode.Custom, null);
|
|
191
|
-
Assert.IsFalse(needsAuth);
|
|
192
|
-
Assert.IsFalse(hasToken);
|
|
193
|
-
Assert.IsFalse(isCloud);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
[Test]
|
|
197
|
-
public void ComputeCloudAuthState_Custom_ValidToken()
|
|
198
|
-
{
|
|
199
|
-
var (needsAuth, hasToken, isCloud) = MainWindowEditor.ComputeCloudAuthState(ConnectionMode.Custom, "abc");
|
|
200
|
-
Assert.IsFalse(needsAuth);
|
|
201
|
-
Assert.IsTrue(hasToken);
|
|
202
|
-
Assert.IsFalse(isCloud);
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
#endregion
|
|
206
|
-
|
|
207
|
-
#region IsAuthFlowRunning
|
|
208
|
-
|
|
209
|
-
[TestCase(DeviceAuthFlowState.Initiating, true)]
|
|
210
|
-
[TestCase(DeviceAuthFlowState.WaitingForUser, true)]
|
|
211
|
-
[TestCase(DeviceAuthFlowState.Polling, true)]
|
|
212
|
-
[TestCase(DeviceAuthFlowState.Idle, false)]
|
|
213
|
-
[TestCase(DeviceAuthFlowState.Authorized, false)]
|
|
214
|
-
[TestCase(DeviceAuthFlowState.Failed, false)]
|
|
215
|
-
[TestCase(DeviceAuthFlowState.Expired, false)]
|
|
216
|
-
[TestCase(DeviceAuthFlowState.Cancelled, false)]
|
|
217
|
-
public void IsAuthFlowRunning(DeviceAuthFlowState state, bool expected)
|
|
218
|
-
{
|
|
219
|
-
Assert.AreEqual(expected, MainWindowEditor.IsAuthFlowRunning(state));
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
#endregion
|
|
223
|
-
|
|
224
|
-
#region GetAuthFlowStatusMessage
|
|
225
|
-
|
|
226
|
-
[Test]
|
|
227
|
-
public void GetAuthFlowStatusMessage_Initiating()
|
|
228
|
-
{
|
|
229
|
-
Assert.AreEqual("Initiating...", MainWindowEditor.GetAuthFlowStatusMessage(DeviceAuthFlowState.Initiating, null, null));
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
[Test]
|
|
233
|
-
public void GetAuthFlowStatusMessage_WaitingForUser()
|
|
234
|
-
{
|
|
235
|
-
var result = MainWindowEditor.GetAuthFlowStatusMessage(DeviceAuthFlowState.WaitingForUser, "ABC123", null);
|
|
236
|
-
Assert.AreEqual("Code: ABC123 — Authorize in browser", result);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
[Test]
|
|
240
|
-
public void GetAuthFlowStatusMessage_Polling()
|
|
241
|
-
{
|
|
242
|
-
var result = MainWindowEditor.GetAuthFlowStatusMessage(DeviceAuthFlowState.Polling, "XYZ789", null);
|
|
243
|
-
Assert.AreEqual("Code: XYZ789 — Waiting for authorization...", result);
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
[Test]
|
|
247
|
-
public void GetAuthFlowStatusMessage_Authorized()
|
|
248
|
-
{
|
|
249
|
-
Assert.AreEqual("Authorized!", MainWindowEditor.GetAuthFlowStatusMessage(DeviceAuthFlowState.Authorized, null, null));
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
[Test]
|
|
253
|
-
public void GetAuthFlowStatusMessage_Failed_WithMessage()
|
|
254
|
-
{
|
|
255
|
-
var result = MainWindowEditor.GetAuthFlowStatusMessage(DeviceAuthFlowState.Failed, null, "timeout");
|
|
256
|
-
Assert.AreEqual("Failed: timeout", result);
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
[Test]
|
|
260
|
-
public void GetAuthFlowStatusMessage_Failed_NullMessage()
|
|
261
|
-
{
|
|
262
|
-
var result = MainWindowEditor.GetAuthFlowStatusMessage(DeviceAuthFlowState.Failed, null, null);
|
|
263
|
-
Assert.AreEqual("Failed: ", result);
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
[Test]
|
|
267
|
-
public void GetAuthFlowStatusMessage_Expired()
|
|
268
|
-
{
|
|
269
|
-
Assert.AreEqual("Expired — try again", MainWindowEditor.GetAuthFlowStatusMessage(DeviceAuthFlowState.Expired, null, null));
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
[Test]
|
|
273
|
-
public void GetAuthFlowStatusMessage_Cancelled()
|
|
274
|
-
{
|
|
275
|
-
Assert.AreEqual("Cancelled", MainWindowEditor.GetAuthFlowStatusMessage(DeviceAuthFlowState.Cancelled, null, null));
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
[Test]
|
|
279
|
-
public void GetAuthFlowStatusMessage_Idle()
|
|
280
|
-
{
|
|
281
|
-
Assert.AreEqual("", MainWindowEditor.GetAuthFlowStatusMessage(DeviceAuthFlowState.Idle, null, null));
|
|
282
|
-
}
|
|
283
159
|
|
|
284
|
-
#endregion
|
|
285
160
|
|
|
286
161
|
#region IsHostFieldReadOnly
|
|
287
162
|
|
package/vendor/plugin/com.atelierai.unity.copilot/Tests/Editor/UI/SceneViewToolbarOverlayTests.cs
CHANGED
|
@@ -61,7 +61,7 @@ namespace com.AtelierAI.Unity.Copilot.Editor.Tests
|
|
|
61
61
|
public void OpenWindowButton_SetsExpectedTextAndTooltip()
|
|
62
62
|
{
|
|
63
63
|
var button = new OpenWindowButton();
|
|
64
|
-
Assert.AreEqual("Unity
|
|
64
|
+
Assert.AreEqual("Unity Copilot", button.text);
|
|
65
65
|
Assert.IsNotEmpty(button.tooltip);
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "com.atelierai.unity.copilot",
|
|
3
|
-
"displayName": "Unity
|
|
3
|
+
"displayName": "Unity Copilot",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "AtelierAI"
|
|
6
6
|
},
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"Unity Skills",
|
|
16
16
|
"uco"
|
|
17
17
|
],
|
|
18
|
-
"version": "1.0.
|
|
18
|
+
"version": "1.0.3",
|
|
19
19
|
"unity": "2022.3",
|
|
20
|
-
"description": "uco — Unity
|
|
20
|
+
"description": "uco — Unity Copilot: AI Skills, Tools, and CLI for the Unity Engine, driven over plain REST + WebSocket. Any C# method may be turned into a tool by a single line. Derived from IvanMurzak/Unity-MCP (Apache-2.0).",
|
|
21
21
|
"documentationUrl": "https://github.com/DumoeDss/uco-plugin/tree/main/uco-unity-project/Packages/com.atelierai.unity.copilot#readme",
|
|
22
22
|
"changelogUrl": "https://github.com/DumoeDss/uco-plugin/blob/main/uco-unity-project/Packages/com.atelierai.unity.copilot/CHANGELOG.md",
|
|
23
23
|
"dependencies": {
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
┌──────────────────────────────────────────────────────────────────┐
|
|
3
|
-
│ Author: Ivan Murzak (https://github.com/IvanMurzak) │
|
|
4
|
-
│ Repository: GitHub (https://github.com/IvanMurzak/Unity-MCP) │
|
|
5
|
-
│ Copyright (c) 2025 Ivan Murzak │
|
|
6
|
-
│ Licensed under the Apache License, Version 2.0. │
|
|
7
|
-
│ See the LICENSE file in the project root for more information. │
|
|
8
|
-
└──────────────────────────────────────────────────────────────────┘
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#nullable enable
|
|
12
|
-
using System;
|
|
13
|
-
using System.Threading;
|
|
14
|
-
using System.Threading.Tasks;
|
|
15
|
-
using Microsoft.Extensions.Logging;
|
|
16
|
-
using UnityEngine;
|
|
17
|
-
using ILogger = Microsoft.Extensions.Logging.ILogger;
|
|
18
|
-
|
|
19
|
-
namespace com.AtelierAI.Unity.Copilot.Editor.Services
|
|
20
|
-
{
|
|
21
|
-
public enum DeviceAuthFlowState
|
|
22
|
-
{
|
|
23
|
-
Idle,
|
|
24
|
-
Initiating,
|
|
25
|
-
WaitingForUser,
|
|
26
|
-
Polling,
|
|
27
|
-
Authorized,
|
|
28
|
-
Failed,
|
|
29
|
-
Expired,
|
|
30
|
-
Cancelled
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
public class DeviceAuthFlow
|
|
34
|
-
{
|
|
35
|
-
private static readonly ILogger _logger = com.AtelierAI.Unity.Copilot.Utils.UnityLoggerFactory.LoggerFactory.CreateLogger<DeviceAuthFlow>();
|
|
36
|
-
|
|
37
|
-
private CancellationTokenSource? _cts;
|
|
38
|
-
|
|
39
|
-
public DeviceAuthFlowState State { get; private set; } = DeviceAuthFlowState.Idle;
|
|
40
|
-
public string? UserCode { get; private set; }
|
|
41
|
-
public string? ErrorMessage { get; private set; }
|
|
42
|
-
|
|
43
|
-
public event Action<DeviceAuthFlowState>? OnStateChanged;
|
|
44
|
-
|
|
45
|
-
public async Task StartAsync(string serverUrl, string? clientLabel = null)
|
|
46
|
-
{
|
|
47
|
-
Cancel();
|
|
48
|
-
_cts = new CancellationTokenSource();
|
|
49
|
-
var ct = _cts.Token;
|
|
50
|
-
|
|
51
|
-
try
|
|
52
|
-
{
|
|
53
|
-
SetState(DeviceAuthFlowState.Initiating);
|
|
54
|
-
|
|
55
|
-
var authResponse = await DeviceAuthService.InitiateDeviceAuthAsync(serverUrl, clientLabel, ct);
|
|
56
|
-
UserCode = authResponse.UserCode;
|
|
57
|
-
|
|
58
|
-
SetState(DeviceAuthFlowState.WaitingForUser);
|
|
59
|
-
|
|
60
|
-
Application.OpenURL(authResponse.VerificationUriComplete);
|
|
61
|
-
|
|
62
|
-
SetState(DeviceAuthFlowState.Polling);
|
|
63
|
-
|
|
64
|
-
var interval = Math.Max(authResponse.Interval, 5) * 1000;
|
|
65
|
-
var deadline = DateTime.UtcNow.AddSeconds(authResponse.ExpiresIn);
|
|
66
|
-
|
|
67
|
-
while (DateTime.UtcNow < deadline)
|
|
68
|
-
{
|
|
69
|
-
ct.ThrowIfCancellationRequested();
|
|
70
|
-
await Task.Delay(interval, ct);
|
|
71
|
-
|
|
72
|
-
var tokenResponse = await DeviceAuthService.PollDeviceTokenAsync(serverUrl, authResponse.DeviceCode, ct);
|
|
73
|
-
|
|
74
|
-
if (tokenResponse.AccessToken != null)
|
|
75
|
-
{
|
|
76
|
-
UnityCopilotPluginEditor.CloudToken = tokenResponse.AccessToken;
|
|
77
|
-
UnityCopilotPluginEditor.Instance.Save();
|
|
78
|
-
SetState(DeviceAuthFlowState.Authorized);
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if (tokenResponse.Error == "access_denied")
|
|
83
|
-
{
|
|
84
|
-
ErrorMessage = "Authorization was denied.";
|
|
85
|
-
SetState(DeviceAuthFlowState.Failed);
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
if (tokenResponse.Error == "expired_token")
|
|
90
|
-
{
|
|
91
|
-
SetState(DeviceAuthFlowState.Expired);
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// authorization_pending or slow_down — keep polling
|
|
96
|
-
if (tokenResponse.Error == "slow_down")
|
|
97
|
-
{
|
|
98
|
-
interval = Math.Min(interval + 5000, 30000);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
SetState(DeviceAuthFlowState.Expired);
|
|
103
|
-
}
|
|
104
|
-
catch (OperationCanceledException)
|
|
105
|
-
{
|
|
106
|
-
SetState(DeviceAuthFlowState.Cancelled);
|
|
107
|
-
}
|
|
108
|
-
catch (Exception ex)
|
|
109
|
-
{
|
|
110
|
-
_logger.LogError(ex, "Device auth flow failed");
|
|
111
|
-
ErrorMessage = ex.Message;
|
|
112
|
-
SetState(DeviceAuthFlowState.Failed);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
public void Cancel()
|
|
117
|
-
{
|
|
118
|
-
var cts = _cts;
|
|
119
|
-
_cts = null;
|
|
120
|
-
if (cts != null)
|
|
121
|
-
{
|
|
122
|
-
try { cts.Cancel(); } catch (ObjectDisposedException) { }
|
|
123
|
-
cts.Dispose();
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
private void SetState(DeviceAuthFlowState state)
|
|
128
|
-
{
|
|
129
|
-
State = state;
|
|
130
|
-
OnStateChanged?.Invoke(state);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
package/vendor/plugin/com.atelierai.unity.copilot/Tests/Editor/CopilotServerManagerAutoStartTests.cs
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
┌──────────────────────────────────────────────────────────────────┐
|
|
3
|
-
│ Author: Ivan Murzak (https://github.com/IvanMurzak) │
|
|
4
|
-
│ Repository: GitHub (https://github.com/IvanMurzak/Unity-MCP) │
|
|
5
|
-
│ Copyright (c) 2025 Ivan Murzak │
|
|
6
|
-
│ Licensed under the Apache License, Version 2.0. │
|
|
7
|
-
│ See the LICENSE file in the project root for more information. │
|
|
8
|
-
└──────────────────────────────────────────────────────────────────┘
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#nullable enable
|
|
12
|
-
using NUnit.Framework;
|
|
13
|
-
|
|
14
|
-
namespace com.AtelierAI.Unity.Copilot.Editor.Tests
|
|
15
|
-
{
|
|
16
|
-
/// <summary>
|
|
17
|
-
/// Regression tests for issue #695: the local MCP server must NOT be auto-started on
|
|
18
|
-
/// Editor launch (or after a binary update) when the connection mode is Cloud.
|
|
19
|
-
///
|
|
20
|
-
/// <see cref="CopilotServerManager.IsAutoStartAllowedForMode"/> is the pure decision used by
|
|
21
|
-
/// every auto-start path. User-driven actions (clicking the Start button in the editor
|
|
22
|
-
/// window) are intentionally not gated by this method.
|
|
23
|
-
/// </summary>
|
|
24
|
-
public class CopilotServerManagerAutoStartTests
|
|
25
|
-
{
|
|
26
|
-
[Test]
|
|
27
|
-
public void IsAutoStartAllowedForMode_Cloud_ReturnsFalse()
|
|
28
|
-
{
|
|
29
|
-
Assert.IsFalse(
|
|
30
|
-
CopilotServerManager.IsAutoStartAllowedForMode(ConnectionMode.Cloud),
|
|
31
|
-
"Cloud mode must never auto-start the local MCP server (issue #695).");
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
[Test]
|
|
35
|
-
public void IsAutoStartAllowedForMode_Custom_ReturnsTrue()
|
|
36
|
-
{
|
|
37
|
-
Assert.IsTrue(
|
|
38
|
-
CopilotServerManager.IsAutoStartAllowedForMode(ConnectionMode.Custom),
|
|
39
|
-
"Custom mode targets the local MCP server, so auto-start must be allowed " +
|
|
40
|
-
"(subject to the other gates inside StartServerIfNeeded).");
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|