Skip to content

Open-source AI teammates in Slack, Teams, Discord, Telegram and Mattermost. Self-host it, with any agent harness and any model.

fix(console): managed servers start with no feature flags (agent management off) (#846)

Louis Amaudruzb45a704eda86
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d88cdc868..a2b616fac 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1622,12 +1622,6 @@ version of their own to them without also giving them a release of their own.
no agent shows Service access, and setting up Switch Cloud goes straight
from signing in to the first cloud agent; turning it on reaches a running
Console without a restart.
-- **Managed servers turn agent management on.** A server Console runs, on
- this computer or on an SSH host, now starts with agent management enabled
- and the controller token secret it needs, generated once and shared by every
- Console using that server. On a switch-core release that offers agent
- management, Console then moves your agents onto managed machines by itself.
- Releases from before agent management ignore both settings.
- **Agents / Rooms sidebar and a reworked workspace menu.** On a server with
agent management, Console leads with Agents and Rooms above the legacy
Sessions, behind the server's feature flags, and the workspace menu is
diff --git a/console/apps/switch-console-desktop/src/main/core/managed-switch-server/env-file.test.ts b/console/apps/switch-console-desktop/src/main/core/managed-switch-server/env-file.test.ts
index c71847462..0ea27872e 100644
--- a/console/apps/switch-console-desktop/src/main/core/managed-switch-server/env-file.test.ts
+++ b/console/apps/switch-console-desktop/src/main/core/managed-switch-server/env-file.test.ts
@@ -75,8 +75,8 @@ describe('buildEnvFile', () => {
expect(vars.MATTERMOST_USER_PASSWORD).toBe('mm-user');
});
- it('turns agent management on', () => {
- expect(vars.FEATURE_FLAGS_ENABLED).toBe('agent_management');
+ it('starts a managed stack with no feature flags (agent management off)', () => {
+ expect(vars.FEATURE_FLAGS_ENABLED).toBe('');
});
it('runs switch-core as the restricted runtime role, not the schema owner', () => {
diff --git a/console/apps/switch-console-desktop/src/main/core/managed-switch-server/env-file.ts b/console/apps/switch-console-desktop/src/main/core/managed-switch-server/env-file.ts
index c7905471b..ce8f58a68 100644
--- a/console/apps/switch-console-desktop/src/main/core/managed-switch-server/env-file.ts
+++ b/console/apps/switch-console-desktop/src/main/core/managed-switch-server/env-file.ts
@@ -33,8 +33,9 @@ export type LocalServerEnvParams = {
telemetryInternal: boolean;
};
-/** The feature flags every managed stack is started with. */
-export const MANAGED_SERVER_FEATURE_FLAGS = ['agent_management'] as const;
+/** The feature flags every managed stack is started with. Empty: a managed
+ * stack starts with no feature flags on (agent management included). */
+export const MANAGED_SERVER_FEATURE_FLAGS = [] as const;
/** The variable the server reads its telemetry gate from. Named here because
* reading the choice back off a host has to look for the same key. */
@@ -88,9 +89,9 @@ export function buildEnvFile(params: LocalServerEnvParams): string {
`AGENT_REGISTRATION_TOKEN=${secrets.agentRegistrationToken}`,
`JWT_SECRET_KEY=${secrets.jwtSecretKey}`,
`SECRET_KEYS=${secrets.secretKeys}`,
- // The flags a managed stack runs with. Agent management is the one it
- // turns on: Console moves this machine's agents onto controllers once the
- // server offers it, and a release that does not know the variable ignores it.
+ // The flags a managed stack runs with (MANAGED_SERVER_FEATURE_FLAGS).
+ // Currently none: a managed stack starts with agent management off. The
+ // variable is still written (empty) so the stack's flag set is explicit.
`FEATURE_FLAGS_ENABLED=${MANAGED_SERVER_FEATURE_FLAGS.join(',')}`,
`CONTROLLER_TOKEN_SECRET=${secrets.controllerTokenSecret}`,
`GATEWAY_ADMIN_EMAIL=${LOCAL_SERVER_ADMIN_EMAIL}`,