@spotpatch/next 0.5.0 → 0.7.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/README.md +60 -0
- package/dist/cli.js +579 -48
- package/dist/cli.js.map +1 -1
- package/dist/client.cjs +29 -0
- package/dist/client.cjs.map +1 -1
- package/dist/client.js +9 -0
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +20 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +20 -5
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -70,6 +70,36 @@ import "@spotpatch/next/client";
|
|
|
70
70
|
|
|
71
71
|
Start development through the package script, not a direct `next dev` command. A successful startup prints one line beginning with `[spotpatch:next] ready`; the page then mounts one `spotpatch-root` Shadow DOM host with the **Select element** / **选择元素** action.
|
|
72
72
|
|
|
73
|
+
### External Agent handoff (local validation)
|
|
74
|
+
|
|
75
|
+
Enable the development-only handoff UI explicitly in the same wrapper options:
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
export default withSpotPatch({ externalAgent: true })(nextConfig);
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Run setup and active commands from the exact canonical project root that owns the running `spotpatch-next dev` session. Setup is a dry run without `--write`:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
pnpm exec spotpatch-next bridge setup --client claude --scope project --mode active --write
|
|
85
|
+
MCP_PROTOCOL_NEGOTIATION=legacy claude --dangerously-load-development-channels server:spotpatch
|
|
86
|
+
|
|
87
|
+
pnpm exec spotpatch-next connect codex --allow-workspace-write
|
|
88
|
+
|
|
89
|
+
pnpm exec spotpatch-next bridge setup --client cursor --scope project --write
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The active command forms support an explicit session when `bridge sessions --json` reports multiple sessions for that exact root:
|
|
93
|
+
|
|
94
|
+
```text
|
|
95
|
+
spotpatch-next bridge channel claude [--session <opaque-id>]
|
|
96
|
+
spotpatch-next connect codex --allow-workspace-write [--session <opaque-id>]
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
The Claude legacy environment belongs on the Claude host process. Claude Channels are a Research Preview, work only while the Channel-enabled session is running, and provide no completion acknowledgement; completion depends on Claude calling the SpotPatch result tool. Codex active mode is zero-setup: the Connector injects the project-local SpotPatch MCP entry into its App Server thread and does not create or modify `.codex/config.toml`. Codex can still load other MCP servers already enabled by the user's normal Codex configuration. The Connector accepts exactly `codex-cli 0.149.0`. `bridge setup --client codex ...` remains available only for optional Inbox use; Cursor and all generic MCP hosts remain Inbox-only.
|
|
100
|
+
|
|
101
|
+
This path is `local-validation`, not part of the Next public-support promise. Automated fake-host and two-handoff tests exist, and a consecutive two-revision Codex flow has been manually validated on the recorded macOS/Next.js/Codex 0.149.0 environment. Real Claude Code consecutive delivery, repeatable real-host automation, and Windows process-tree cleanup remain `not-tested`; Cursor remains Inbox-only. See the [external Agent design and exact status](https://github.com/huanglvjing/spotpatch/blob/main/docs/%E6%8A%80%E6%9C%AF%E6%96%B9%E6%A1%88/%E5%A4%96%E9%83%A8Agent%E8%BF%9E%E6%8E%A5/00-%E7%B4%A2%E5%BC%95%E4%B8%8E%E5%86%B3%E7%AD%96%E6%91%98%E8%A6%81.md).
|
|
102
|
+
|
|
73
103
|
### Current evidence and remaining gates
|
|
74
104
|
|
|
75
105
|
The public preview has passed:
|
|
@@ -173,6 +203,36 @@ import "@spotpatch/next/client";
|
|
|
173
203
|
|
|
174
204
|
必须通过 package script 启动,而不是直接运行 `next dev`。成功启动时终端只打印一条以 `[spotpatch:next] ready` 开头的信息;页面随后挂载唯一 `spotpatch-root` Shadow DOM,并显示 **Select element** / **选择元素** 操作。
|
|
175
205
|
|
|
206
|
+
### 外部 Agent 交接(本地验证)
|
|
207
|
+
|
|
208
|
+
在同一包装器选项中显式启用仅开发期的交接 UI:
|
|
209
|
+
|
|
210
|
+
```ts
|
|
211
|
+
export default withSpotPatch({ externalAgent: true })(nextConfig);
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
必须在当前 `spotpatch-next dev` Session 所属的精确 canonical 项目根执行 setup 和主动命令。setup 不带 `--write` 时只是 dry-run:
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
pnpm exec spotpatch-next bridge setup --client claude --scope project --mode active --write
|
|
218
|
+
MCP_PROTOCOL_NEGOTIATION=legacy claude --dangerously-load-development-channels server:spotpatch
|
|
219
|
+
|
|
220
|
+
pnpm exec spotpatch-next connect codex --allow-workspace-write
|
|
221
|
+
|
|
222
|
+
pnpm exec spotpatch-next bridge setup --client cursor --scope project --write
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
若 `bridge sessions --json` 报告该精确项目根有多个 Session,主动子命令支持显式选择:
|
|
226
|
+
|
|
227
|
+
```text
|
|
228
|
+
spotpatch-next bridge channel claude [--session <opaque-id>]
|
|
229
|
+
spotpatch-next connect codex --allow-workspace-write [--session <opaque-id>]
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Claude legacy 环境变量必须设置在 Claude 宿主进程。Claude Channels 仍是 Research Preview,只在已启用 Channel 的会话运行时工作,且没有 completion ACK;完成状态依赖 Claude 调用 SpotPatch 结果 tool。Codex 主动模式为零配置:Connector 只把当前项目的 SpotPatch MCP 配置注入它拥有的 App Server thread,不创建也不修改 `.codex/config.toml`;Codex 仍可能按用户既有配置启动其他已启用 MCP server。Connector 当前只接受 `codex-cli 0.149.0`。`bridge setup --client codex ...` 仅保留为可选 Inbox 配置;Cursor 和所有普通 MCP 宿主仍为 Inbox-only。
|
|
233
|
+
|
|
234
|
+
该链路当前只是 `local-validation`,不属于 Next 正式支持承诺。仓库有假宿主和连续两 Handoff 自动化测试,并已在记录的 macOS/Next.js/Codex 0.149.0 环境人工验证连续两个 revision。真实 Claude Code 连续投递、可重复真实宿主自动化和 Windows 进程树清理仍为 `not-tested`;Cursor 保持 Inbox-only。准确边界见[外部 Agent 方案与实现状态](https://github.com/huanglvjing/spotpatch/blob/main/docs/%E6%8A%80%E6%9C%AF%E6%96%B9%E6%A1%88/%E5%A4%96%E9%83%A8Agent%E8%BF%9E%E6%8E%A5/00-%E7%B4%A2%E5%BC%95%E4%B8%8E%E5%86%B3%E7%AD%96%E6%91%98%E8%A6%81.md)。
|
|
235
|
+
|
|
176
236
|
### 当前证据与剩余门禁
|
|
177
237
|
|
|
178
238
|
公共预览已经通过:
|