@moretea-labs/forge 1.5.0-rc.1 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (264) hide show
  1. package/AGENTS.md +9 -11
  2. package/CHANGELOG.md +27 -1
  3. package/CLAUDE.md +8 -10
  4. package/DESIGN.md +278 -0
  5. package/README.md +70 -90
  6. package/README.zh-CN.md +52 -55
  7. package/SKILL.md +8 -11
  8. package/THIRD_PARTY_NOTICES.md +9 -3
  9. package/assets/branding/README.md +4 -2
  10. package/assets/hooks/lib/workflow-state.sh +19 -18
  11. package/assets/hooks/post-edit-guard.sh +6 -75
  12. package/assets/hooks/prompt-guard.sh +24 -12
  13. package/assets/hooks/session-start-context.sh +17 -17
  14. package/assets/hooks/stop-orchestrator.sh +2 -2
  15. package/assets/partials/04-project-structure.partial.md +6 -6
  16. package/assets/partials/05-workflow.partial.md +6 -6
  17. package/assets/partials/07-footer.partial.md +1 -1
  18. package/assets/partials/08-orchestration.partial.md +2 -2
  19. package/assets/partials-agents/02-operating-mode.partial.md +5 -5
  20. package/assets/partials-agents/03-orchestration.partial.md +3 -3
  21. package/assets/partials-agents/04-task-protocol.partial.md +3 -3
  22. package/assets/partials-agents/08-deep-docs.partial.md +1 -1
  23. package/assets/reference-configs/agentic-development-flow.md +49 -86
  24. package/assets/reference-configs/external-tooling.md +21 -61
  25. package/assets/reference-configs/handoff-protocol.md +25 -20
  26. package/assets/reference-configs/harness-overview.md +8 -8
  27. package/assets/skill-version.json +2 -2
  28. package/assets/templates/helpers/archive-workflow.sh +0 -1
  29. package/assets/templates/helpers/capture-plan.sh +3 -3
  30. package/assets/templates/helpers/check-task-workflow.sh +2 -2
  31. package/assets/templates/helpers/codex-handoff-resume.sh +5 -5
  32. package/assets/templates/helpers/ensure-task-workflow.sh +37 -35
  33. package/assets/templates/helpers/new-plan.sh +1 -1
  34. package/assets/templates/helpers/plan-to-todo.sh +2 -2
  35. package/assets/templates/helpers/prepare-codex-handoff.sh +2 -2
  36. package/assets/templates/helpers/prepare-handoff.sh +9 -9
  37. package/assets/templates/helpers/refresh-current-status.sh +2 -2
  38. package/assets/templates/helpers/ship-worktrees.sh +1 -1
  39. package/assets/templates/helpers/sprint-backlog.sh +1 -1
  40. package/assets/templates/helpers/verify-sprint.sh +7 -7
  41. package/assets/templates/helpers/workstream-sync.sh +1 -1
  42. package/assets/templates/plan.template.md +1 -1
  43. package/assets/workflow-contract.v1.json +6 -3
  44. package/docs/architecture/current/README.md +10 -9
  45. package/docs/architecture/current/approved-target-architecture.zh-CN.md +2 -2
  46. package/docs/architecture/current/architecture-invariants.md +2 -2
  47. package/docs/architecture/current/automation-and-schedule-engine.md +15 -15
  48. package/docs/architecture/current/codegraph-context-provider.md +2 -2
  49. package/docs/architecture/current/control-plane-authority-inventory.md +12 -0
  50. package/docs/architecture/current/dispatch-and-agent-strategy.md +11 -11
  51. package/docs/architecture/current/entity-model.md +0 -27
  52. package/docs/architecture/current/failure-recovery.md +0 -24
  53. package/docs/architecture/current/governance.md +1 -1
  54. package/docs/architecture/current/implementation-status.md +1 -1
  55. package/docs/architecture/current/legacy-governance.md +58 -0
  56. package/docs/architecture/current/multi-repository-execution.md +1 -1
  57. package/docs/architecture/current/peer-supercontroller-runtime.md +1 -1
  58. package/docs/architecture/current/personal-assistant-plugin-baseline.md +4 -5
  59. package/docs/architecture/current/scheduler-and-resource-claims.md +0 -10
  60. package/docs/architecture/current/target-requirements-traceability.md +2 -2
  61. package/docs/architecture/current/thin-harness-governance-policy.md +1 -1
  62. package/docs/architecture/current/thin-harness-v1.md +9 -11
  63. package/docs/architecture/domains/runtime-harness.md +1 -1
  64. package/docs/forge-autonomous-goal-loop.md +3 -1
  65. package/docs/forge-chatgpt-mcp-setup.md +67 -176
  66. package/docs/images/forge-banner-cn.svg +26 -1
  67. package/docs/images/forge-banner.svg +26 -1
  68. package/docs/operations/features.md +1 -1
  69. package/docs/operations/homebrew.md +3 -3
  70. package/docs/operations/mcp-tool-exposure.md +5 -5
  71. package/docs/operations/platform-support.md +45 -37
  72. package/docs/operations/platform-support.zh-CN.md +40 -38
  73. package/docs/operations/releasing.md +3 -3
  74. package/docs/operations/releasing.zh-CN.md +3 -3
  75. package/docs/operations/troubleshooting.md +11 -6
  76. package/docs/operations/troubleshooting.zh-CN.md +11 -6
  77. package/docs/public-usage-guide.md +28 -21
  78. package/docs/public-usage-guide.zh-CN.md +28 -21
  79. package/docs/tutorials/01-install-and-start.md +58 -35
  80. package/docs/tutorials/01-install-and-start.zh-CN.md +58 -35
  81. package/docs/tutorials/02-connect-chatgpt.md +118 -46
  82. package/docs/tutorials/02-connect-chatgpt.zh-CN.md +119 -45
  83. package/docs/wiki/Architecture.md +1 -1
  84. package/docs/wiki/Installation.md +2 -2
  85. package/docs/wiki/Quick-Start.md +1 -1
  86. package/docs/wiki/Work-Lifecycle.md +1 -1
  87. package/install.ps1 +4 -5
  88. package/install.sh +4 -6
  89. package/package.json +15 -5
  90. package/scripts/archive-workflow.sh +0 -1
  91. package/scripts/benchmark-thin-harness-mcp-e2e.ts +27 -14
  92. package/scripts/build-controller-ui.ts +28 -0
  93. package/scripts/capture-plan.sh +4 -4
  94. package/scripts/check-agent-tooling.sh +12 -1
  95. package/scripts/check-platform-support.mjs +2 -2
  96. package/scripts/check-public-docs.sh +16 -5
  97. package/scripts/check-release-readiness.sh +5 -11
  98. package/scripts/check-runtime-architecture.mjs +14 -22
  99. package/scripts/check-tarball-install-smoke.sh +3 -2
  100. package/scripts/check-task-workflow.sh +2 -2
  101. package/scripts/codex-handoff-resume.sh +5 -5
  102. package/scripts/create-project-dirs.sh +3 -3
  103. package/scripts/ensure-task-workflow.sh +45 -35
  104. package/scripts/init-project.sh +4 -4
  105. package/scripts/install-desktop-operator-registration.ts +2 -2
  106. package/scripts/lib/project-init-lib.sh +46 -44
  107. package/scripts/migrate-project-template.sh +7 -4
  108. package/scripts/new-plan.sh +1 -1
  109. package/scripts/plan-to-todo.sh +2 -2
  110. package/scripts/prepare-codex-handoff.sh +2 -2
  111. package/scripts/prepare-handoff.sh +9 -9
  112. package/scripts/refresh-current-status.sh +2 -2
  113. package/scripts/setup-plugins.sh +3 -3
  114. package/scripts/ship-worktrees.sh +1 -1
  115. package/scripts/sprint-backlog.sh +5 -5
  116. package/scripts/sync-codex-installed-copies.sh +2 -3
  117. package/scripts/verify-sprint.sh +7 -7
  118. package/scripts/workstream-sync.sh +1 -1
  119. package/src/cli/chatgpt-browser/bridge-extension.ts +1 -1
  120. package/src/cli/chatgpt-browser/bridge-provider.ts +29 -0
  121. package/src/cli/chatgpt-browser/file-policy.ts +3 -1
  122. package/src/cli/commands/chatgpt.ts +51 -0
  123. package/src/cli/commands/doctor.ts +1 -1
  124. package/src/cli/commands/init-hook.ts +213 -70
  125. package/src/cli/commands/init.ts +5 -6
  126. package/src/cli/commands/mcp.ts +31 -5
  127. package/src/cli/commands/runtime.ts +61 -8
  128. package/src/cli/commands/setup-profile.ts +472 -0
  129. package/src/cli/controller/check-runner.ts +20 -3
  130. package/src/cli/controller/codex-continuation.ts +4 -7
  131. package/src/cli/controller/context-pack.ts +118 -14
  132. package/src/cli/controller/operational-plan.ts +4 -4
  133. package/src/cli/controller/task-ledger.ts +10 -10
  134. package/src/cli/controller/work-mode.ts +6 -13
  135. package/src/cli/index.ts +14 -35
  136. package/src/cli/local-bridge/connector-freshness.ts +1 -1
  137. package/src/cli/local-bridge/console-assets.ts +17 -0
  138. package/src/cli/local-bridge/console-automations.ts +160 -0
  139. package/src/cli/local-bridge/dashboard.ts +8 -1303
  140. package/src/cli/local-bridge/facade-api.ts +16 -7
  141. package/src/cli/local-bridge/frontend/src/App.tsx +10 -0
  142. package/src/cli/local-bridge/frontend/src/components/Button.tsx +1 -0
  143. package/src/cli/local-bridge/frontend/src/components/DetailPane.tsx +3 -0
  144. package/src/cli/local-bridge/frontend/src/components/SearchField.tsx +1 -0
  145. package/src/cli/local-bridge/frontend/src/components/SectionHeader.tsx +1 -0
  146. package/src/cli/local-bridge/frontend/src/components/Segmented.tsx +1 -0
  147. package/src/cli/local-bridge/frontend/src/components/StatusText.tsx +3 -0
  148. package/src/cli/local-bridge/frontend/src/design/icons.tsx +11 -0
  149. package/src/cli/local-bridge/frontend/src/design/tokens.css +8 -0
  150. package/src/cli/local-bridge/frontend/src/features/automations/AutomationsView.tsx +3 -0
  151. package/src/cli/local-bridge/frontend/src/features/capabilities/CapabilitiesView.tsx +4 -0
  152. package/src/cli/local-bridge/frontend/src/features/overview/OverviewView.tsx +3 -0
  153. package/src/cli/local-bridge/frontend/src/features/repositories/RepositoriesView.tsx +2 -0
  154. package/src/cli/local-bridge/frontend/src/features/settings/SettingsView.tsx +2 -0
  155. package/src/cli/local-bridge/frontend/src/features/system/SystemView.tsx +2 -0
  156. package/src/cli/local-bridge/frontend/src/features/work/WorkView.tsx +3 -0
  157. package/src/cli/local-bridge/frontend/src/lib/api.ts +23 -0
  158. package/src/cli/local-bridge/frontend/src/lib/format.ts +4 -0
  159. package/src/cli/local-bridge/frontend/src/lib/routes.ts +7 -0
  160. package/src/cli/local-bridge/frontend/src/main.tsx +1 -0
  161. package/src/cli/local-bridge/frontend/src/shell/AppShell.tsx +1 -0
  162. package/src/cli/local-bridge/frontend/src/shell/CommandBar.tsx +2 -0
  163. package/src/cli/local-bridge/frontend/src/shell/Sidebar.tsx +3 -0
  164. package/src/cli/local-bridge/frontend/src/styles.css +12 -0
  165. package/src/cli/local-bridge/frontend/src/types.ts +14 -0
  166. package/src/cli/local-bridge/frontend/src/vite-env.d.ts +1 -0
  167. package/src/cli/local-bridge/frontend/vite.config.ts +27 -0
  168. package/src/cli/local-bridge/server.ts +45 -0
  169. package/src/cli/local-bridge/ui-dist/app.css +1 -0
  170. package/src/cli/local-bridge/ui-dist/app.js +11094 -0
  171. package/src/cli/mcp/auth.ts +2 -0
  172. package/src/cli/mcp/instructions.ts +3 -3
  173. package/src/cli/mcp/legacy-tool-service.ts +27 -23
  174. package/src/cli/mcp/multi-repository.ts +2 -0
  175. package/src/cli/mcp/policy.ts +7 -5
  176. package/src/cli/mcp/repository-tools.ts +53 -14
  177. package/src/cli/mcp/server.ts +5 -10
  178. package/src/cli/mcp/setup.ts +220 -276
  179. package/src/cli/mcp/tool-capability-cache.ts +1 -1
  180. package/src/cli/mcp/toolset-names.ts +1 -1
  181. package/src/cli/mcp/toolset.ts +0 -1
  182. package/src/cli/mcp/transports/http.ts +51 -4
  183. package/src/cli/repositories/branch-name-policy.ts +0 -7
  184. package/src/cli/repositories/controller-home.ts +110 -3
  185. package/src/cli/repositories/safe-patch.ts +1 -1
  186. package/src/cli/repositories/selected-path-actions.ts +26 -24
  187. package/src/core/adoption/gitignore-plan.ts +2 -3
  188. package/src/core/adoption/plan.ts +4 -1
  189. package/src/runtime/control-plane/execution/edit-validation-coordinator.ts +556 -0
  190. package/src/runtime/control-plane/execution/work-handle-store.ts +128 -1
  191. package/src/runtime/control-plane/execution/work-validation-reconciler.ts +277 -0
  192. package/src/runtime/control-plane/execution/work-verification-snapshot.ts +169 -0
  193. package/src/runtime/control-plane/facade/capability-registry.ts +0 -10
  194. package/src/runtime/control-plane/facade/handoff-inbox-store.ts +44 -25
  195. package/src/runtime/control-plane/facade/suggested-actions.ts +7 -1
  196. package/src/runtime/control-plane/facade/types.ts +0 -1
  197. package/src/runtime/control-plane/global-scheduler/scheduler.ts +30 -8
  198. package/src/runtime/control-plane/launcher/chatgpt-work-binding-store.ts +114 -0
  199. package/src/runtime/control-plane/launcher/chatgpt-work-continuation.ts +175 -0
  200. package/src/runtime/control-plane/launcher/launch-reservation-store.ts +161 -0
  201. package/src/runtime/control-plane/launcher/provider-mcp-bootstrap.ts +64 -0
  202. package/src/runtime/control-plane/launcher/thin-launcher.ts +117 -24
  203. package/src/runtime/control-plane/routing/route-policy.ts +14 -14
  204. package/src/runtime/control-plane/runtime-cleanup.ts +0 -1
  205. package/src/runtime/evidence/event-ledger.ts +1 -1
  206. package/src/runtime/{workflow/campaigns/workspace.ts → execution/managed-workspace.ts} +41 -43
  207. package/src/runtime/execution/process-runtime/check-facade.ts +6 -0
  208. package/src/runtime/execution/process-runtime/check-result.ts +45 -0
  209. package/src/runtime/execution/process-runtime/check-runner-sidecar.ts +42 -16
  210. package/src/runtime/execution/process-runtime/command-facade.ts +4 -2
  211. package/src/runtime/execution/process-runtime/gc.ts +1 -1
  212. package/src/runtime/execution/process-runtime/index.ts +3 -0
  213. package/src/runtime/execution/process-runtime/interactive-admission.ts +14 -5
  214. package/src/runtime/execution/process-runtime/persisted-check.ts +285 -0
  215. package/src/runtime/execution/process-runtime/resource-claims.ts +30 -0
  216. package/src/runtime/execution/process-runtime/runtime.ts +18 -1
  217. package/src/runtime/execution/process-runtime/store.ts +1 -19
  218. package/src/runtime/execution/process-runtime/types.ts +4 -0
  219. package/src/runtime/execution/thin-harness/execution-router.ts +0 -1
  220. package/src/runtime/execution/thin-harness/fast-executor.ts +1 -1
  221. package/src/runtime/execution/thin-harness/lightweight-lanes.ts +1 -2
  222. package/src/runtime/execution/thin-harness/types.ts +0 -1
  223. package/src/runtime/execution/workers/executor.ts +1 -1
  224. package/src/runtime/gateway/mcp/execution-tools.ts +1 -1
  225. package/src/runtime/gateway/mcp/persisted-check-process.ts +3 -255
  226. package/src/runtime/gateway/mcp/process-tools.ts +16 -3
  227. package/src/runtime/gateway/mcp/resource-policy.ts +0 -9
  228. package/src/runtime/gateway/mcp/router.ts +117 -182
  229. package/src/runtime/gateway/mcp/runtime-tools.ts +331 -409
  230. package/src/runtime/gateway/mcp/work-validation-reconciler.ts +1 -219
  231. package/src/runtime/plugins/browser-adapter.ts +5 -0
  232. package/src/runtime/plugins/desktop-operator-registration.ts +1 -1
  233. package/src/runtime/plugins/store.ts +14 -6
  234. package/src/runtime/plugins/types.ts +1 -1
  235. package/src/runtime/projections/materialized-view.ts +1 -23
  236. package/src/runtime/recovery/maintenance-executor.ts +9 -0
  237. package/src/runtime/resources/ownership.ts +0 -1
  238. package/src/runtime/root/gateway-adapter.ts +2 -0
  239. package/src/runtime/root/mcp-transport.ts +10 -2
  240. package/src/runtime/root/package-connector-service.ts +136 -0
  241. package/src/runtime/root/package-runtime-release.ts +161 -0
  242. package/src/runtime/root/package-runtime-service.ts +185 -0
  243. package/src/runtime/root/release-materialize.ts +19 -0
  244. package/src/runtime/root/runtime.ts +2 -1
  245. package/src/runtime/root/scheduler.ts +5 -0
  246. package/src/runtime/root/service.ts +18 -5
  247. package/src/runtime/standalone-recovery/core.ts +65 -16
  248. package/src/runtime/workflow/findings/store.ts +145 -106
  249. package/src/runtime/workflow/findings/types.ts +22 -0
  250. package/src/runtime/workflow/schedules/engine.ts +132 -2
  251. package/src/runtime/workflow/schedules/pending-activation.ts +139 -0
  252. package/src/runtime/workflow/schedules/work-continuation.ts +218 -0
  253. package/docs/CHANGELOG.md +0 -978
  254. package/docs/README.zh-CN.md +0 -58
  255. package/scripts/smoke-chatgpt-supervised-automation.ts +0 -208
  256. package/src/cli/commands/controller.ts +0 -680
  257. package/src/runtime/workflow/campaigns/cleanup.ts +0 -263
  258. package/src/runtime/workflow/campaigns/engine.ts +0 -112
  259. package/src/runtime/workflow/campaigns/normalize.ts +0 -100
  260. package/src/runtime/workflow/campaigns/review.ts +0 -315
  261. package/src/runtime/workflow/campaigns/store.ts +0 -526
  262. package/src/runtime/workflow/campaigns/supervisor.ts +0 -112
  263. package/src/runtime/workflow/campaigns/types.ts +0 -290
  264. /package/src/runtime/{workflow/campaigns → execution}/workspace-agent.ts +0 -0
@@ -1,61 +1,63 @@
1
- # 平台支持说明
1
+ # 平台支持
2
2
 
3
- 本文定义项目当前真正承诺的平台范围。代码中存在 Windows 分支并不等于所有流程都已在 Windows 原生环境验证;只有安装、主要工作流和发布检查均覆盖的范围才称为支持。
3
+ 本文描述 Forge **普通 package 用户路径**的真实支持范围,并把源码/维护者基础设施与首次使用依赖分开,避免用户为了使用 Forge 被迫安装开发工具链。
4
4
 
5
5
  ## 支持矩阵
6
6
 
7
- | 平台 | 状态 | 建议用途 |
7
+ | 平台 | 状态 | 普通用户路径 |
8
8
  | --- | --- | --- |
9
- | macOS | 支持 | 完整本地 Controller、仓库接入、MCP、Direct Edit、Agent、浏览器能力和发布检查。 |
10
- | 现代 Linux | 支持 | 完整本地 Controller 工作流,需要 Bash、Git、Node.js 和常见进程工具。 |
11
- | Windows + WSL2 | 支持,且是 Windows 推荐方案 | 在 WSL2 内按 Linux 流程运行,仓库建议放在 WSL 文件系统。 |
12
- | Windows 原生 PowerShell | 预览支持 | 支持安装、CLI、doctor、仓库注册/读取和可移植运行时路径;依赖 Bash 的流程仍有限制。 |
9
+ | macOS | 支持 | Package 安装、主控优先 setup、launchd Package Runtime、仓库/普通目录、MCP、Browser/Desktop 与插件。 |
10
+ | 现代 Linux | 支持 | Package 安装、主控优先 setup、优先 `systemd --user` 的 Package Runtime、仓库/普通目录、MCP 与可移植 Provider。 |
11
+ | Windows + WSL2 | 支持且为 Windows 推荐路径 | Forge Runtime 在 WSL2 内按 Linux 方式运行;Windows 仍可承载 ChatGPT/浏览器客户端。 |
12
+ | Windows 原生 | 预览 | Package 安装、setup、portable Runtime/MCP、仓库注册/读取和可移植能力;暂不宣称重启后 Runtime 自动持久化和所有外部 Provider 组合都完整。 |
13
13
 
14
- ## 基础环境
14
+ ## 基础安装依赖
15
15
 
16
- 所有安装方式都需要:
16
+ 普通安装只要求:
17
17
 
18
- - Git 已加入 `PATH`;
19
- - Node.js 20.10 或更高版本,因为发布后的 `forge` 启动器由 Node 执行;
20
- - npm(随 Node.js 安装)或 Bun 1.0+,用于安装 package;
21
- - 可写的用户主目录。
18
+ - Node.js 20.10 或更高;
19
+ - npm(Node 自带)或 Bun;
20
+ - 可写用户目录。
22
21
 
23
- Bun 是开发和完整测试的推荐执行器,但不再是唯一安装器。
22
+ **Git 只在启用仓库/软件开发能力时才需要。** 普通 package 用户不要求 Bun、Forge 源码 checkout、CodeGraph、Codex、Claude、Standalone Recovery、Cloudflare、Tailscale 或 OpenAI tunnel-client。
24
23
 
25
- 以下环境按功能选装:
24
+ 按能力才出现的依赖包括:Git 仓库操作;明确选择的 Codex/Claude 主控或执行入口;GitHub CLI;Browser/Desktop 平台依赖;Google/Apple 等账号凭证;以及远程主控连接本机 MCP 时选择的 tunnel/provider。
26
25
 
27
- - Codex 或 Claude CLI:委派复杂代码实现;
28
- - GitHub CLI `gh`:GitHub Issue、Project 和云端 Agent;
29
- - Tailscale Funnel 或 `cloudflared`:稳定公网 HTTPS `/mcp` 地址;
30
- - Playwright 浏览器依赖:浏览器自动化;
31
- - CodeGraph:额外代码导航;
32
- - Google Workspace 凭据:Gmail、Calendar 插件。
26
+ ## 各平台 Runtime owner
33
27
 
34
- ## Windows 原生支持范围
28
+ 普通用户使用:
35
29
 
36
- Windows PowerShell 路径当前发布验证覆盖:
30
+ ```bash
31
+ forge runtime service install-package
32
+ ```
37
33
 
38
- - 前置环境检查和 CLI 安装;
39
- - `forge --version`、命令加载与 `forge doctor`;
40
- - 仓库注册表;
41
- - 可移植测试覆盖的 Windows 路径、进程、junction 和命令处理;
42
- - 不依赖 Bash helper 的默认 MCP facade 与有边界仓库操作。
34
+ 它会对已安装 `@moretea-labs/forge` 的 Runtime 表面做内容指纹;package 内容与记录身份不一致时拒绝启动,而不是静默跨版本执行。
43
35
 
44
- 暂不宣称完整原生支持:
36
+ - **macOS:** launchd 用户服务。
37
+ - **Linux / WSL2 且 user systemd 可用:** `systemd --user`,异常退出自动重启。
38
+ - **Linux 无 user systemd:** 明确退化为 portable detached-session,并提示不具备重启持久化。
39
+ - **Windows 原生:** 当前是 portable user-process 预览,不宣称重启持久化。
45
40
 
46
- - Bash 编写的仓库迁移和 Hook 脚本;
47
- - 完整源码发布 Bash 门禁;
48
- - CodeGraph 自动配置;
49
- - 所有 Agent CLI 与隧道组合。
41
+ `forge runtime service install --repo ...` 的 Git/source immutable release 路径和 Standalone Recovery 都属于高级维护能力,不是普通用户初始化依赖。
50
42
 
51
- 这些场景请使用 WSL2。原生安装流程会主动跳过 Bash skill 同步和未验证的 CodeGraph 自动配置,而不是让整体安装失败。
43
+ ## ChatGPT / 远程 MCP 连接方式
52
44
 
53
- ## WSL2 使用建议
45
+ Forge MCP 始终保持 loopback。远程主控明确选择一种连接方式:
54
46
 
55
- 在 WSL2 内安装 Git、Node.js 和可选的 Bun,并将仓库放在 Linux 主目录,例如 `~/src/project`。不要让同一个 checkout 交替由 Windows 和 WSL 操作,否则文件权限、符号链接、换行符和运行时路径可能漂移。
47
+ | Provider | 是否需要公网入站 | 典型用途 |
48
+ | --- | --- | --- |
49
+ | OpenAI Secure MCP Tunnel | 不需要 | OpenAI 组织有 tunnel 权限时优先;使用官方 `tunnel-client`,Forge 只记录非秘密 tunnel ID。 |
50
+ | Cloudflare Tunnel | 是 / HTTPS 互联网可达 | 用户管理 Cloudflare 账号/域名,需要稳定 named HTTPS endpoint。 |
51
+ | Tailscale Funnel | 是 / HTTPS 互联网可达 | 已有兼容 Tailscale 环境。 |
52
+ | 已有 HTTPS `/mcp` | 取决于用户基础设施 | 用户已有反代或 tunnel。 |
53
+ | None | 不需要 | 本地主控,或稍后再接远程。 |
54
+
55
+ setup 会检测操作系统与 provider CLI,不会假定所有用户都是 macOS + Homebrew。第三方登录始终由用户明确完成,Forge 不要求把账号密码/API key 粘贴进 setup。
56
+
57
+ ## Windows 原生范围
56
58
 
57
- ChatGPT 客户端和浏览器仍可运行在 Windows 主机;Controller 与 MCP 运行在 WSL2,只通过受控 HTTPS 隧道公开 MCP endpoint。
59
+ PowerShell 路径会检查安装器/CLI、doctor、setup/profile、仓库 Registry、Windows 路径/进程和 portable Node 行为。依赖 Bash 的仓库迁移、所有 Browser/Provider 组合,以及 Windows 持久 Service owner 仍不属于完整支持;这些场景优先使用 WSL2。
58
60
 
59
61
  ## 验证边界
60
62
 
61
- 仓库提供 `windows-latest` smoke workflow,验证 PowerShell dry-run、安装契约、Windows 默认策略和 Node 可移植测试。它证明的是上述有边界范围,不代表所有 Bash 或外部 Provider 集成都已原生 Windows 验证。
63
+ 仓库有平台/public-doc 检查和 Windows smoke。这里的“支持”只代表列出的主路径有验证证据,不表示每台机器都已安装每个第三方 Provider。
@@ -72,13 +72,13 @@ The tag workflow uses GitHub OIDC and does not require `NODE_AUTH_TOKEN` or a st
72
72
 
73
73
  ## Stable release
74
74
 
75
- Before `1.4.0`:
75
+ Before a stable `X.Y.Z` release:
76
76
 
77
77
  - install the exact packed artifact on macOS, Linux, WSL2, and the supported Windows path;
78
- - verify `forge init`, `forge doctor`, repository registration/adoption, and the ChatGPT MCP connection;
78
+ - verify `forge install`, `forge doctor`, repository registration/adoption, and the ChatGPT MCP connection;
79
79
  - confirm no RC-only warning or unstable install command remains in the stable docs;
80
80
  - change `package.json` from an RC version to the intended stable `X.Y.Z`; the package identity gate will require `latest`;
81
- - publish from tag `v1.4.0` through the protected environment;
81
+ - publish from the exact `vX.Y.Z` tag through the protected environment;
82
82
  - only then create or update the Homebrew tap formula.
83
83
 
84
84
  ## Rollback and incident rule
@@ -72,13 +72,13 @@ Tag workflow 使用 GitHub OIDC,不需要 `NODE_AUTH_TOKEN` 或仓库内 npm t
72
72
 
73
73
  ## 稳定版要求
74
74
 
75
- 发布 `1.4.0` 前:
75
+ 发布稳定版 `X.Y.Z` 前:
76
76
 
77
77
  - 在 macOS、Linux、WSL2 和已声明的 Windows 路径安装精确 packed artifact;
78
- - 验证 `forge init`、`forge doctor`、仓库注册/接入和 ChatGPT MCP 连接;
78
+ - 验证 `forge install`、`forge doctor`、仓库注册/接入和 ChatGPT MCP 连接;
79
79
  - 确认稳定文档中没有 RC 专属警告或不稳定安装命令;
80
80
  - 把 `package.json` 从 RC 版本改为目标稳定版 `X.Y.Z`,package identity gate 会要求 `latest`;
81
- - 从受保护环境发布 tag `v1.4.0`;
81
+ - 从受保护环境发布精确 tag `vX.Y.Z`;
82
82
  - 完成后才创建或更新 Homebrew tap formula。
83
83
 
84
84
  ## 回滚与事故规则
@@ -15,7 +15,7 @@ forge --version
15
15
 
16
16
  ## Doctor reports missing Git or Node
17
17
 
18
- Install Git and Node.js 20.10 or newer, then open a new terminal. Node is required even when the package was installed with Bun because the published launcher uses Node.
18
+ Node.js 20.10 or newer is a base requirement even when the package was installed with Bun. Git is **not** a base installation requirement; install Git when you enable repository/software-work features. If plain `forge setup` is blocked only by an unselected Codex/Claude/CodeGraph check, update Forge—the controller-first setup path should filter unrelated host tooling.
19
19
 
20
20
  ## Native Windows stops at a shell-owned step
21
21
 
@@ -23,7 +23,12 @@ Use WSL2 for repository adoption, Bash hooks, source release checks, or shell li
23
23
 
24
24
  ## MCP works locally but ChatGPT cannot connect
25
25
 
26
- `http://127.0.0.1:8765/mcp` is local-only. ChatGPT needs a stable public HTTPS URL ending in `/mcp`. Check the tunnel, the exact path, and `forge mcp doctor`. Do not expose the local Controller UI port publicly.
26
+ `http://127.0.0.1:8765/mcp` is intentionally local-only. Run `forge setup next` and inspect the selected remote provider.
27
+
28
+ - **OpenAI Secure MCP Tunnel:** run `tunnel-client runtimes status forge --json`; do not claim success unless the runtime is running, healthy, and ready. Keep `CONTROL_PLANE_API_KEY` outside Forge state.
29
+ - **Cloudflare/Tailscale/existing HTTPS:** verify the stable `/mcp` address and OAuth discovery with `forge mcp doctor` plus the provider's own status tools.
30
+
31
+ Do not expose the local Utility Console port publicly.
27
32
 
28
33
  ## MCP config seems to be in the wrong place
29
34
 
@@ -35,11 +40,11 @@ Current service-level MCP config lives under Controller Home, not as the primary
35
40
  - `controllerHome/mcp/mcp.oauth-tokens.json`
36
41
  - `controllerHome/mcp/mcp.runtime.json`
37
42
 
38
- Controller Home is the sole authority for service-level MCP configuration. Repository-scoped `.forge/mcp.policy.json` remains the repository access policy; repository-local service configuration is unsupported. Rerun `forge mcp setup chatgpt --repo /path/to/your-project`, then verify the active endpoint and server name from Controller Home.
43
+ Controller Home is the sole authority for service-level MCP configuration. Repository-scoped `.forge/mcp.policy.json` remains repository access policy. For the normal ChatGPT path rerun `forge mcp setup chatgpt --user-level` or simply `forge setup next`; repository-scoped setup remains a compatibility path.
39
44
 
40
45
  ## Only some tools appear in ChatGPT
41
46
 
42
- The default controller uses a stable repair-capable schema (normally 100–128 tools). Request/Full Access never changes that schema. Compare `expectedToolCount`, `actualToolCount`, `missingTools`, `unexpectedTools`, and the fingerprint from `rh_status` or `controller_ready`. Reconnect only when the Connector snapshot itself is stale, not after a permission change.
47
+ The default controller intentionally exposes a bounded stable facade rather than every atomic internal handler. Request/Full Access changes authorization, not the tool schema. Compare the current fingerprint and missing/unexpected tools from `rh_status`; refresh/recreate the ChatGPT app only when the connector snapshot itself is stale or tool definitions changed.
43
48
 
44
49
  ## Runtime storage is not ready or the Local UI looks stale
45
50
 
@@ -59,9 +64,9 @@ If you are using the operator surfaces, inspect the runtime-maintenance path bef
59
64
 
60
65
  A `502`, reconnect, or truncated response does not prove a durable write failed. Confirm the Job, Run, or evidence summary before retrying the mutation.
61
66
 
62
- ## Agent delegation is unavailable
67
+ ## Codex or Claude controller entry is unavailable
63
68
 
64
- Core Direct Edit and repository workflows still work. Install and authenticate Codex or Claude, then restart MCP with the dev runner explicitly enabled. Do not enable agent flags in the basic setup unless the CLI is present.
69
+ Forge has no internal agent that must be repaired. If Codex/Claude was not selected, ignore its absence. If it was explicitly selected as a controller entry, install/authenticate that client and run `forge mcp setup codex --scope user --profile controller` or `forge mcp setup claude --scope user --profile controller`, then continue with `forge setup next`.
65
70
 
66
71
  ## Repository paths behave differently between Windows and WSL2
67
72
 
@@ -13,7 +13,7 @@ forge --version
13
13
 
14
14
  ## Doctor 提示缺少 Git 或 Node
15
15
 
16
- 安装 Git 和 Node.js 20.10+ 后重新打开终端。即使 package 由 Bun 安装,发布后的启动器仍由 Node 执行,因此 Node 是基础依赖。
16
+ Node.js 20.10+ 是基础依赖,即使 package 由 Bun 安装也需要 Node。Git **不是**基础安装依赖;只有启用仓库/软件开发能力时才需要。如果普通 `forge setup` 只是被未选择的 Codex/Claude/CodeGraph 检查挡住,应更新 Forge——主控优先 setup 会过滤无关 host tooling。
17
17
 
18
18
  ## Windows 原生流程停在 shell 步骤
19
19
 
@@ -21,7 +21,12 @@ forge --version
21
21
 
22
22
  ## 本机 MCP 正常,但 ChatGPT 无法连接
23
23
 
24
- `http://127.0.0.1:8765/mcp` 只能本机访问。ChatGPT 需要稳定的公网 HTTPS `/mcp` 地址。检查隧道、路径和 `forge mcp doctor`。不要把本地 Controller UI 端口暴露到公网。
24
+ `http://127.0.0.1:8765/mcp` 本来就只允许本机访问。执行 `forge setup next` 并检查当前选择的远程 provider。
25
+
26
+ - **OpenAI Secure MCP Tunnel:** 执行 `tunnel-client runtimes status forge --json`;只有 runtime 同时 running、healthy、ready 才算成功。`CONTROL_PLANE_API_KEY` 不进入 Forge state。
27
+ - **Cloudflare/Tailscale/已有 HTTPS:** 检查稳定 `/mcp` 地址、Provider 状态以及 `forge mcp doctor`。
28
+
29
+ 不要把本地 Utility Console 端口暴露到公网。
25
30
 
26
31
  ## MCP 配置看起来写到了错误的位置
27
32
 
@@ -33,11 +38,11 @@ forge --version
33
38
  - `controllerHome/mcp/mcp.oauth-tokens.json`
34
39
  - `controllerHome/mcp/mcp.runtime.json`
35
40
 
36
- Controller Home 是 service-level MCP 配置的唯一权威来源;仓库级 `.forge/mcp.policy.json` 仍是仓库访问策略。仓库内的 service 配置不再受支持。重新执行 `forge mcp setup chatgpt --repo /path/to/your-project` 后,从 Controller Home 核对当前 endpoint 与 server name。
41
+ Controller Home 是 service-level MCP 配置的唯一权威来源;仓库级 `.forge/mcp.policy.json` 仍是仓库访问策略。普通 ChatGPT 路径重新执行 `forge mcp setup chatgpt --user-level`,或直接继续 `forge setup next`;repo-scoped setup 仅保留兼容入口。
37
42
 
38
43
  ## ChatGPT 只显示少量工具
39
44
 
40
- 默认 Controller 使用固定、可修复的工具 schema(通常 100–128 个工具)。Request/Full Access 不会改变 schema。请从 `rh_status` 或 `controller_ready` 对比 `expectedToolCount`、`actualToolCount`、缺失/意外工具和 fingerprint;只有 Connector 快照本身过期时才需要重连,权限切换不需要。
45
+ 默认 Controller 故意暴露收敛后的稳定 facade,而不是所有内部原子 handler。Request/Full Access 改变授权,不改变工具 schema。通过 `rh_status` 检查 fingerprint 和缺失/意外工具;只有 ChatGPT app 的工具快照过期或定义发生变化时才刷新/重建。
41
46
 
42
47
  ## runtime storage 未就绪,或本地 UI 看起来是旧状态
43
48
 
@@ -57,9 +62,9 @@ forge repo list --json
57
62
 
58
63
  看到 `502`、重连或大结果截断,不代表 durable 写入一定失败;先回到 Job、Run 或证据摘要确认真实状态。
59
64
 
60
- ## 无法委派 Agent
65
+ ## Codex 或 Claude 控制入口不可用
61
66
 
62
- 核心 Direct Edit 和仓库工作流仍可使用。安装并登录 Codex 或 Claude 后,再显式开启 dev runner。基础配置不应默认加入 Agent 参数。
67
+ Forge 没有一个必须修复的内部 Agent。没有选择 Codex/Claude 时直接忽略它们;明确选择为主控后,才安装/登录对应客户端,并执行 `forge mcp setup codex --scope user --profile controller` 或 `forge mcp setup claude --scope user --profile controller`,随后继续 `forge setup next`。
63
68
 
64
69
  ## Windows 与 WSL2 路径行为不一致
65
70
 
@@ -1,33 +1,40 @@
1
1
  # Public Usage Guide
2
2
 
3
- Use this page when you want the shortest current path through Forge without reading the entire docs tree first.
3
+ Use this page for the shortest current Forge path.
4
4
 
5
- ## Fast path
5
+ ## 1. Install and choose the external controller
6
6
 
7
- 1. [Install and start](tutorials/01-install-and-start.md)
8
- 2. [Connect ChatGPT](tutorials/02-connect-chatgpt.md)
9
- 3. [Complete the first repository task](tutorials/03-first-repository-task.md)
7
+ ```bash
8
+ npm install -g @moretea-labs/forge
9
+ forge setup
10
+ ```
10
11
 
11
- ## What Forge is
12
+ Forge has no internal AI brain. Choose one primary external controller; ChatGPT is recommended, while Codex, Claude, or another MCP client can be selected explicitly. Multiple controller entries may be configured without turning unselected clients into dependencies.
12
13
 
13
- Forge is a local execution bridge that lets ChatGPT work on one or more repositories through a stable, bounded tool schema. The preferred orchestration tools are `rh_status`, `rh_access`, `rh_context`, `rh_work`, and `rh_inbox`, while the default schema also exposes practical Direct Edit, command, Git, Agent, Campaign, iOS, plugin, artifact, and recovery entry points.
14
+ ```bash
15
+ forge setup configure --controller chatgpt --tunnel auto
16
+ forge setup next
17
+ ```
14
18
 
15
- Direct Edit is the default for small known changes. `quick_agent_session` provides a direct local Codex/Claude path without requiring an Issue or Task. Durable Issue → Task → Run flows remain available for work that must survive sessions, carry dependencies, or preserve formal review evidence. Request/Full Access changes approval behavior only and never requires reconnecting the MCP Connector.
19
+ ## 2. Follow setup until the selected path is usable
16
20
 
17
- ## Current runtime facts
21
+ For ChatGPT, `--tunnel auto` prefers OpenAI Secure MCP Tunnel and does not silently switch to a public ingress provider just because one is installed. The packaged setup keeps the bearer-only Canonical Runtime private and manages a separate loopback OAuth Gateway for the ChatGPT App. Cloudflare Tunnel, Tailscale Funnel, an existing HTTPS `/mcp` endpoint, or deferred remote access are explicit alternatives. Existing users update with `npm install -g @moretea-labs/forge@latest`, then `forge setup next`.
18
22
 
19
- - Controller Home is primary for MCP service config, authentication, and runtime state under `controllerHome/mcp/`: `mcp.local.json`, `mcp.tokens.json`, `mcp.oauth.json`, `mcp.oauth-tokens.json`, and `mcp.runtime.json`.
20
- - The matching repo-local `.Forge/mcp.local.json`, `.Forge/mcp.tokens.json`, `.Forge/mcp.oauth.json`, `.Forge/mcp.oauth-tokens.json`, and `.Forge/mcp.runtime.json` files are legacy fallback only. Repository-scoped `.Forge/mcp.policy.json` remains the access policy.
21
- - The controller is global across registered repositories, but repository work still routes by explicit `repoId` and `checkoutId`.
22
- - The public MCP endpoint is separate from the localhost-only Local Controller UI on `127.0.0.1:8766`. The UI is an execution-assistant console with Command Center, Approvals and Decisions, Current Work, Capabilities / Plugins, Models / Tools, System Status, Repositories, and Advanced Diagnostics.
23
- - Long-running work returns durable Jobs/Runs with bounded previews. Check those records before assuming a `502`, reconnect, or truncated response means the write failed.
23
+ The normal package Runtime is `forge runtime service install-package`. Source immutable Runtime and Standalone Recovery are advanced maintainer paths.
24
24
 
25
- ## Choose the next guide by goal
25
+ ## 3. Add only the capabilities you need
26
26
 
27
- - Need install and connector setup: [Tutorials](tutorials/README.md)
28
- - Need manual MCP/tunnel details: [Forge ChatGPT MCP setup](Forge-chatgpt-mcp-setup.md)
29
- - Need provider or executor routing: [Provider configuration and routing](operations/provider-configuration.md)
30
- - Need browser, Gmail/Calendar, or other plugins: [Documentation hub](README.md)
31
- - Need troubleshooting or runtime-storage recovery: [Troubleshooting](operations/troubleshooting.md), [Self-healing loop](Forge-runtime-self-healing-loop.md)
27
+ A Git repository is optional during first setup. Adopt one for software work:
32
28
 
33
- For the broader map, use the maintained [documentation hub](README.md).
29
+ ```bash
30
+ forge adopt --repo /path/to/project --dry-run
31
+ forge adopt --repo /path/to/project
32
+ ```
33
+
34
+ Or authorize a normal folder / configure Browser, Desktop, Gmail, Calendar, Apple, GitHub, or other typed providers later. Git, Codex, Claude, service credentials, and tunnel CLIs are capability-specific dependencies.
35
+
36
+ ## 4. Verify with a real controller call
37
+
38
+ For ChatGPT, follow [Connect ChatGPT](tutorials/02-connect-chatgpt.md), then start with a read-only `rh_status` call. A running local process or saved endpoint is not enough; the first successful controller-to-Forge tool call is the useful setup milestone.
39
+
40
+ See [Features](operations/features.md), [Platform Support](operations/platform-support.md), [Plugin Management](forge-plugin-management.md), and [Troubleshooting](operations/troubleshooting.md) for deeper paths.
@@ -1,33 +1,40 @@
1
1
  # 公开使用指南
2
2
 
3
- 如果你只想用最短路径理解并开始使用 Forge,先看这一页。
3
+ 这是当前最短的 Forge 使用路径。
4
4
 
5
- ## 最短路径
5
+ ## 1. 安装并选择外部主控
6
6
 
7
- 1. [安装并启动](tutorials/01-install-and-start.zh-CN.md)
8
- 2. [连接 ChatGPT](tutorials/02-connect-chatgpt.zh-CN.md)
9
- 3. [完成第一个仓库任务](tutorials/03-first-repository-task.zh-CN.md)
7
+ ```bash
8
+ npm install -g @moretea-labs/forge
9
+ forge setup
10
+ ```
10
11
 
11
- ## Forge 是什么
12
+ Forge 自己没有 AI 大脑。选择一个 primary 外部主控;推荐 ChatGPT,也可以明确选择 Codex、Claude 或其他 MCP 客户端。可以配置多个控制入口,但没被选择的客户端不会变成依赖。
12
13
 
13
- Forge 是一个本地执行桥,让 ChatGPT 通过固定且有边界的工具 schema 处理一个或多个仓库。日常编排优先使用 `rh_status`、`rh_access`、`rh_context`、`rh_work` 和 `rh_inbox`;默认工具面同时提供 Direct Edit、命令、Git、Agent、Campaign、iOS、插件、artifact 和恢复能力。
14
+ ```bash
15
+ forge setup configure --controller chatgpt --tunnel auto
16
+ forge setup next
17
+ ```
14
18
 
15
- 小而确定的修改默认走 Direct Edit;`quick_agent_session` 可以直接调用本地 Codex/Claude,不强制先创建 Issue 或 Task。需要跨会话恢复、带依赖拆分或保留正式审查证据的工作,仍可进入 durable 的 Issue → Task → Run 路径。Request/Full Access 只改变审批行为,不会要求重连 MCP Connector。
19
+ ## 2. 按 Next 完成所选路径
16
20
 
17
- ## 当前运行时事实
21
+ 对 ChatGPT,`--tunnel auto` 会优先 OpenAI Secure MCP Tunnel,不会因为机器上恰好安装了 cloudflared/Tailscale 就静默改用公网入口。Package setup 会保持 bearer-only Canonical Runtime 私有,并管理一个独立的 loopback OAuth Gateway 供 ChatGPT App 使用。Cloudflare Tunnel、Tailscale Funnel、已有 HTTPS `/mcp` 或暂缓远程连接都是显式 fallback。已安装用户运行 `npm install -g @moretea-labs/forge@latest` 后再执行 `forge setup next`。
18
22
 
19
- - Controller Home 是 MCP service 配置、认证和运行态的主存储位置;`controllerHome/mcp/` 下保存 `mcp.local.json`、`mcp.tokens.json`、`mcp.oauth.json`、`mcp.oauth-tokens.json` 和 `mcp.runtime.json`。
20
- - 对应的 repo-local `.Forge/mcp.local.json`、`.Forge/mcp.tokens.json`、`.Forge/mcp.oauth.json`、`.Forge/mcp.oauth-tokens.json`、`.Forge/mcp.runtime.json` 只用于 legacy fallback;仓库级 `.Forge/mcp.policy.json` 仍是访问策略文件。
21
- - Controller 是跨已注册仓库的全局服务,但仓库工作仍通过显式 `repoId` 和 `checkoutId` 路由。
22
- - 公网 MCP endpoint 与 `127.0.0.1:8766` 上仅限本机访问的 Local Controller UI 是不同入口。当前 UI 是执行助手控制台,包含指挥中心、审批与决定、当前任务、能力 / 插件、模型与工具、系统状态、仓库和高级诊断。
23
- - 长任务默认返回 durable Job / Run 的摘要和有界预览;看到 `502`、重连或大结果截断时,先确认 Job / Run 状态,不要直接假定写入失败。
23
+ 普通 package Runtime 是 `forge runtime service install-package`。源码 immutable Runtime 与 Standalone Recovery 属于高级维护路径。
24
24
 
25
- ## 按目标继续阅读
25
+ ## 3. 只增加需要的能力
26
26
 
27
- - 需要安装和 Connector 细节:看 [教程目录](tutorials/README.zh-CN.md)
28
- - 需要 MCP / 隧道 / OAuth 手动配置:看 [Forge ChatGPT MCP 配置](Forge-chatgpt-mcp-setup.md)
29
- - 需要 provider 或 executor 路由:看 [Provider 配置与路由](operations/provider-configuration.md)
30
- - 需要浏览器、Gmail/Calendar 或其他插件:看持续维护的 [文档中心](README.md)
31
- - 需要故障排查或 runtime-storage 恢复:看 [故障排查](operations/troubleshooting.zh-CN.md) 和 [自修复闭环](Forge-runtime-self-healing-loop.md)
27
+ 首次 setup 不要求 Git 仓库。需要软件开发时再接入:
32
28
 
33
- 更完整的导航请回到持续维护的[文档中心](README.md)。
29
+ ```bash
30
+ forge adopt --repo /path/to/project --dry-run
31
+ forge adopt --repo /path/to/project
32
+ ```
33
+
34
+ 也可以之后授权普通目录,或配置 Browser、Desktop、Gmail、Calendar、Apple、GitHub 等类型化 Provider。Git、Codex、Claude、服务凭证和 tunnel CLI 都是按能力出现的依赖。
35
+
36
+ ## 4. 用真实主控调用验收
37
+
38
+ ChatGPT 用户继续阅读[连接 ChatGPT](tutorials/02-connect-chatgpt.zh-CN.md),先做只读 `rh_status`。本机进程在运行或 endpoint 已保存不等于真正完成;第一次主控到 Forge 的真实工具调用成功才是有意义的 setup 里程碑。
39
+
40
+ 更多内容见[功能清单](operations/features.zh-CN.md)、[平台支持](operations/platform-support.zh-CN.md)、[插件管理](forge-plugin-management.md)和[故障排查](operations/troubleshooting.zh-CN.md)。
@@ -1,35 +1,35 @@
1
- # Tutorial 1: Install and start
1
+ # Tutorial 1: Install and choose your controller
2
2
 
3
- This tutorial installs the CLI, initializes the user-level runtime, checks the host, and registers one repository.
3
+ This tutorial gets Forge from a package install to a resumable setup session. Forge has **no internal AI brain**: one external controller decides what should happen, while Forge owns bounded execution, durable state, permissions, and evidence.
4
4
 
5
- ## 1. Platform and prerequisites
5
+ ## 1. Pick the platform path
6
6
 
7
- - macOS or Linux: full supported workflow.
8
- - Windows: use WSL2 for the full workflow.
9
- - Native Windows PowerShell: preview support for installation, doctor, repository registration/inspection, and portable controller operations.
7
+ - **macOS:** supported; the packaged Runtime can persist through launchd.
8
+ - **Modern Linux:** supported; the packaged Runtime uses `systemd --user` when available and otherwise reports a portable-session fallback.
9
+ - **Windows + WSL2:** recommended Windows path; follow the Linux flow inside WSL2.
10
+ - **Native Windows:** preview; CLI, setup, portable Runtime, MCP, and bounded portable capabilities work, but reboot-persistent Runtime ownership and every provider combination are not yet claimed.
10
11
 
11
- Install Git, Node.js 20.10 or newer, npm, and a writable home directory. Bun 1.0+ is optional and recommended for source development and the complete test suite.
12
+ Base installation needs **Node.js 20.10 or newer**, npm (or Bun), and a writable user home. **Git is optional until you enable repository/software-work features.** Codex, Claude, `gh`, Cloudflare, Tailscale, CodeGraph, and service credentials are capability-specific dependencies, not Forge installation prerequisites.
12
13
 
13
14
  ```bash
14
- git --version
15
15
  node --version
16
16
  npm --version
17
17
  ```
18
18
 
19
19
  See [Platform Support](../operations/platform-support.md) for the exact matrix.
20
20
 
21
- ## 2. Install the CLI
21
+ ## 2. Install Forge
22
22
 
23
- Release candidates are published on npm's `next` channel:
23
+ Stable releases use npm `latest`:
24
24
 
25
25
  ```bash
26
- npm install -g @moretea-labs/forge@next
26
+ npm install -g @moretea-labs/forge
27
27
  # or
28
- bun add -g @moretea-labs/forge@next
28
+ bun add -g @moretea-labs/forge
29
29
  forge --version
30
30
  ```
31
31
 
32
- For Forge source development, install from the repository instead:
32
+ For Forge source development only:
33
33
 
34
34
  ```bash
35
35
  git clone https://github.com/moretea-labs/forge.git
@@ -38,56 +38,79 @@ npm ci --ignore-scripts --no-audit --no-fund
38
38
  npm install -g . --omit=optional --no-audit --no-fund
39
39
  ```
40
40
 
41
- The package exposes exactly `forge`, `forge-hook`, and `forge-runtime`. Release candidates use `next`; stable releases use `latest`.
41
+ The published package exposes `forge`, `forge-hook`, and `forge-runtime`. Normal package users do **not** need a Forge source checkout, Bun compilation, CodeGraph, or Standalone Recovery to start the user-level Runtime. To upgrade, run `npm install -g @moretea-labs/forge@latest`, verify `forge --version`, then run `forge setup next` so newer setup contracts can be reconciled without reinstalling from source.
42
42
 
43
- ## 3. Open the guided setup session
43
+ ## 3. Start guided setup
44
44
 
45
45
  ```bash
46
- forge --version
47
- forge setup open --target both
46
+ forge setup
48
47
  ```
49
48
 
50
- `forge setup open` creates or resumes one user-level setup session below `~/.forge/setup/`. It runs the readiness checks and prints exactly one next configuration action. Complete that action, then continue with the same command loop:
49
+ On a fresh install the first action is to choose the external controller. ChatGPT is recommended, but it is not mandatory:
51
50
 
52
51
  ```bash
53
- forge setup next
52
+ forge setup configure --controller chatgpt --tunnel auto
53
+ # Alternatives:
54
+ # forge setup configure --controller codex
55
+ # forge setup configure --controller claude
56
+ # forge setup configure --controller mcp
54
57
  ```
55
58
 
56
- Repeat `forge setup next` until the session reports `ready`, then close it:
59
+ You can preconfigure additional controller entries while keeping one primary controller:
57
60
 
58
61
  ```bash
59
- forge setup close
62
+ forge setup configure \
63
+ --controller chatgpt \
64
+ --add-controller codex \
65
+ --add-controller claude \
66
+ --tunnel auto
60
67
  ```
61
68
 
62
- Use `forge setup status` to inspect the persisted session and `forge setup check` for a one-shot read-only report. `--target codex` or `--target claude` limits host-specific configuration. The setup session never silently performs remote, secret-bearing, destructive, or service-installing actions.
69
+ Forge does not install or check Codex/Claude merely because they exist on the machine. Their readiness becomes relevant only when you explicitly select them.
70
+
71
+ ## 4. Follow one Next action at a time
72
+
73
+ ```bash
74
+ forge setup next
75
+ ```
76
+
77
+ The setup session is stored below the user-level Forge directory, so you can close the terminal and resume later. Depending on the selected controller, the flow may ask for:
78
+
79
+ 1. controller registration;
80
+ 2. the packaged user-level Runtime;
81
+ 3. remote connectivity — OpenAI Secure MCP Tunnel first for ChatGPT, with explicit HTTPS fallbacks;
82
+ 4. account/browser authentication that only you can complete;
83
+ 5. a connection verification.
63
84
 
64
- ## 4. Adopt or register a repository
85
+ `forge setup status` shows persisted progress. `forge setup check` is read-only. `forge setup close` closes a ready setup session.
65
86
 
66
- For macOS, Linux, or WSL2, preview adoption first:
87
+ The normal Runtime action is:
67
88
 
68
89
  ```bash
69
- forge adopt --repo /path/to/your-project --dry-run
70
- forge adopt --repo /path/to/your-project
90
+ forge runtime service install-package
71
91
  ```
72
92
 
73
- All platforms can register explicitly:
93
+ For ChatGPT setups this installs two local service boundaries together: the bearer-only Canonical Runtime and a separate loopback OAuth Gateway used by Secure Tunnel or HTTPS connectors. Users should follow the OAuth endpoint printed by setup instead of tunneling directly to the internal Runtime port.
94
+
95
+ The older `forge runtime service install --repo ...` path builds an immutable Git/source Runtime and is an **advanced maintainer path**, not normal onboarding. Standalone Recovery is likewise optional advanced infrastructure.
96
+
97
+ ## 5. Repositories are optional at first
98
+
99
+ Forge can be useful for authorized files, browser/desktop actions, and service plugins without adopting a Git repository. Add a project when you need software-work capabilities:
74
100
 
75
101
  ```bash
76
- forge repo register /path/to/your-project --name my-project --json
102
+ forge adopt --repo /path/to/your-project --dry-run
103
+ forge adopt --repo /path/to/your-project
77
104
  forge repo list --json
78
105
  ```
79
106
 
80
- Keep the returned `repoId`; it is the stable repository identity used by ChatGPT and the Controller.
107
+ Git becomes required for that repository workflow.
81
108
 
82
- ## 5. Confirm readiness
109
+ ## 6. Verify the base install
83
110
 
84
111
  ```bash
85
112
  forge setup status
86
113
  forge doctor
87
- forge status --json
88
- forge repo list --json
89
114
  ```
90
115
 
91
- Runtime state belongs in Controller Home and ignored repository links, not in public source control. Never commit tokens, MCP runtime files, local jobs, logs, or generated worktrees.
92
-
93
- Continue with [Tutorial 2: Connect ChatGPT](02-connect-chatgpt.md). For errors, use [Troubleshooting](../operations/troubleshooting.md).
116
+ If ChatGPT is your controller, continue with [Tutorial 2: Connect ChatGPT](02-connect-chatgpt.md). For errors, use [Troubleshooting](../operations/troubleshooting.md).