apps/server/src/auth/EnvironmentAuth.test.ts | 16 +++++ apps/server/src/auth/EnvironmentAuth.ts | 50 +++++++++++++--- apps/server/src/auth/EnvironmentAuthAdmin.test.ts | 2 + apps/server/src/auth/EnvironmentAuthPolicy.test.ts | 6 +- apps/server/src/auth/EnvironmentAuthPolicy.ts | 3 + apps/server/src/auth/SessionStore.test.ts | 37 ++++++++++-- apps/server/src/auth/SessionStore.ts | 12 +++- apps/server/src/auth/http.ts | 49 +++++++++++---- apps/server/src/auth/utils.test.ts | 65 ++++++++++++++------ apps/server/src/auth/utils.ts | 35 +++++++---- apps/server/src/bin.test.ts | 29 ++++++++- apps/server/src/cli/connect.ts | 5 +- apps/server/src/cli/pair.test.ts | 25 +++++++- apps/server/src/environment/ServerEnvironment.test.ts | 77 +++++++++++++++++++++++- apps/server/src/environment/ServerEnvironment.ts | 102 +++++++++++++++++++++++++------- apps/server/src/server.test.ts | 47 +++++++++++++++ apps/server/src/server.ts | 7 ++- docs/internals/remote.md | 4 ++ 18 files changed, 484 insertions(+), 87 deletions(-)