@moretea-labs/forge 1.5.0-rc.1 → 1.5.0
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.
- package/AGENTS.md +9 -11
- package/CHANGELOG.md +19 -0
- package/CLAUDE.md +8 -10
- package/DESIGN.md +278 -0
- package/README.md +70 -90
- package/README.zh-CN.md +50 -55
- package/SKILL.md +8 -11
- package/THIRD_PARTY_NOTICES.md +9 -3
- package/assets/branding/README.md +4 -2
- package/assets/hooks/lib/workflow-state.sh +19 -18
- package/assets/hooks/post-edit-guard.sh +6 -75
- package/assets/hooks/prompt-guard.sh +24 -12
- package/assets/hooks/session-start-context.sh +17 -17
- package/assets/hooks/stop-orchestrator.sh +2 -2
- package/assets/partials/04-project-structure.partial.md +6 -6
- package/assets/partials/05-workflow.partial.md +6 -6
- package/assets/partials/07-footer.partial.md +1 -1
- package/assets/partials/08-orchestration.partial.md +2 -2
- package/assets/partials-agents/02-operating-mode.partial.md +5 -5
- package/assets/partials-agents/03-orchestration.partial.md +3 -3
- package/assets/partials-agents/04-task-protocol.partial.md +3 -3
- package/assets/partials-agents/08-deep-docs.partial.md +1 -1
- package/assets/reference-configs/agentic-development-flow.md +49 -86
- package/assets/reference-configs/external-tooling.md +21 -61
- package/assets/reference-configs/handoff-protocol.md +25 -20
- package/assets/reference-configs/harness-overview.md +8 -8
- package/assets/templates/helpers/archive-workflow.sh +0 -1
- package/assets/templates/helpers/capture-plan.sh +3 -3
- package/assets/templates/helpers/check-task-workflow.sh +2 -2
- package/assets/templates/helpers/codex-handoff-resume.sh +5 -5
- package/assets/templates/helpers/ensure-task-workflow.sh +37 -35
- package/assets/templates/helpers/new-plan.sh +1 -1
- package/assets/templates/helpers/plan-to-todo.sh +2 -2
- package/assets/templates/helpers/prepare-codex-handoff.sh +2 -2
- package/assets/templates/helpers/prepare-handoff.sh +9 -9
- package/assets/templates/helpers/refresh-current-status.sh +2 -2
- package/assets/templates/helpers/ship-worktrees.sh +1 -1
- package/assets/templates/helpers/sprint-backlog.sh +1 -1
- package/assets/templates/helpers/verify-sprint.sh +7 -7
- package/assets/templates/helpers/workstream-sync.sh +1 -1
- package/assets/templates/plan.template.md +1 -1
- package/assets/workflow-contract.v1.json +6 -3
- package/docs/architecture/current/README.md +10 -9
- package/docs/architecture/current/approved-target-architecture.zh-CN.md +2 -2
- package/docs/architecture/current/architecture-invariants.md +2 -2
- package/docs/architecture/current/automation-and-schedule-engine.md +15 -15
- package/docs/architecture/current/codegraph-context-provider.md +2 -2
- package/docs/architecture/current/control-plane-authority-inventory.md +12 -0
- package/docs/architecture/current/dispatch-and-agent-strategy.md +11 -11
- package/docs/architecture/current/entity-model.md +0 -27
- package/docs/architecture/current/failure-recovery.md +0 -24
- package/docs/architecture/current/governance.md +1 -1
- package/docs/architecture/current/implementation-status.md +1 -1
- package/docs/architecture/current/legacy-governance.md +58 -0
- package/docs/architecture/current/multi-repository-execution.md +1 -1
- package/docs/architecture/current/peer-supercontroller-runtime.md +1 -1
- package/docs/architecture/current/personal-assistant-plugin-baseline.md +4 -5
- package/docs/architecture/current/scheduler-and-resource-claims.md +0 -10
- package/docs/architecture/current/target-requirements-traceability.md +2 -2
- package/docs/architecture/current/thin-harness-governance-policy.md +1 -1
- package/docs/architecture/current/thin-harness-v1.md +9 -11
- package/docs/architecture/domains/runtime-harness.md +1 -1
- package/docs/forge-autonomous-goal-loop.md +3 -1
- package/docs/forge-chatgpt-mcp-setup.md +51 -184
- package/docs/images/forge-banner-cn.svg +26 -1
- package/docs/images/forge-banner.svg +26 -1
- package/docs/operations/features.md +1 -1
- package/docs/operations/homebrew.md +3 -3
- package/docs/operations/mcp-tool-exposure.md +5 -5
- package/docs/operations/platform-support.md +45 -37
- package/docs/operations/platform-support.zh-CN.md +40 -38
- package/docs/operations/releasing.md +3 -3
- package/docs/operations/releasing.zh-CN.md +3 -3
- package/docs/operations/troubleshooting.md +11 -6
- package/docs/operations/troubleshooting.zh-CN.md +11 -6
- package/docs/public-usage-guide.md +28 -21
- package/docs/public-usage-guide.zh-CN.md +28 -21
- package/docs/tutorials/01-install-and-start.md +56 -35
- package/docs/tutorials/01-install-and-start.zh-CN.md +56 -35
- package/docs/tutorials/02-connect-chatgpt.md +112 -46
- package/docs/tutorials/02-connect-chatgpt.zh-CN.md +113 -45
- package/docs/wiki/Architecture.md +1 -1
- package/docs/wiki/Installation.md +2 -2
- package/docs/wiki/Quick-Start.md +1 -1
- package/docs/wiki/Work-Lifecycle.md +1 -1
- package/install.ps1 +4 -5
- package/install.sh +4 -6
- package/package.json +15 -5
- package/scripts/archive-workflow.sh +0 -1
- package/scripts/benchmark-thin-harness-mcp-e2e.ts +27 -14
- package/scripts/build-controller-ui.ts +28 -0
- package/scripts/capture-plan.sh +4 -4
- package/scripts/check-agent-tooling.sh +12 -1
- package/scripts/check-platform-support.mjs +2 -2
- package/scripts/check-public-docs.sh +16 -5
- package/scripts/check-release-readiness.sh +5 -11
- package/scripts/check-runtime-architecture.mjs +14 -22
- package/scripts/check-tarball-install-smoke.sh +3 -2
- package/scripts/check-task-workflow.sh +2 -2
- package/scripts/codex-handoff-resume.sh +5 -5
- package/scripts/create-project-dirs.sh +3 -3
- package/scripts/ensure-task-workflow.sh +45 -35
- package/scripts/init-project.sh +4 -4
- package/scripts/install-desktop-operator-registration.ts +2 -2
- package/scripts/lib/project-init-lib.sh +46 -44
- package/scripts/migrate-project-template.sh +7 -4
- package/scripts/new-plan.sh +1 -1
- package/scripts/plan-to-todo.sh +2 -2
- package/scripts/prepare-codex-handoff.sh +2 -2
- package/scripts/prepare-handoff.sh +9 -9
- package/scripts/refresh-current-status.sh +2 -2
- package/scripts/setup-plugins.sh +3 -3
- package/scripts/ship-worktrees.sh +1 -1
- package/scripts/sprint-backlog.sh +5 -5
- package/scripts/sync-codex-installed-copies.sh +2 -3
- package/scripts/verify-sprint.sh +7 -7
- package/scripts/workstream-sync.sh +1 -1
- package/src/cli/chatgpt-browser/bridge-extension.ts +1 -1
- package/src/cli/chatgpt-browser/bridge-provider.ts +29 -0
- package/src/cli/chatgpt-browser/file-policy.ts +3 -1
- package/src/cli/commands/chatgpt.ts +51 -0
- package/src/cli/commands/doctor.ts +1 -1
- package/src/cli/commands/init-hook.ts +211 -70
- package/src/cli/commands/init.ts +5 -6
- package/src/cli/commands/mcp.ts +29 -5
- package/src/cli/commands/runtime.ts +60 -8
- package/src/cli/commands/setup-profile.ts +441 -0
- package/src/cli/controller/check-runner.ts +20 -3
- package/src/cli/controller/codex-continuation.ts +4 -7
- package/src/cli/controller/context-pack.ts +118 -14
- package/src/cli/controller/operational-plan.ts +4 -4
- package/src/cli/controller/task-ledger.ts +10 -10
- package/src/cli/controller/work-mode.ts +6 -13
- package/src/cli/index.ts +14 -35
- package/src/cli/local-bridge/connector-freshness.ts +1 -1
- package/src/cli/local-bridge/console-automations.ts +160 -0
- package/src/cli/local-bridge/dashboard.ts +8 -1303
- package/src/cli/local-bridge/facade-api.ts +16 -7
- package/src/cli/local-bridge/frontend/src/App.tsx +10 -0
- package/src/cli/local-bridge/frontend/src/components/Button.tsx +1 -0
- package/src/cli/local-bridge/frontend/src/components/DetailPane.tsx +3 -0
- package/src/cli/local-bridge/frontend/src/components/SearchField.tsx +1 -0
- package/src/cli/local-bridge/frontend/src/components/SectionHeader.tsx +1 -0
- package/src/cli/local-bridge/frontend/src/components/Segmented.tsx +1 -0
- package/src/cli/local-bridge/frontend/src/components/StatusText.tsx +3 -0
- package/src/cli/local-bridge/frontend/src/design/icons.tsx +11 -0
- package/src/cli/local-bridge/frontend/src/design/tokens.css +8 -0
- package/src/cli/local-bridge/frontend/src/features/automations/AutomationsView.tsx +3 -0
- package/src/cli/local-bridge/frontend/src/features/capabilities/CapabilitiesView.tsx +4 -0
- package/src/cli/local-bridge/frontend/src/features/overview/OverviewView.tsx +3 -0
- package/src/cli/local-bridge/frontend/src/features/repositories/RepositoriesView.tsx +2 -0
- package/src/cli/local-bridge/frontend/src/features/settings/SettingsView.tsx +2 -0
- package/src/cli/local-bridge/frontend/src/features/system/SystemView.tsx +2 -0
- package/src/cli/local-bridge/frontend/src/features/work/WorkView.tsx +3 -0
- package/src/cli/local-bridge/frontend/src/lib/api.ts +23 -0
- package/src/cli/local-bridge/frontend/src/lib/format.ts +4 -0
- package/src/cli/local-bridge/frontend/src/lib/routes.ts +7 -0
- package/src/cli/local-bridge/frontend/src/main.tsx +1 -0
- package/src/cli/local-bridge/frontend/src/shell/AppShell.tsx +1 -0
- package/src/cli/local-bridge/frontend/src/shell/CommandBar.tsx +2 -0
- package/src/cli/local-bridge/frontend/src/shell/Sidebar.tsx +3 -0
- package/src/cli/local-bridge/frontend/src/styles.css +12 -0
- package/src/cli/local-bridge/frontend/src/types.ts +14 -0
- package/src/cli/local-bridge/frontend/src/vite-env.d.ts +1 -0
- package/src/cli/local-bridge/frontend/vite.config.ts +27 -0
- package/src/cli/local-bridge/server.ts +44 -0
- package/src/cli/local-bridge/ui-dist/app.css +1 -0
- package/src/cli/local-bridge/ui-dist/app.js +11094 -0
- package/src/cli/mcp/instructions.ts +3 -3
- package/src/cli/mcp/legacy-tool-service.ts +27 -23
- package/src/cli/mcp/multi-repository.ts +2 -0
- package/src/cli/mcp/policy.ts +7 -5
- package/src/cli/mcp/repository-tools.ts +53 -14
- package/src/cli/mcp/server.ts +5 -10
- package/src/cli/mcp/setup.ts +211 -275
- package/src/cli/mcp/tool-capability-cache.ts +1 -1
- package/src/cli/mcp/toolset-names.ts +1 -1
- package/src/cli/mcp/toolset.ts +0 -1
- package/src/cli/mcp/transports/http.ts +24 -4
- package/src/cli/repositories/branch-name-policy.ts +0 -7
- package/src/cli/repositories/controller-home.ts +110 -3
- package/src/cli/repositories/safe-patch.ts +1 -1
- package/src/cli/repositories/selected-path-actions.ts +26 -24
- package/src/core/adoption/gitignore-plan.ts +2 -3
- package/src/core/adoption/plan.ts +4 -1
- package/src/runtime/control-plane/execution/edit-validation-coordinator.ts +556 -0
- package/src/runtime/control-plane/execution/work-handle-store.ts +128 -1
- package/src/runtime/control-plane/execution/work-validation-reconciler.ts +277 -0
- package/src/runtime/control-plane/execution/work-verification-snapshot.ts +169 -0
- package/src/runtime/control-plane/facade/capability-registry.ts +0 -10
- package/src/runtime/control-plane/facade/handoff-inbox-store.ts +44 -25
- package/src/runtime/control-plane/facade/suggested-actions.ts +7 -1
- package/src/runtime/control-plane/facade/types.ts +0 -1
- package/src/runtime/control-plane/global-scheduler/scheduler.ts +30 -8
- package/src/runtime/control-plane/launcher/chatgpt-work-binding-store.ts +114 -0
- package/src/runtime/control-plane/launcher/chatgpt-work-continuation.ts +175 -0
- package/src/runtime/control-plane/launcher/launch-reservation-store.ts +161 -0
- package/src/runtime/control-plane/launcher/provider-mcp-bootstrap.ts +64 -0
- package/src/runtime/control-plane/launcher/thin-launcher.ts +117 -24
- package/src/runtime/control-plane/routing/route-policy.ts +14 -14
- package/src/runtime/control-plane/runtime-cleanup.ts +0 -1
- package/src/runtime/evidence/event-ledger.ts +1 -1
- package/src/runtime/{workflow/campaigns/workspace.ts → execution/managed-workspace.ts} +41 -43
- package/src/runtime/execution/process-runtime/check-facade.ts +6 -0
- package/src/runtime/execution/process-runtime/check-result.ts +45 -0
- package/src/runtime/execution/process-runtime/check-runner-sidecar.ts +42 -16
- package/src/runtime/execution/process-runtime/command-facade.ts +4 -2
- package/src/runtime/execution/process-runtime/gc.ts +1 -1
- package/src/runtime/execution/process-runtime/index.ts +3 -0
- package/src/runtime/execution/process-runtime/interactive-admission.ts +14 -5
- package/src/runtime/execution/process-runtime/persisted-check.ts +285 -0
- package/src/runtime/execution/process-runtime/resource-claims.ts +30 -0
- package/src/runtime/execution/process-runtime/runtime.ts +18 -1
- package/src/runtime/execution/process-runtime/store.ts +1 -19
- package/src/runtime/execution/process-runtime/types.ts +4 -0
- package/src/runtime/execution/thin-harness/execution-router.ts +0 -1
- package/src/runtime/execution/thin-harness/fast-executor.ts +1 -1
- package/src/runtime/execution/thin-harness/lightweight-lanes.ts +1 -2
- package/src/runtime/execution/thin-harness/types.ts +0 -1
- package/src/runtime/execution/workers/executor.ts +1 -1
- package/src/runtime/gateway/mcp/execution-tools.ts +1 -1
- package/src/runtime/gateway/mcp/persisted-check-process.ts +3 -255
- package/src/runtime/gateway/mcp/process-tools.ts +16 -3
- package/src/runtime/gateway/mcp/resource-policy.ts +0 -9
- package/src/runtime/gateway/mcp/router.ts +117 -182
- package/src/runtime/gateway/mcp/runtime-tools.ts +331 -409
- package/src/runtime/gateway/mcp/work-validation-reconciler.ts +1 -219
- package/src/runtime/plugins/browser-adapter.ts +5 -0
- package/src/runtime/plugins/desktop-operator-registration.ts +1 -1
- package/src/runtime/plugins/store.ts +14 -6
- package/src/runtime/plugins/types.ts +1 -1
- package/src/runtime/projections/materialized-view.ts +1 -23
- package/src/runtime/recovery/maintenance-executor.ts +9 -0
- package/src/runtime/resources/ownership.ts +0 -1
- package/src/runtime/root/gateway-adapter.ts +2 -0
- package/src/runtime/root/mcp-transport.ts +10 -2
- package/src/runtime/root/package-runtime-release.ts +161 -0
- package/src/runtime/root/package-runtime-service.ts +172 -0
- package/src/runtime/root/runtime.ts +2 -1
- package/src/runtime/root/scheduler.ts +5 -0
- package/src/runtime/root/service.ts +18 -5
- package/src/runtime/standalone-recovery/core.ts +65 -16
- package/src/runtime/workflow/findings/store.ts +145 -106
- package/src/runtime/workflow/findings/types.ts +22 -0
- package/src/runtime/workflow/schedules/engine.ts +132 -2
- package/src/runtime/workflow/schedules/pending-activation.ts +139 -0
- package/src/runtime/workflow/schedules/work-continuation.ts +218 -0
- package/docs/CHANGELOG.md +0 -978
- package/docs/README.zh-CN.md +0 -58
- package/scripts/smoke-chatgpt-supervised-automation.ts +0 -208
- package/src/cli/commands/controller.ts +0 -680
- package/src/runtime/workflow/campaigns/cleanup.ts +0 -263
- package/src/runtime/workflow/campaigns/engine.ts +0 -112
- package/src/runtime/workflow/campaigns/normalize.ts +0 -100
- package/src/runtime/workflow/campaigns/review.ts +0 -315
- package/src/runtime/workflow/campaigns/store.ts +0 -526
- package/src/runtime/workflow/campaigns/supervisor.ts +0 -112
- package/src/runtime/workflow/campaigns/types.ts +0 -290
- /package/src/runtime/{workflow/campaigns → execution}/workspace-agent.ts +0 -0
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
# 教程 1
|
|
1
|
+
# 教程 1:安装并选择主控
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
本教程把 Forge 从 package 安装带到可恢复的初始化流程。Forge **自己没有 AI 大脑**:始终由一个外部主控判断下一步,Forge 负责有边界的执行、持久状态、权限与证据。
|
|
4
4
|
|
|
5
|
-
## 1.
|
|
5
|
+
## 1. 选择平台路径
|
|
6
6
|
|
|
7
|
-
- macOS
|
|
8
|
-
-
|
|
9
|
-
- Windows
|
|
7
|
+
- **macOS:** 支持;Package Runtime 使用 launchd 做用户级持久运行。
|
|
8
|
+
- **现代 Linux:** 支持;优先使用 `systemd --user`,不可用时会明确退化为当前会话的 portable 模式。
|
|
9
|
+
- **Windows + WSL2:** Windows 推荐路径;在 WSL2 内按 Linux 流程运行。
|
|
10
|
+
- **Windows 原生:** 预览;支持 CLI、setup、portable Runtime、MCP 和有边界的可移植能力,但暂不宣称重启后 Runtime 持久化与所有 Provider 组合都完整支持。
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
基础安装只需要 **Node.js 20.10 或更高版本**、npm(或 Bun)和可写用户目录。**Git 只在启用仓库/软件开发能力时才需要。** Codex、Claude、`gh`、Cloudflare、Tailscale、CodeGraph 和各服务账号都是按能力选装,不是 Forge 的安装前置条件。
|
|
12
13
|
|
|
13
14
|
```bash
|
|
14
|
-
git --version
|
|
15
15
|
node --version
|
|
16
16
|
npm --version
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
详细范围见[平台支持说明](../operations/platform-support.zh-CN.md)。
|
|
20
20
|
|
|
21
|
-
## 2. 安装
|
|
21
|
+
## 2. 安装 Forge
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Release Candidate 使用 npm `next`:
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
-
npm install -g @moretea-labs/forge
|
|
26
|
+
npm install -g @moretea-labs/forge
|
|
27
27
|
# 或
|
|
28
|
-
bun add -g @moretea-labs/forge
|
|
28
|
+
bun add -g @moretea-labs/forge
|
|
29
29
|
forge --version
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
只有参与 Forge 源码开发时才需要源码安装:
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
35
|
git clone https://github.com/moretea-labs/forge.git
|
|
@@ -38,56 +38,77 @@ npm ci --ignore-scripts --no-audit --no-fund
|
|
|
38
38
|
npm install -g . --omit=optional --no-audit --no-fund
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
发布 package 提供 `forge`、`forge-hook`、`forge-runtime`。普通 package 用户启动用户级 Runtime **不需要** Forge Git checkout、Bun 编译、CodeGraph 或 Standalone Recovery。
|
|
42
42
|
|
|
43
|
-
## 3.
|
|
43
|
+
## 3. 开始引导式 setup
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
forge
|
|
47
|
-
forge setup open --target both
|
|
46
|
+
forge setup
|
|
48
47
|
```
|
|
49
48
|
|
|
50
|
-
|
|
49
|
+
首次执行会先选择外部主控。推荐 ChatGPT,但不是强制:
|
|
51
50
|
|
|
52
51
|
```bash
|
|
53
|
-
forge setup
|
|
52
|
+
forge setup configure --controller chatgpt --tunnel auto
|
|
53
|
+
# 也可以:
|
|
54
|
+
# forge setup configure --controller codex
|
|
55
|
+
# forge setup configure --controller claude
|
|
56
|
+
# forge setup configure --controller mcp
|
|
54
57
|
```
|
|
55
58
|
|
|
56
|
-
|
|
59
|
+
可以预配置多个控制入口,但只有一个 primary controller:
|
|
57
60
|
|
|
58
61
|
```bash
|
|
59
|
-
forge setup
|
|
62
|
+
forge setup configure \
|
|
63
|
+
--controller chatgpt \
|
|
64
|
+
--add-controller codex \
|
|
65
|
+
--add-controller claude \
|
|
66
|
+
--tunnel auto
|
|
60
67
|
```
|
|
61
68
|
|
|
62
|
-
|
|
69
|
+
机器上即使已经安装 Codex/Claude,只要没有明确选择,Forge 就不会把它们当成 readiness 依赖。
|
|
70
|
+
|
|
71
|
+
## 4. 每次只完成一个 Next 动作
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
forge setup next
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
setup 进度保存在用户级 Forge 目录,可以退出终端后继续。根据主控类型,流程会依次处理:
|
|
78
|
+
|
|
79
|
+
1. 主控注册;
|
|
80
|
+
2. Package Runtime;
|
|
81
|
+
3. 远程主控需要的安全 HTTPS;
|
|
82
|
+
4. 只能由用户完成的登录/浏览器认证;
|
|
83
|
+
5. 连接验证。
|
|
63
84
|
|
|
64
|
-
|
|
85
|
+
`forge setup status` 查看持久化进度;`forge setup check` 只读检查;ready 后使用 `forge setup close`。
|
|
65
86
|
|
|
66
|
-
|
|
87
|
+
普通用户的 Runtime 路径是:
|
|
67
88
|
|
|
68
89
|
```bash
|
|
69
|
-
forge
|
|
70
|
-
forge adopt --repo /path/to/your-project
|
|
90
|
+
forge runtime service install-package
|
|
71
91
|
```
|
|
72
92
|
|
|
73
|
-
|
|
93
|
+
旧的 `forge runtime service install --repo ...` 会构建 Git/source immutable Runtime,属于**高级维护路径**;Standalone Recovery 同样不是普通用户初始化的前置条件。
|
|
94
|
+
|
|
95
|
+
## 5. 首次 setup 不要求仓库
|
|
96
|
+
|
|
97
|
+
只使用授权目录、浏览器/桌面或服务插件时,不需要先 adopt Git 仓库。需要软件开发能力时再接入项目:
|
|
74
98
|
|
|
75
99
|
```bash
|
|
76
|
-
forge repo
|
|
100
|
+
forge adopt --repo /path/to/your-project --dry-run
|
|
101
|
+
forge adopt --repo /path/to/your-project
|
|
77
102
|
forge repo list --json
|
|
78
103
|
```
|
|
79
104
|
|
|
80
|
-
|
|
105
|
+
从这一步开始,仓库工作流才需要 Git。
|
|
81
106
|
|
|
82
|
-
##
|
|
107
|
+
## 6. 验证基础环境
|
|
83
108
|
|
|
84
109
|
```bash
|
|
85
110
|
forge setup status
|
|
86
111
|
forge doctor
|
|
87
|
-
forge status --json
|
|
88
|
-
forge repo list --json
|
|
89
112
|
```
|
|
90
113
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
下一步阅读[教程 2:连接 ChatGPT](02-connect-chatgpt.zh-CN.md),出现问题时看[故障排查](../operations/troubleshooting.zh-CN.md)。
|
|
114
|
+
选择 ChatGPT 做主控时,继续阅读[教程 2:连接 ChatGPT](02-connect-chatgpt.zh-CN.md)。出现问题时看[故障排查](../operations/troubleshooting.zh-CN.md)。
|
|
@@ -1,82 +1,148 @@
|
|
|
1
1
|
# Tutorial 2: Connect ChatGPT
|
|
2
2
|
|
|
3
|
-
This tutorial
|
|
3
|
+
This tutorial connects ChatGPT as the external controller for Forge. Forge stays local and loopback-bound; ChatGPT reaches it through either OpenAI Secure MCP Tunnel or an explicitly chosen HTTPS tunnel.
|
|
4
4
|
|
|
5
|
-
## 1.
|
|
5
|
+
## 1. Check ChatGPT availability first
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
ChatGPT MCP availability is controlled by your ChatGPT plan/workspace and can change independently of Forge. Check OpenAI's current [Developer mode and MCP apps](https://help.openai.com/en/articles/12584461-developer-mode-apps-and-full-mcp-connectors-in-chatgpt-beta) documentation before setup.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- a healthy `forge doctor` result;
|
|
11
|
-
- a stable public HTTPS address ending in `/mcp`;
|
|
12
|
-
- ChatGPT access to Developer Mode and custom MCP connectors.
|
|
9
|
+
At the time this guide was updated, full MCP including write/modify actions is a beta capability for ChatGPT Business, Enterprise, and Edu on web. Pro supports developer-mode MCP with read/fetch scope rather than full write MCP. Workspace administrators may also need to enable developer mode/RBAC.
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
Forge does not bypass those product permissions.
|
|
15
12
|
|
|
16
|
-
|
|
13
|
+
## 2. Let Forge prepare the local side
|
|
17
14
|
|
|
18
|
-
|
|
15
|
+
Start or resume the user-level setup flow:
|
|
19
16
|
|
|
20
17
|
```bash
|
|
21
|
-
forge
|
|
18
|
+
forge setup configure --controller chatgpt --tunnel auto
|
|
19
|
+
forge setup next
|
|
22
20
|
```
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
Follow the single `Next` action until the local Package Runtime is ready. The normal user path uses:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
forge mcp setup chatgpt --user-level
|
|
26
|
+
forge runtime service install-package
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The MCP listener remains loopback-only, normally:
|
|
25
30
|
|
|
26
31
|
```text
|
|
27
32
|
http://127.0.0.1:8765/mcp
|
|
28
33
|
```
|
|
29
34
|
|
|
30
|
-
|
|
35
|
+
Fresh user-level setup keeps the repository-centric Utility Console disabled until you configure a repository/workbench target. When enabled later it uses a separate loopback port (normally `8766`). **Never expose the Utility Console to the internet.**
|
|
36
|
+
|
|
37
|
+
A repository is not required to connect ChatGPT. Add repositories, folders, browser capabilities, and service plugins later as needed.
|
|
38
|
+
|
|
39
|
+
## 3. Choose the remote connection
|
|
40
|
+
|
|
41
|
+
Run `forge setup next`. Forge supports these connection providers:
|
|
42
|
+
|
|
43
|
+
### A. OpenAI Secure MCP Tunnel — preferred when available
|
|
44
|
+
|
|
45
|
+
Secure MCP Tunnel lets an OpenAI-hosted product reach the local MCP server through an outbound tunnel, without creating public inbound access. See OpenAI's [Secure MCP Tunnel guide](https://developers.openai.com/api/docs/guides/secure-mcp-tunnels) and the official [`openai/tunnel-client`](https://github.com/openai/tunnel-client).
|
|
46
|
+
|
|
47
|
+
You need a tunnel ID and tunnel-use permission from OpenAI Platform. Record only the non-secret tunnel ID in Forge:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
forge setup configure \
|
|
51
|
+
--controller chatgpt \
|
|
52
|
+
--tunnel openai \
|
|
53
|
+
--tunnel-id tunnel_0123456789abcdef0123456789abcdef
|
|
54
|
+
forge setup next
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Forge never asks for or stores the tunnel runtime API key. Keep it in the environment used by the official tunnel client:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
export CONTROL_PLANE_API_KEY='...'
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
When `tunnel-client` is installed, setup guides the official supervised runtime path. Conceptually it is:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
tunnel-client runtimes connect \
|
|
67
|
+
--alias forge \
|
|
68
|
+
--tunnel-id tunnel_0123456789abcdef0123456789abcdef \
|
|
69
|
+
--runtime-api-key env:CONTROL_PLANE_API_KEY \
|
|
70
|
+
--mcp-server-url http://127.0.0.1:8765/mcp
|
|
71
|
+
|
|
72
|
+
tunnel-client runtimes status forge --json
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Forge reports this provider ready only when `tunnel-client` reports the managed runtime as running, healthy, and ready.
|
|
31
76
|
|
|
32
|
-
|
|
77
|
+
### B. Cloudflare Tunnel
|
|
33
78
|
|
|
34
|
-
|
|
79
|
+
Choose this when you need a stable public HTTPS endpoint and control the Cloudflare account/domain:
|
|
35
80
|
|
|
36
81
|
```bash
|
|
37
|
-
forge
|
|
38
|
-
|
|
39
|
-
--repo /path/to/forge-source-or-runtime-root \
|
|
40
|
-
--host 127.0.0.1 \
|
|
41
|
-
--port 8765 \
|
|
42
|
-
--auth-token-file /path/to/controller-home/mcp/runtime-token
|
|
43
|
-
forge runtime status --controller-home /path/to/controller-home --json
|
|
44
|
-
forge mcp doctor --repo /path/to/your-project
|
|
82
|
+
forge setup configure --controller chatgpt --tunnel cloudflare
|
|
83
|
+
forge setup next
|
|
45
84
|
```
|
|
46
85
|
|
|
47
|
-
|
|
86
|
+
Setup detects `cloudflared` and the current platform. On macOS it can suggest Homebrew when present; Linux/WSL2 and Windows receive their platform-specific official installation path. After creating a stable named tunnel, record only the resulting `/mcp` URL:
|
|
48
87
|
|
|
49
|
-
|
|
88
|
+
```bash
|
|
89
|
+
forge setup configure \
|
|
90
|
+
--controller chatgpt \
|
|
91
|
+
--tunnel existing \
|
|
92
|
+
--endpoint https://forge.example.com/mcp
|
|
93
|
+
```
|
|
50
94
|
|
|
51
|
-
|
|
52
|
-
2. Enable Developer Mode.
|
|
53
|
-
3. Create a custom MCP Connector.
|
|
54
|
-
4. Enter the public HTTPS URL ending in `/mcp`.
|
|
55
|
-
5. Add the Connector to a new conversation.
|
|
95
|
+
### C. Tailscale Funnel
|
|
56
96
|
|
|
57
|
-
|
|
97
|
+
If you already use Tailscale, choose:
|
|
58
98
|
|
|
59
|
-
|
|
99
|
+
```bash
|
|
100
|
+
forge setup configure --controller chatgpt --tunnel tailscale
|
|
101
|
+
forge setup next
|
|
102
|
+
```
|
|
60
103
|
|
|
61
|
-
|
|
62
|
-
- `rh_context` — bounded context for the selected repository;
|
|
63
|
-
- `rh_work` — start or continue bounded work;
|
|
64
|
-
- `rh_inbox` — decisions, approvals, and items requiring attention.
|
|
104
|
+
Forge detects the Tailscale CLI and guides Funnel setup for the current platform. Record the final HTTPS `/mcp` URL when available.
|
|
65
105
|
|
|
66
|
-
|
|
106
|
+
### D. Existing HTTPS endpoint or defer
|
|
67
107
|
|
|
68
|
-
|
|
108
|
+
```bash
|
|
109
|
+
forge setup configure \
|
|
110
|
+
--controller chatgpt \
|
|
111
|
+
--tunnel existing \
|
|
112
|
+
--endpoint https://forge.example.com/mcp
|
|
113
|
+
|
|
114
|
+
# Or keep local setup only for now:
|
|
115
|
+
forge setup configure --controller chatgpt --tunnel none
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Cloudflare/Tailscale/existing HTTPS make the MCP endpoint public or internet-reachable by design. OpenAI Secure MCP Tunnel is the private-outbound option when your OpenAI organization supports it.
|
|
119
|
+
|
|
120
|
+
## 4. Create the ChatGPT app/connector
|
|
121
|
+
|
|
122
|
+
The ChatGPT UI changes over time, so follow the current OpenAI developer-mode instructions rather than relying on screenshots in this repository.
|
|
123
|
+
|
|
124
|
+
For a Secure MCP Tunnel connection, choose the **Tunnel** connection type and select/paste the tunnel ID. For an HTTPS connection, use the stable HTTPS URL ending in `/mcp` and the OAuth flow generated by Forge.
|
|
125
|
+
|
|
126
|
+
After creating the app/connector, scan/refresh tools. Do not switch Forge to an exhaustive compatibility toolset simply to expose more names; the bounded default surface is intentional.
|
|
127
|
+
|
|
128
|
+
## 5. Verify a real Forge call
|
|
129
|
+
|
|
130
|
+
Start with a read-only prompt:
|
|
69
131
|
|
|
70
132
|
```text
|
|
71
|
-
Use Forge.
|
|
133
|
+
Use Forge. Call rh_status and tell me whether the Forge Runtime is ready.
|
|
134
|
+
Do not modify anything yet.
|
|
72
135
|
```
|
|
73
136
|
|
|
74
|
-
|
|
137
|
+
Then, after granting a repository or local folder, verify bounded context/read access. A successful setup means ChatGPT actually made a Forge tool call; a saved tunnel ID or a running local process alone is not proof of end-to-end connectivity.
|
|
138
|
+
|
|
139
|
+
## 6. Security rules
|
|
75
140
|
|
|
76
|
-
- Keep MCP
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
141
|
+
- Keep Forge MCP and the Utility Console bound to loopback.
|
|
142
|
+
- Prefer Secure MCP Tunnel when private outbound connectivity is available and appropriate.
|
|
143
|
+
- If using a public HTTPS tunnel, expose only MCP—not the local Utility Console.
|
|
144
|
+
- Never paste MCP tokens, OAuth secrets, tunnel runtime API keys, or admin keys into chat or Forge setup state.
|
|
145
|
+
- Remote Git, GitHub, email, destructive cleanup, publication, and secret access remain separately authorized by Forge.
|
|
146
|
+
- Codex/Claude are not installed or enabled unless you explicitly configure them as controller/execution entries.
|
|
81
147
|
|
|
82
|
-
Continue with [Tutorial 3: First Repository Task](03-first-repository-task.md). Use [Troubleshooting](../operations/troubleshooting.md)
|
|
148
|
+
Continue with [Tutorial 3: First Repository Task](03-first-repository-task.md) when you want software-work capabilities. Use [Troubleshooting](../operations/troubleshooting.md) when the Runtime, tunnel, connector, or tool surface is not healthy.
|
|
@@ -1,80 +1,148 @@
|
|
|
1
1
|
# 教程 2:连接 ChatGPT
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
本教程把 ChatGPT 接成 Forge 的外部主控。Forge 和 MCP 仍只监听本机 loopback;ChatGPT 通过 OpenAI Secure MCP Tunnel,或用户明确选择的 HTTPS tunnel 访问它。
|
|
4
4
|
|
|
5
|
-
## 1.
|
|
5
|
+
## 1. 先确认 ChatGPT 当前支持范围
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- `forge doctor` 状态正常;
|
|
9
|
-
- 一个稳定、以 `/mcp` 结尾的公网 HTTPS 地址;
|
|
10
|
-
- ChatGPT Developer Mode 和自定义 MCP Connector 权限。
|
|
7
|
+
ChatGPT 的 MCP 能力由套餐、工作区和管理员策略决定,会独立于 Forge 变化。开始前请查看 OpenAI 当前的[开发者模式和 MCP 应用](https://help.openai.com/zh-hans-cn/articles/12584461-developer-mode-and-mcp-apps-in-chatgpt-beta)说明。
|
|
11
8
|
|
|
12
|
-
|
|
9
|
+
本文更新时,包含写入/修改的完整 MCP 正在 ChatGPT Business、Enterprise、Edu 网页版中以 beta 提供;Pro 的开发者模式 MCP 当前是 read/fetch 范围。工作区还可能要求管理员开启 Developer Mode / RBAC。
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
Forge 不会绕过这些 ChatGPT 产品权限。
|
|
15
12
|
|
|
16
|
-
## 2.
|
|
13
|
+
## 2. 让 Forge 准备本地运行环境
|
|
17
14
|
|
|
18
15
|
```bash
|
|
19
|
-
forge
|
|
16
|
+
forge setup configure --controller chatgpt --tunnel auto
|
|
17
|
+
forge setup next
|
|
20
18
|
```
|
|
21
19
|
|
|
22
|
-
|
|
20
|
+
每次只按一个 `Next` 动作继续。普通用户的本地路径最终会使用:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
forge mcp setup chatgpt --user-level
|
|
24
|
+
forge runtime service install-package
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
MCP 默认只监听:
|
|
23
28
|
|
|
24
29
|
```text
|
|
25
30
|
http://127.0.0.1:8765/mcp
|
|
26
31
|
```
|
|
27
32
|
|
|
28
|
-
|
|
33
|
+
首次 user-level setup 会保持 repository-centric Utility Console 关闭,直到你之后配置仓库/工作台目标;启用后它使用独立 loopback 端口(通常是 `8766`)。**不要把 Utility Console 暴露到公网。**
|
|
34
|
+
|
|
35
|
+
连接 ChatGPT 不要求先注册 Git 仓库。仓库、普通目录、Browser、Gmail 等能力可以之后按需配置。
|
|
36
|
+
|
|
37
|
+
## 3. 选择远程连接方式
|
|
38
|
+
|
|
39
|
+
执行 `forge setup next`,Forge 支持以下 provider。
|
|
40
|
+
|
|
41
|
+
### A. OpenAI Secure MCP Tunnel——有权限时优先
|
|
42
|
+
|
|
43
|
+
Secure MCP Tunnel 通过出站连接把本机/private MCP 接到 OpenAI 托管产品,不要求给 Forge 开公网入站。详见 OpenAI 的 [Secure MCP Tunnel](https://developers.openai.com/api/docs/guides/secure-mcp-tunnels) 与官方 [`openai/tunnel-client`](https://github.com/openai/tunnel-client)。
|
|
44
|
+
|
|
45
|
+
需要先在 OpenAI Platform 获得 tunnel ID 和使用权限。Forge 只记录**非秘密**的 tunnel ID:
|
|
29
46
|
|
|
30
|
-
|
|
47
|
+
```bash
|
|
48
|
+
forge setup configure \
|
|
49
|
+
--controller chatgpt \
|
|
50
|
+
--tunnel openai \
|
|
51
|
+
--tunnel-id tunnel_0123456789abcdef0123456789abcdef
|
|
52
|
+
forge setup next
|
|
53
|
+
```
|
|
31
54
|
|
|
32
|
-
|
|
55
|
+
Forge 不要求、读取或保存 tunnel runtime API key。把它留在运行官方 tunnel-client 的环境中:
|
|
33
56
|
|
|
34
57
|
```bash
|
|
35
|
-
|
|
36
|
-
--controller-home /path/to/controller-home \
|
|
37
|
-
--repo /path/to/forge-source-or-runtime-root \
|
|
38
|
-
--host 127.0.0.1 \
|
|
39
|
-
--port 8765 \
|
|
40
|
-
--auth-token-file /path/to/controller-home/mcp/runtime-token
|
|
41
|
-
forge runtime status --controller-home /path/to/controller-home --json
|
|
42
|
-
forge mcp doctor --repo /path/to/your-project
|
|
58
|
+
export CONTROL_PLANE_API_KEY='...'
|
|
43
59
|
```
|
|
44
60
|
|
|
45
|
-
|
|
61
|
+
安装 `tunnel-client` 后,setup 会引导官方的受管 runtime 路径,本质上是:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
tunnel-client runtimes connect \
|
|
65
|
+
--alias forge \
|
|
66
|
+
--tunnel-id tunnel_0123456789abcdef0123456789abcdef \
|
|
67
|
+
--runtime-api-key env:CONTROL_PLANE_API_KEY \
|
|
68
|
+
--mcp-server-url http://127.0.0.1:8765/mcp
|
|
69
|
+
|
|
70
|
+
tunnel-client runtimes status forge --json
|
|
71
|
+
```
|
|
46
72
|
|
|
47
|
-
|
|
73
|
+
只有 tunnel-client 返回 `process_running + healthy + ready` 后,Forge 才把这个连接判为 ready。
|
|
48
74
|
|
|
49
|
-
|
|
50
|
-
2. 开启 Developer Mode。
|
|
51
|
-
3. 创建自定义 MCP Connector。
|
|
52
|
-
4. 填入以 `/mcp` 结尾的公网 HTTPS URL。
|
|
53
|
-
5. 在新会话中添加该 Connector。
|
|
75
|
+
### B. Cloudflare Tunnel
|
|
54
76
|
|
|
55
|
-
|
|
77
|
+
需要稳定公网 HTTPS、并且你管理 Cloudflare 账号/域名时使用:
|
|
56
78
|
|
|
57
|
-
|
|
79
|
+
```bash
|
|
80
|
+
forge setup configure --controller chatgpt --tunnel cloudflare
|
|
81
|
+
forge setup next
|
|
82
|
+
```
|
|
58
83
|
|
|
59
|
-
|
|
60
|
-
- `rh_context`:当前仓库的有界上下文;
|
|
61
|
-
- `rh_work`:开始或继续有边界工作;
|
|
62
|
-
- `rh_inbox`:需要决定、审批或处理的事项。
|
|
84
|
+
setup 会检测当前平台与 `cloudflared`。macOS 有 Homebrew 时可直接给出安装命令;Linux/WSL2 与 Windows 会给对应的官方安装路径,不会假设所有机器都是 Mac。
|
|
63
85
|
|
|
64
|
-
|
|
86
|
+
named tunnel 建好后,只记录最终 `/mcp` URL:
|
|
65
87
|
|
|
66
|
-
|
|
88
|
+
```bash
|
|
89
|
+
forge setup configure \
|
|
90
|
+
--controller chatgpt \
|
|
91
|
+
--tunnel existing \
|
|
92
|
+
--endpoint https://forge.example.com/mcp
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### C. Tailscale Funnel
|
|
96
|
+
|
|
97
|
+
已有 Tailscale 时可以选择:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
forge setup configure --controller chatgpt --tunnel tailscale
|
|
101
|
+
forge setup next
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Forge 检查当前平台的 Tailscale CLI 并引导 Funnel;获得最终 HTTPS `/mcp` URL 后再记录。
|
|
105
|
+
|
|
106
|
+
### D. 已有 HTTPS 或暂缓远程连接
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
forge setup configure \
|
|
110
|
+
--controller chatgpt \
|
|
111
|
+
--tunnel existing \
|
|
112
|
+
--endpoint https://forge.example.com/mcp
|
|
113
|
+
|
|
114
|
+
# 暂时只完成本地配置:
|
|
115
|
+
forge setup configure --controller chatgpt --tunnel none
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Cloudflare/Tailscale/已有 HTTPS 本质上会让 MCP endpoint 成为公网或互联网可达地址;OpenAI Secure MCP Tunnel 是组织有权限时的私有出站方案。
|
|
119
|
+
|
|
120
|
+
## 4. 在 ChatGPT 创建 App / Connector
|
|
121
|
+
|
|
122
|
+
ChatGPT UI 会变化,所以以 OpenAI 当前 Developer Mode 文档为准,不在 Forge 文档中固定截图路径。
|
|
123
|
+
|
|
124
|
+
使用 Secure MCP Tunnel 时选择 **Tunnel** 连接方式并选择/填入 tunnel ID;使用 HTTPS 时填入稳定、以 `/mcp` 结尾的 URL,并走 Forge 生成的 OAuth 流程。
|
|
125
|
+
|
|
126
|
+
创建后扫描/刷新工具。不要为了看到更多工具名而直接切到 exhaustive compatibility toolset;默认收敛工具面是安全和可用性设计的一部分。
|
|
127
|
+
|
|
128
|
+
## 5. 验证真实调用
|
|
129
|
+
|
|
130
|
+
先从只读提示开始:
|
|
67
131
|
|
|
68
132
|
```text
|
|
69
|
-
使用 Forge
|
|
133
|
+
使用 Forge。调用 rh_status,告诉我 Forge Runtime 是否 ready。
|
|
134
|
+
先不要做任何修改。
|
|
70
135
|
```
|
|
71
136
|
|
|
72
|
-
|
|
137
|
+
之后再授权一个仓库或普通目录做读取验证。**真正 setup 成功的证据是 ChatGPT 已经实际调用 Forge**;只保存了 tunnel ID,或本机进程在运行,都不等于端到端已经连通。
|
|
138
|
+
|
|
139
|
+
## 6. 安全规则
|
|
73
140
|
|
|
74
|
-
- MCP
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
141
|
+
- Forge MCP 与 Utility Console 都保持 loopback。
|
|
142
|
+
- 条件允许时优先使用私有出站的 Secure MCP Tunnel。
|
|
143
|
+
- 使用公网 HTTPS tunnel 时只暴露 MCP,不暴露本地 Utility Console。
|
|
144
|
+
- 不要把 MCP token、OAuth secret、tunnel runtime API key、admin key 发到聊天或写入 Forge setup state。
|
|
145
|
+
- 远程 Git、GitHub、邮件、破坏性清理、发布和密钥仍分别授权。
|
|
146
|
+
- Codex/Claude 只有明确选择为主控或执行入口时才配置。
|
|
79
147
|
|
|
80
|
-
|
|
148
|
+
需要软件开发能力时继续[教程 3:第一个仓库任务](03-first-repository-task.zh-CN.md)。Runtime、tunnel、Connector 或工具面异常时查看[故障排查](../operations/troubleshooting.zh-CN.md)。
|
|
@@ -47,7 +47,7 @@ Every registered-repository execution is bound to a stable `repoId` and an expli
|
|
|
47
47
|
|
|
48
48
|
### Direct versus durable work
|
|
49
49
|
|
|
50
|
-
Investigation is not itself a reason to create Work. A small, understood change can stay Direct. Durable Work, worktrees,
|
|
50
|
+
Investigation is not itself a reason to create Work. A small, understood change can stay Direct. Durable Work, worktrees, or workers are introduced when recovery, dependency tracking, isolation, long-running execution, or real risk requires them.
|
|
51
51
|
|
|
52
52
|
### Process Runtime
|
|
53
53
|
|
|
@@ -16,13 +16,13 @@ npm install -g . --omit=optional --no-audit --no-fund
|
|
|
16
16
|
After the package is visibly published to npm:
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
npm install -g @moretea-labs/forge
|
|
19
|
+
npm install -g @moretea-labs/forge
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
Bun installs the same npm artifact:
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
|
-
bun add -g @moretea-labs/forge
|
|
25
|
+
bun add -g @moretea-labs/forge
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
Do not infer npm publication from a GitHub tag or prerelease alone.
|
package/docs/wiki/Quick-Start.md
CHANGED
|
@@ -6,7 +6,7 @@ Resolve the repository and checkout, read current status, and check whether an I
|
|
|
6
6
|
|
|
7
7
|
## 2. Plan the smallest safe unit
|
|
8
8
|
|
|
9
|
-
Use direct edits for bounded changes. Use durable Tasks, isolated worktrees, or
|
|
9
|
+
Use direct edits for bounded changes. Use durable Tasks, isolated worktrees, or Goal Workloop coordination when work is long-running, parallel, dependency-aware, or high risk.
|
|
10
10
|
|
|
11
11
|
## 3. Execute with ownership
|
|
12
12
|
|
package/install.ps1
CHANGED
|
@@ -16,7 +16,6 @@ function Add-PathEntry([string]$PathEntry) { if ($PathEntry -and (Test-Path $Pat
|
|
|
16
16
|
function Refresh-InstallerPath { Add-PathEntry $BunBin; if ($env:APPDATA) { Add-PathEntry (Join-Path $env:APPDATA "npm") }; if (Test-Command "npm") { $npmPrefix = (& npm config get prefix 2>$null | Select-Object -First 1).Trim(); Add-PathEntry $npmPrefix } }
|
|
17
17
|
function Assert-Prerequisites {
|
|
18
18
|
if ($PSVersionTable.PSVersion -lt [version]"5.1") { throw "PowerShell 5.1 or newer is required. PowerShell 7 is recommended." }
|
|
19
|
-
if (-not (Test-Command "git")) { throw "Git is required. Install Git for Windows, reopen PowerShell, and rerun this installer." }
|
|
20
19
|
if (-not (Test-Command "node")) { throw "Node.js 20.10 or newer is required because the published Forge launcher uses Node." }
|
|
21
20
|
$nodeText = (& node -p "process.versions.node").Trim(); if ($LASTEXITCODE -ne 0 -or -not $nodeText) { throw "Node.js is present, but its version could not be read." }
|
|
22
21
|
if ([version]$nodeText -lt $MinimumNodeVersion) { throw "Node.js 20.10 or newer is required; found $nodeText." }
|
|
@@ -30,7 +29,7 @@ function Select-InstallRuntime {
|
|
|
30
29
|
default { throw "Invalid FORGE_INSTALL_RUNTIME=$InstallRuntime. Expected auto, bun, or node." }
|
|
31
30
|
}
|
|
32
31
|
}
|
|
33
|
-
if ($DryRun -or $env:FORGE_DRY_RUN -eq "1") { Write-Host "DRY RUN: would require
|
|
32
|
+
if ($DryRun -or $env:FORGE_DRY_RUN -eq "1") { Write-Host "DRY RUN: would require Node.js 20.10+ and npm/Bun, install $PackageName@$PackageVersion, and verify the Forge CLI. Git is optional until repository features are enabled."; exit 0 }
|
|
34
33
|
Refresh-InstallerPath
|
|
35
34
|
Assert-Prerequisites
|
|
36
35
|
$Runtime = Select-InstallRuntime
|
|
@@ -43,6 +42,6 @@ $Version = (& forge --version | Select-Object -First 1).Trim(); if ($LASTEXITCOD
|
|
|
43
42
|
& forge doctor --help *> $null; if ($LASTEXITCODE -ne 0) { throw "Forge installed, but the doctor command could not be loaded." }
|
|
44
43
|
Write-Host "Forge $Version installed."
|
|
45
44
|
Write-Host "Next:"
|
|
46
|
-
Write-Host " forge
|
|
47
|
-
Write-Host "
|
|
48
|
-
Write-Host "
|
|
45
|
+
Write-Host " forge setup"
|
|
46
|
+
Write-Host ""
|
|
47
|
+
Write-Host "Git is only needed when you enable repository/software-work features."
|
package/install.sh
CHANGED
|
@@ -13,7 +13,6 @@ HOME_DIR="${HOME:-}"
|
|
|
13
13
|
[ -n "$HOME_DIR" ] || die "HOME is not set"
|
|
14
14
|
BUN_INSTALL_DIR="${BUN_INSTALL:-$HOME_DIR/.bun}"
|
|
15
15
|
|
|
16
|
-
ensure_git() { has_command git || die "Git is required. Install Git and reopen the terminal."; }
|
|
17
16
|
ensure_node() {
|
|
18
17
|
has_command node || die "Node.js 20.10 or newer is required because the published Forge launcher uses Node."
|
|
19
18
|
node -e 'const [major, minor] = process.versions.node.split(".").map(Number); process.exit(major > 20 || (major === 20 && minor >= 10) ? 0 : 1)' \
|
|
@@ -51,16 +50,15 @@ verify_forge() {
|
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
if [ "${FORGE_DRY_RUN:-0}" = "1" ]; then
|
|
54
|
-
log "DRY RUN: would require
|
|
53
|
+
log "DRY RUN: would require Node.js 20.10 or newer and npm/Bun, install ${PACKAGE_NAME}@${PACKAGE_VERSION}, and verify the Forge CLI. Git is optional until repository features are enabled."
|
|
55
54
|
exit 0
|
|
56
55
|
fi
|
|
57
|
-
ensure_git
|
|
58
56
|
ensure_node
|
|
59
57
|
runtime="$(choose_runtime)"
|
|
60
58
|
install_forge "$runtime"
|
|
61
59
|
verify_forge
|
|
62
60
|
log ""
|
|
63
61
|
log "Next:"
|
|
64
|
-
log " forge
|
|
65
|
-
log "
|
|
66
|
-
log "
|
|
62
|
+
log " forge setup"
|
|
63
|
+
log ""
|
|
64
|
+
log "Git is only needed when you enable repository/software-work features."
|