mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-11-30 00:47:36 +00:00
* fix(proactive): simplify round files and restore failed summaries * fix(proactive): validate document-relative Markdown links * feat(proactive_agent): implement v2 daily record workflow with single-file decision - Add ProactiveAgentStepV2 class to support single daily note decision and reminder - Introduce RoundOutputs for v2 round file tracking, and keep RoundArtifacts for v1 summary backup - Refactor AgentOutbox to support both v1 standalone reminder files and v2 daily reminder records - Add proactive_record utilities to parse and validate v2 daily record frontmatter and metadata - Enhance proactive_agent to prepare, read, and manage artifacts for both v1 and v2 flows - Add configuration profile proactive_v2 to enable new workflow with backward compatibility - Update proactive.yaml and reactive proactive_agent_step configuration comment for easy switching - Provide extensive schema validation for v2 reminders ensuring priority and message consistency - Document v2 workflow and usage in English and Chinese runtime docs - Add unit tests for v2 step verifying single file output and proper decision handling * refactor(agent/runtime): replace ReminderRef with string keys and simplify reminder handling - Remove ReminderRef model and switch to using workspace-relative string keys for reminders - Simplify AgentOutbox to read, write, and manage reminders keyed by strings - Change file locking and version checking to protect concurrent edits on daily record files - Replace legacy and v2 reminder file handling with unified ReminderFiles storage - Adjust ChatNotifications to operate with the new key scheme and update pending/read sets - Refactor RoundOutputs to RoundRecord for safer round record tracking and rollback - Remove unused ProactiveRunResult and related references from imports and exports - Update InboxWakeRequest, AgentReminder, and related models for consistent ID and path validation - Adjust proactive agent runtime and local runtime to check reminder versions before commit - Correct language and docs to describe reminders as daily records instead of separate files - Clean up roles of inbox and outbox for reminder ownership, delivery, and acknowledgments * fix(proactive): serialize round commits and align desktop reminders * refactor(proactive): unify task triggers in Proactive Runtime * fix(proactive): bound reminder payloads and simplify receipts * refactor(studio): share workbench and simplify proactive delivery * fix(studio): update and centralize build dependencies * fix(proactive): guard draft repair and verify Studio deployments * chore(docs): update source-map-js * feat(release): support publishing selected artifacts from a tag * chore(studio): remove the public playground * refactor: simplify reminders and release workflows * fix: preserve proactive records and align release provenance * test(proactive): remove brittle prompt and preset assertions * fix(proactive): register reminders after input acknowledgement * feat(notebook): list projects across todos and ideas * feat(studio): connect mobile apps to configurable ReMe services * fix(proactive): reserve registered reminder paths * fix(studio): request Android local network access * fix(proactive): reserve reminder paths referenced by receipts
53 lines
3.7 KiB
Markdown
53 lines
3.7 KiB
Markdown
# ReMe Studio for iOS
|
||
|
||
ReMe Studio for iOS 默认连接 `http://127.0.0.1:2333`。在「设置 → 通用」可填写手机能访问的 ReMe 地址,例如
|
||
`http://203.0.113.10:2333`(将 IP 替换为你的服务地址)。点击「连接」后应用会保存地址,重启时自动连接。部署目标为 iOS 18.0 及以上。
|
||
[Apple 兼容机型](https://support.apple.com/en-us/104985)
|
||
|
||
## Android 与 iOS 共用的基建
|
||
|
||
| 位置 | 复用范围 |
|
||
| --- | --- |
|
||
| `client/` | Web 和移动端共用 `BrowserHost`、服务连接、HTTP/SSE、会话恢复、已读状态、文件操作和语音请求。 [共享客户端](../../client/src/reme-client.ts) · [BrowserHost](../../client/src/browser-host.ts) |
|
||
| `workbench/` | 共用页面、右推抽屉、二级菜单、Remy 首页、`/clear` 确认和录音交互。 [Workbench](../../workbench/src/workspace.tsx) · [移动样式](../../workbench/src/mobile.css) |
|
||
| `mobile/` | 两端共用 HTML/React 入口、Vite 配置和原生桥接口。 [移动入口](../src/main.tsx) · [原生桥](../src/native-bridge.ts) · [Vite 配置](../vite.config.mts) |
|
||
| `android/` 与 `ios/` | 各自打包 WebView 资源,处理系统权限、安全区、键盘和生命周期。 [Android 开发文档](../android/README.md) |
|
||
|
||
## iOS 宿主
|
||
|
||
- SwiftUI 承载 `WKWebView`。Xcode 构建 `safari18` 目标的共享页面,将页面打包到 App Bundle,并同步 ReMe 版本。 [静态资源加载](ReMeStudio/StudioAssets.swift) · [ReMe 版本](../../../reme/_version.py)
|
||
- 原生桥处理外链和状态栏主题。宿主只为内置页面的主 frame 处理麦克风授权,应用进入后台时释放录音。 [iOS 宿主](ReMeStudio/StudioViewController.swift)
|
||
- 共享客户端通过 iOS 的 `URLSession` 发送 HTTP 请求和接收 SSE。会话、工作区文件、模型凭据和后台任务由 ReMe 服务管理。 [服务配置](../../../reme/config/proactive.yaml)
|
||
|
||
## 构建与联调
|
||
|
||
准备 macOS、完整 Xcode、iOS Simulator runtime、Node.js 22.13+ 和仓库的 Python 开发环境。从仓库根目录安装 Studio 依赖。使用 Node 版本管理器时,可以从带有对应 PATH 的终端运行 `xcodebuild`,或者为 Xcode Build Settings 指定 `NODE_BINARY`。 [Xcode 模拟器组件](https://developer.apple.com/documentation/xcode/downloading-and-installing-additional-xcode-components) · [仓库环境说明](../../../AGENTS.md)
|
||
|
||
```bash
|
||
npm ci --prefix reme_studio
|
||
xcodebuild -version
|
||
xcrun simctl list devices available
|
||
```
|
||
|
||
在 Mac 上启动 ReMe 服务,或使用已经运行在 `2333` 上的服务。需要模型回复或语音时,在后端配置对应供应商。
|
||
|
||
```bash
|
||
reme start config=proactive
|
||
```
|
||
|
||
在 Xcode 打开 `reme_studio/mobile/ios/ReMeStudio.xcodeproj`,选择 `ReMeStudio` scheme 和 iPhone Simulator 后运行。在「设置 → 通用」确认服务显示「已连接」。也可从仓库根目录运行 UI 测试,验证地址保存和重启后自动连接。
|
||
测试默认使用本机服务,可通过 `TEST_RUNNER_REME_TEST_ENDPOINT` 指定其他可访问的地址。
|
||
|
||
```bash
|
||
xcodebuild -project reme_studio/mobile/ios/ReMeStudio.xcodeproj \
|
||
-scheme ReMeStudio -destination 'platform=iOS Simulator,id=<Simulator UDID>' \
|
||
-parallel-testing-enabled NO test
|
||
```
|
||
|
||
## 验收
|
||
|
||
| 环境 | 验收内容 |
|
||
| --- | --- |
|
||
| iPhone Simulator | 无服务时仍能打开内置页面。连接后验证分段显示流式回复、停止生成、`/clear` 确认、任务侧栏、随记写入和知识库文件。 |
|
||
| iPhone Simulator | 验证抽屉和二级菜单、深浅色、安全区和软键盘。重启或暂时断开网络后确认自动重连和会话同步。 |
|
||
| Android 回归 | 修改共享移动入口或样式后,检查 APK 打包和关键交互。 [Android 构建与验收](../android/README.md#构建与验收) |
|