From 14541c5fae7f8edfb2908511e139b9aca3aa5077 Mon Sep 17 00:00:00 2001
From: Ted Kaemming <65315+tkaemming@users.noreply.github.com>
Date: Tue, 5 Dec 2023 16:57:15 -0800
Subject: [PATCH] Add capability and plugin-server mode.

---
 plugin-server/src/capabilities.ts | 6 ++++++
 plugin-server/src/types.ts        | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/plugin-server/src/capabilities.ts b/plugin-server/src/capabilities.ts
index bbb8a49823ed7..7a30b46438b36 100644
--- a/plugin-server/src/capabilities.ts
+++ b/plugin-server/src/capabilities.ts
@@ -19,6 +19,7 @@ export function getPluginServerCapabilities(config: PluginsServerConfig): Plugin
                 processAsyncOnEventHandlers: true,
                 processAsyncWebhooksHandlers: true,
                 sessionRecordingBlobIngestion: true,
+                personOverrides: config.POE_DEFERRED_WRITES_ENABLED,
                 transpileFrontendApps: true,
                 preflightSchedules: true,
                 ...sharedCapabilities,
@@ -75,5 +76,10 @@ export function getPluginServerCapabilities(config: PluginsServerConfig): Plugin
                 transpileFrontendApps: true, // TODO: move this away from pod startup, into a graphile job
                 ...sharedCapabilities,
             }
+        case PluginServerMode.person_overrides:
+            return {
+                personOverrides: true,
+                ...sharedCapabilities,
+            }
     }
 }
diff --git a/plugin-server/src/types.ts b/plugin-server/src/types.ts
index 7690cb528ddaa..50aeec3cf63a7 100644
--- a/plugin-server/src/types.ts
+++ b/plugin-server/src/types.ts
@@ -76,6 +76,7 @@ export enum PluginServerMode {
     scheduler = 'scheduler',
     analytics_ingestion = 'analytics-ingestion',
     recordings_blob_ingestion = 'recordings-blob-ingestion',
+    person_overrides = 'person-overrides',
 }
 
 export const stringToPluginServerMode = Object.fromEntries(
@@ -287,6 +288,7 @@ export interface PluginServerCapabilities {
     processAsyncOnEventHandlers?: boolean
     processAsyncWebhooksHandlers?: boolean
     sessionRecordingBlobIngestion?: boolean
+    personOverrides?: boolean
     transpileFrontendApps?: boolean // TODO: move this away from pod startup, into a graphile job
     preflightSchedules?: boolean // Used for instance health checks on hobby deploy, not useful on cloud
     http?: boolean