Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
23f54bf
fix(web): show official workspace usage with third-party providers
leftxp Nov 10, 2026
d6169a9
feat(claude): integrate official Claude Code with a local SDK bridge
leftxp Nov 10, 2026
e7f5283
feat(web): customize five mobile tabs with a fixed More destination
leftxp Nov 10, 2026
7c0e4ae
Merge branch 'codex/web-custom-tabs' into codex/claude-code-integration
leftxp Nov 10, 2026
e6a4c9a
feat(web): add a polished cached PWA launch screen and faster startup
leftxp Nov 10, 2026
6dcaf12
fix(web): preserve single-page navigation after PWA startup
leftxp Nov 10, 2026
50db6e7
fix(web): structure Claude history and fold tool output
leftxp Nov 10, 2026
7b10b71
feat(claude): run Claude Code in the shared agent workspace
leftxp Nov 11, 2026
57b53c7
fix(claude): fail closed when project settings cannot be read
leftxp Nov 11, 2026
0d757a7
fix(web): serve the Claude icon under a new name so stale caches cann…
leftxp Nov 11, 2026
7da9277
feat(web): card surfaces for session lists and Claude context usage
leftxp Nov 11, 2026
a4323ed
fix(claude): refuse takeover when a confirmed idle desktop session be…
leftxp Nov 11, 2026
34f7c22
feat(android): integrate Claude into the shared agent workspace
leftxp Nov 11, 2026
ccc8eb6
build(android): add a side-by-side Claude trial package
leftxp Nov 11, 2026
2a78e34
feat(android): add configurable six-tab navigation with Claude visible
leftxp Nov 11, 2026
2f1abde
feat(android): redesign tab editor with drag sorting and live preview
leftxp Nov 11, 2026
d782535
fix(android): move bottom navigation editor to the More toolbar
leftxp Nov 11, 2026
5656571
fix(claude): read official subscription quotas through SDK usage control
leftxp Nov 11, 2026
31a7dde
Merge latest upstream and reconcile Claude workspace and mobile navig…
leftxp Nov 12, 2026
f9d4a8e
fix: preserve Claude request receipts and verify process ownership
bighamx Nov 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
| 命令终端 | WebSocket 交互终端,Windows PowerShell / CMD,Linux Shell,macOS PTY |
| 文件管理 | 浏览、上传、下载、复制、移动、重命名、删除,以及支持格式的文件预览 |
| Docker / Compose | 容器、镜像、日志及 Compose 文件编辑与部署 |
| Codex / Hermes | 会话搜索、新建、续聊、流式消息、旁白、工具进度、附件与模型设置,支持按原生协议展示审批和问题回答 |
| Codex / Hermes / Claude Code | 会话搜索、新建、续聊、流式消息、旁白、工具进度、附件与模型设置,支持按原生协议展示审批和问题回答 |
| Cloudflare | DNS、R2、D1 和隧道管理 |
| 定时任务 | Hangfire 任务与执行日志,内置 qBittorrent、DDNS 等任务模板 |
| 空间管理 | 按会话、附件类型和时间管理 RemoteTool 附件与诊断日志,支持操作确认和回收站 |
Expand Down Expand Up @@ -130,7 +130,7 @@ dotnet run --project WebApplication/WebApplication.csproj --launch-profile http
| 文件管理 | `/#/files` |
| 远程桌面 | `/#/desktop` |
| 命令终端 | `/#/terminal` |
| Codex / Hermes | `/#/codex`、`/#/hermes` |
| Codex / Hermes / Claude Code | `/#/codex`、`/#/hermes`、`/#/claude` |
| 定时任务 | `/#/jobs` |
| 空间管理 | `/#/storage` |
| 网页身份验证 | `/#/identity` |
Expand Down Expand Up @@ -162,6 +162,12 @@ dotnet run --project WebApplication/WebApplication.csproj --launch-profile http
- **Codex** 使用原生 `app-server` 协议,支持会话与项目管理、审批、问题回答及模型设置。CLI 需要支持 `codex app-server --stdio`,服务可通过配置定位可执行文件及 Codex Home。[Codex 接入说明](app/CODEX.md)
- **Hermes** 使用持久会话接口和 `/v1/runs` 事件流。明确填写本机 API 地址、Hermes Home 和密钥文件。IIS 部署应指向实际桌面用户的安装目录。`HERMES_API_KEY_FILE` 用于 `Hermes:KeyFile` 缺省时的密钥路径回退。[Hermes 接入说明](app/HERMES.md)

### Claude Code

Web 与 Android 主 App 共用会话工作台,通过官方 Claude Agent SDK 读取和继续本机会话,支持流式消息、工具记录、审批与问题回答、附件、模型与权限模式以及官方订阅额度。电脑进程占用的会话需确认后才能接管;结果未知时保留回执,不自动重放。服务端需安装 Node.js 和 SDK,安装及安全边界见 [Claude 接入说明](WebApplication/Tools/ClaudeBridge/README.md)。

手机 Web 与 Android 主 App 支持自定义底部导航:前五个入口加固定“更多”,其他入口收纳到更多中。Web PWA 提供启动加载状态和失败重试。

### 网页身份验证

工作台的“设置 → 身份验证”管理 OIDC 和 Cloudflare Access。配置保存后即时生效,获准用户具有 RemoteTool 管理员权限。App 的设备连接使用设备登录接口。
Expand Down
17 changes: 16 additions & 1 deletion WebApplication/Controllers/AgentSetupController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
namespace RemoteTool.WebApi.Controllers;

[Authorize,ApiController,Route("api/agent-setup")]
public sealed class AgentSetupController(IConfiguration configuration,HermesProfiles profiles,HermesManagement management,HermesGatewayAdmin gateway,HermesBridge bridge,CodexInstaller installer,HermesInstaller hermesInstaller):ControllerBase
public sealed class AgentSetupController(IConfiguration configuration,HermesProfiles profiles,HermesManagement management,HermesGatewayAdmin gateway,HermesBridge bridge,CodexInstaller installer,HermesInstaller hermesInstaller,ClaudeBridge claude):ControllerBase
{
[HttpGet("{agent}")]
public async Task<IActionResult> Status(string agent,[FromQuery]string profile="default",CancellationToken ct=default) {
Expand All @@ -35,6 +35,17 @@ public async Task<IActionResult> Status(string agent,[FromQuery]string profile="
}catch(Exception e)when(e is IOException or JsonException){}
return Ok(auth?Guide(agent,"ready","Codex 已找到","",false):Guide(agent,"sign_in","需要登录或配置模型","请在服务端登录 Codex 官方账号,或在模型设置中配置第三方 Provider。",false));
}
if(agent=="claude") {
if(configuration.GetValue<bool?>("Claude:Enabled")==false)return Ok(ClaudeGuide("disabled","Claude Code 接入未启用","服务端设置了 Claude:Enabled=false。"));
try {
using var timeout=CancellationTokenSource.CreateLinkedTokenSource(ct);timeout.CancelAfter(TimeSpan.FromSeconds(20));
using var response=await claude.SendAsync(HttpMethod.Get,"setup",null,timeout.Token);
var payload=JsonNode.Parse(await response.Content.ReadAsStringAsync(timeout.Token));
if(!response.IsSuccessStatusCode)return Ok(ClaudeGuide("not_running","Claude 桥接未就绪",payload?["message"]?.ToString()??"请检查服务端 Claude 桥接。"));
return Ok(payload?["ready"]?.GetValue<bool>()==true?ClaudeGuide("ready","Claude Code 已登录",""):ClaudeGuide("sign_in","需要登录 Claude Code",payload?["message"]?.ToString()??""));
}catch(InvalidOperationException e){return Ok(ClaudeGuide("not_installed","Claude Code 尚未就绪",e.Message));}
catch(Exception e)when(e is HttpRequestException or IOException or OperationCanceledException or JsonException){return Ok(ClaudeGuide("not_running","Claude 桥接未响应","请稍后重新检测。"));}
}
if(agent!="hermes")return NotFound();
if(hermesInstaller.Current.Busy)return Ok(Guide(agent,"installing","正在安装 Hermes",hermesInstaller.Current.Message,false));
string homePath;
Expand Down Expand Up @@ -69,6 +80,10 @@ public async Task<IActionResult> Status(string agent,[FromQuery]string profile="
:"服务端缺少 Hermes API 接入或管理组件。请先安装并完成初始设置。",managed&&profile=="default"));
return Ok(Guide(agent,"not_running","Hermes API 未连接","配置已找到,但本地 API 未响应。请启动网关,或使用安全重启后重新检测。",managed&&profile=="default"));
}
private static object ClaudeGuide(string state,string title,string message)=>new{
agent="claude",state,title,message,canConfigureApi=false,canInstall=false,install=(object)null,
installationNote="RemoteTool 使用官方 Claude Agent SDK 驱动本机 Claude Code;不会代为登录、复制凭据或修改你的 Claude 配置。检测只读取安装与登录状态,不发送提示词。",
steps=new[]{"在运行 RemoteTool 的系统用户下安装官方 Claude Code(claude 命令)和 Node.js 20+。","在该用户下执行 claude auth login,并用 claude auth status 确认已登录。","在服务端 claude 目录(源码为 WebApplication/Tools/ClaudeBridge)执行 npm ci --omit=dev --omit=optional。","如程序不在默认位置,配置 Claude:Executable / Claude:NodeExecutable 的绝对路径。","返回这里重新检测。"}};
private object Guide(string agent,string state,string title,string message,bool canConfigure,bool? canInstall=null){
var installable=canInstall??(agent=="codex"?installer.CanInstall:hermesInstaller.CanInstall);
return new {
Expand Down
3 changes: 3 additions & 0 deletions WebApplication/Controllers/AgentsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ public sealed class AgentsController : Controller
[HttpGet("codex")]
public IActionResult Codex() { ViewBag.Agent = "codex"; ViewBag.Title = "Codex"; return View("Index"); }

[HttpGet("claude")]
public IActionResult Claude() { ViewBag.Agent = "claude"; ViewBag.Title = "Claude Code"; return View("Index"); }

[HttpGet("hermes")]
public IActionResult Hermes() { ViewBag.Agent = "hermes"; ViewBag.Title = "Hermes"; return View("Index"); }
}
17 changes: 17 additions & 0 deletions WebApplication/Controllers/AppStartController.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ViewFeatures;

namespace RemoteTool.WebApi.Controllers;

[ApiController, AllowAnonymous, Route("api/app-start")]
public sealed class AppStartController(IFileVersionProvider versions) : ControllerBase
{
// Public interface resources only. Never return or cache authenticated page data here.
[HttpGet, ResponseCache(NoStore = true)]
public IActionResult Get() => Ok(new { assets = new[] {
"/css/site.css", "/helper/lib/viewuiplus.css", "/css/shell.css", "/css/mobile.css", "/css/server-update.css",
"/helper/lib/vue.global.prod.js", "/helper/lib/viewuiplus.min.js", "/js/web-api.js", "/js/index.js",
"/js/site.js", "/js/mobile-navigation.js", "/js/server-update.js", "/js/workspace-router.js"
}.Select(path => versions.AddFileVersionToPath(Request.PathBase, path)).ToArray() });
}
Loading
Loading