commit 4818c78dfdd4a75e87bdf066d67418aa41ad20a2 Author: sladro Date: Fri Mar 27 10:27:46 2026 +0800 chore: initialize monorepo workspace diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3688df0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,26 @@ +# Flutter +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +build/ + +# iOS +**/ios/Pods/ +**/ios/.symlinks/ + +# Android +**/android/.gradle/ +**/android/local.properties + +# .NET +**/bin/ +**/obj/ +.vs/ + +# Local security artifacts +data/ +certs/ + +# Brainstorm artifacts +.superpowers/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..c321896 --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +# TermRemoteCtl + +TermRemoteCtl is a personal remote coding controller for one Windows workstation. + +## Workspace Layout +- apps/mobile_app: Flutter app for iPhone and Android +- apps/windows_agent: Windows resident agent +- docs: specifications, plans, and protocol notes + +## Prerequisites +- Flutter 3.x +- .NET 8 SDK +- Windows 11 for the agent runtime + +## Initial Setup +1. Run flutter create apps/mobile_app --platforms=android,ios --project-name term_remote_ctl +2. Run dotnet new sln -n TermRemoteCtl.Agent -o apps/windows_agent +3. Follow the implementation plan in docs/superpowers/plans/2026-03-27-mobile-windows-terminal-controller.md diff --git a/apps/mobile_app/pubspec.yaml b/apps/mobile_app/pubspec.yaml new file mode 100644 index 0000000..4d1929c --- /dev/null +++ b/apps/mobile_app/pubspec.yaml @@ -0,0 +1,20 @@ +name: term_remote_ctl +description: A Flutter app for TermRemoteCtl. +publish_to: "none" + +version: 1.0.0+1 + +environment: + sdk: ">=3.0.0 <4.0.0" + +dependencies: + flutter: + sdk: flutter + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^5.0.0 + +flutter: + uses-material-design: true diff --git a/apps/windows_agent/TermRemoteCtl.Agent.sln b/apps/windows_agent/TermRemoteCtl.Agent.sln new file mode 100644 index 0000000..85d79f6 --- /dev/null +++ b/apps/windows_agent/TermRemoteCtl.Agent.sln @@ -0,0 +1,43 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{762BA82A-FFA7-43DE-A006-811AC3BCE95E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TermRemoteCtl.Agent", "src\TermRemoteCtl.Agent\TermRemoteCtl.Agent.csproj", "{51E4993A-E415-4425-B6B8-9761B2209A5B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{ED0BB4F4-E9D8-49A4-A344-773EA12C5970}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TermRemoteCtl.Agent.Tests", "tests\TermRemoteCtl.Agent.Tests\TermRemoteCtl.Agent.Tests.csproj", "{CD81CCA7-FD15-4F13-85D3-89FFE0F0E62F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TermRemoteCtl.Agent.IntegrationTests", "tests\TermRemoteCtl.Agent.IntegrationTests\TermRemoteCtl.Agent.IntegrationTests.csproj", "{2C37B937-C6AC-401D-9005-9C34A52F3A89}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {51E4993A-E415-4425-B6B8-9761B2209A5B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {51E4993A-E415-4425-B6B8-9761B2209A5B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {51E4993A-E415-4425-B6B8-9761B2209A5B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {51E4993A-E415-4425-B6B8-9761B2209A5B}.Release|Any CPU.Build.0 = Release|Any CPU + {CD81CCA7-FD15-4F13-85D3-89FFE0F0E62F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CD81CCA7-FD15-4F13-85D3-89FFE0F0E62F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CD81CCA7-FD15-4F13-85D3-89FFE0F0E62F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CD81CCA7-FD15-4F13-85D3-89FFE0F0E62F}.Release|Any CPU.Build.0 = Release|Any CPU + {2C37B937-C6AC-401D-9005-9C34A52F3A89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2C37B937-C6AC-401D-9005-9C34A52F3A89}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2C37B937-C6AC-401D-9005-9C34A52F3A89}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2C37B937-C6AC-401D-9005-9C34A52F3A89}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {51E4993A-E415-4425-B6B8-9761B2209A5B} = {762BA82A-FFA7-43DE-A006-811AC3BCE95E} + {CD81CCA7-FD15-4F13-85D3-89FFE0F0E62F} = {ED0BB4F4-E9D8-49A4-A344-773EA12C5970} + {2C37B937-C6AC-401D-9005-9C34A52F3A89} = {ED0BB4F4-E9D8-49A4-A344-773EA12C5970} + EndGlobalSection +EndGlobal diff --git a/apps/windows_agent/src/TermRemoteCtl.Agent/Program.cs b/apps/windows_agent/src/TermRemoteCtl.Agent/Program.cs new file mode 100644 index 0000000..1760df1 --- /dev/null +++ b/apps/windows_agent/src/TermRemoteCtl.Agent/Program.cs @@ -0,0 +1,6 @@ +var builder = WebApplication.CreateBuilder(args); +var app = builder.Build(); + +app.MapGet("/", () => "Hello World!"); + +app.Run(); diff --git a/apps/windows_agent/src/TermRemoteCtl.Agent/Properties/launchSettings.json b/apps/windows_agent/src/TermRemoteCtl.Agent/Properties/launchSettings.json new file mode 100644 index 0000000..0077dd5 --- /dev/null +++ b/apps/windows_agent/src/TermRemoteCtl.Agent/Properties/launchSettings.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:42526", + "sslPort": 44336 + } + }, + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "http://localhost:5067", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "https://localhost:7014;http://localhost:5067", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/apps/windows_agent/src/TermRemoteCtl.Agent/TermRemoteCtl.Agent.csproj b/apps/windows_agent/src/TermRemoteCtl.Agent/TermRemoteCtl.Agent.csproj new file mode 100644 index 0000000..1b28a01 --- /dev/null +++ b/apps/windows_agent/src/TermRemoteCtl.Agent/TermRemoteCtl.Agent.csproj @@ -0,0 +1,9 @@ + + + + net8.0 + enable + enable + + + diff --git a/apps/windows_agent/src/TermRemoteCtl.Agent/appsettings.Development.json b/apps/windows_agent/src/TermRemoteCtl.Agent/appsettings.Development.json new file mode 100644 index 0000000..0c208ae --- /dev/null +++ b/apps/windows_agent/src/TermRemoteCtl.Agent/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/apps/windows_agent/src/TermRemoteCtl.Agent/appsettings.json b/apps/windows_agent/src/TermRemoteCtl.Agent/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/apps/windows_agent/src/TermRemoteCtl.Agent/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/apps/windows_agent/tests/TermRemoteCtl.Agent.IntegrationTests/TermRemoteCtl.Agent.IntegrationTests.csproj b/apps/windows_agent/tests/TermRemoteCtl.Agent.IntegrationTests/TermRemoteCtl.Agent.IntegrationTests.csproj new file mode 100644 index 0000000..9c5b30a --- /dev/null +++ b/apps/windows_agent/tests/TermRemoteCtl.Agent.IntegrationTests/TermRemoteCtl.Agent.IntegrationTests.csproj @@ -0,0 +1,23 @@ + + + + net8.0 + enable + enable + + false + true + + + + + + + + + + + + + + diff --git a/apps/windows_agent/tests/TermRemoteCtl.Agent.IntegrationTests/UnitTest1.cs b/apps/windows_agent/tests/TermRemoteCtl.Agent.IntegrationTests/UnitTest1.cs new file mode 100644 index 0000000..fae170b --- /dev/null +++ b/apps/windows_agent/tests/TermRemoteCtl.Agent.IntegrationTests/UnitTest1.cs @@ -0,0 +1,10 @@ +namespace TermRemoteCtl.Agent.IntegrationTests; + +public class UnitTest1 +{ + [Fact] + public void Test1() + { + + } +} \ No newline at end of file diff --git a/apps/windows_agent/tests/TermRemoteCtl.Agent.Tests/TermRemoteCtl.Agent.Tests.csproj b/apps/windows_agent/tests/TermRemoteCtl.Agent.Tests/TermRemoteCtl.Agent.Tests.csproj new file mode 100644 index 0000000..9c5b30a --- /dev/null +++ b/apps/windows_agent/tests/TermRemoteCtl.Agent.Tests/TermRemoteCtl.Agent.Tests.csproj @@ -0,0 +1,23 @@ + + + + net8.0 + enable + enable + + false + true + + + + + + + + + + + + + + diff --git a/apps/windows_agent/tests/TermRemoteCtl.Agent.Tests/UnitTest1.cs b/apps/windows_agent/tests/TermRemoteCtl.Agent.Tests/UnitTest1.cs new file mode 100644 index 0000000..b87f866 --- /dev/null +++ b/apps/windows_agent/tests/TermRemoteCtl.Agent.Tests/UnitTest1.cs @@ -0,0 +1,10 @@ +namespace TermRemoteCtl.Agent.Tests; + +public class UnitTest1 +{ + [Fact] + public void Test1() + { + + } +} \ No newline at end of file diff --git a/docs/architecture/protocol.md b/docs/architecture/protocol.md new file mode 100644 index 0000000..48bf4cc --- /dev/null +++ b/docs/architecture/protocol.md @@ -0,0 +1,10 @@ +# TermRemoteCtl Protocol Notes + +## Control Plane +HTTPS JSON endpoints handle pairing, trusted devices, sessions, presets, and history windows. + +## Data Plane +WebSocket handles active-session attach, terminal output frames, resize events, and input events. + +## First Serialization Rule +All timestamps use ISO 8601 UTC strings. Session IDs, device IDs, and pairing IDs are opaque strings. diff --git a/melos.yaml b/melos.yaml new file mode 100644 index 0000000..286ccde --- /dev/null +++ b/melos.yaml @@ -0,0 +1,3 @@ +name: term_remote_ctl +packages: + - apps/**