page-harness 0.1.10 → 0.1.11
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 +35 -35
- package/README.zh-CN.md +36 -36
- package/dist/cli.js +145 -20
- package/dist/cli.js.map +1 -1
- package/dist/client/page/overlay.js +16 -16
- package/docs/dsh-preview-light.png +0 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="https://cdn.jsdelivr.net/npm/page-harness@0.1.
|
|
2
|
+
<img src="https://cdn.jsdelivr.net/npm/page-harness@0.1.10/docs/logo.svg" width="72" alt="page-harness logo">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<h1 align="center">page-harness</h1>
|
|
@@ -24,19 +24,13 @@
|
|
|
24
24
|
<a href="#development">Development</a>
|
|
25
25
|
</p>
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
<img src="https://cdn.jsdelivr.net/npm/page-harness@0.1.6/docs/hero.webp" width="720" alt="page-harness">
|
|
29
|
-
</p>
|
|
30
|
-
|
|
31
|
-
<p align="center">
|
|
32
|
-
<video src="https://cdn.jsdelivr.net/npm/page-harness@0.1.8/docs/hero.mp4" width="720" controls playsinline></video>
|
|
33
|
-
</p>
|
|
27
|
+
https://github.com/user-attachments/assets/113f12e7-c287-45d2-9f27-cb9158c539b2
|
|
34
28
|
|
|
35
29
|
## Overview
|
|
36
30
|
|
|
37
31
|
**Turn any running web page into a workspace for your coding agent.**
|
|
38
32
|
|
|
39
|
-
Click the
|
|
33
|
+
Start with one command—no project config changes, no extra accounts or API keys. Click the element you want changed on the live page to talk to your agent (Pick, Chat, Live candidates, and Artifacts), edit text and styles inline with a live preview, or pass `--share` so teammates can leave notes and approvals on the same page in real time. Behind the scenes it drives the agent CLI already on your machine (Claude Code, Codex, Cursor Agent, CodeBuddy Code, OpenCode), or embeds directly into the right pane of [DeepSeek Harness](./dsh-plugin/README.md). For feedback only, `--no-agent` keeps just Pick and Notes; run it with no URL and you get a home page with a **✦ Page-Harness** bookmarklet that works on any site.
|
|
40
34
|
|
|
41
35
|
Describing UI in a terminal is painful: "the second button in the card on the left, make it a bit softer". With page-harness you just click the thing on the page and talk to your agent right there. It writes the code, your dev server reloads, you see the result on the same page.
|
|
42
36
|
|
|
@@ -46,6 +40,7 @@ One line. Point it at your dev server:
|
|
|
46
40
|
|
|
47
41
|
```bash
|
|
48
42
|
npx page-harness http://localhost:5173 --project ./my-app
|
|
43
|
+
npx page-harness http://localhost:5173 --share # team review: invite link for teammates
|
|
49
44
|
npx page-harness --no-agent http://localhost:5173 # review only: Pick and Notes, no agent CLI
|
|
50
45
|
npx page-harness # no URL: home page with a bookmarklet
|
|
51
46
|
```
|
|
@@ -56,60 +51,61 @@ Open **http://127.0.0.1:17990**. That is your app as usual, plus a dock in the b
|
|
|
56
51
|
- The target can be a bare port (`3000`), `host:port` or a full URL. HMR (Vite, webpack, Next.js…) keeps working through the proxy.
|
|
57
52
|
- No sandbox, no accounts, no changes to your app. Everything stays in `<project>/.page-harness/`.
|
|
58
53
|
|
|
59
|
-
| Service | URL |
|
|
60
|
-
|---|---|
|
|
61
|
-
| Your app + dock | `http://127.0.0.1:17990` |
|
|
62
|
-
| Panel / API (control port) | `http://127.0.0.1:17991` |
|
|
63
|
-
| Chat history | `http://127.0.0.1:17991/__ph/history` |
|
|
64
|
-
| Bookmarklet home (no URL) | `http://127.0.0.1:17991` |
|
|
65
|
-
|
|
66
54
|
### Other ways to run
|
|
67
55
|
|
|
68
56
|
| Option | When to use it |
|
|
69
57
|
|---|---|
|
|
70
|
-
| `npx page-harness <url>` | The standard setup above: your app behind the proxy, with Pick, Chat and Artifacts driven by an agent CLI |
|
|
71
|
-
| `--
|
|
58
|
+
| `npx page-harness <url>` | The standard setup above: your app behind the proxy, with Pick, Chat, Live candidates and Artifacts driven by an agent CLI |
|
|
59
|
+
| `--share` | Teammates on your network join as reviewers with a link, leave notes, edit inline and approve ([details](#team-review---share)) |
|
|
60
|
+
| `--no-agent <url>` | Feedback & inline edits only: Pick and Notes, no agent CLI needed ([details](#review-only---no-agent)) |
|
|
72
61
|
| no URL | A home page with the **✦ Page-Harness** bookmarklet, to leave notes on any site without a proxy ([details](#bookmarklet-no-url)) |
|
|
73
|
-
|
|
|
62
|
+
| `dsh plugin --profile web add page-harness-dsh` | Embed the running page in the right pane of DeepSeek Harness, pick elements into chat, and share with teammates ([details](./dsh-plugin/README.md)) |
|
|
74
63
|
|
|
75
64
|
## Product tour
|
|
76
65
|
|
|
77
|
-
###
|
|
66
|
+
### DeepSeek Harness right-pane preview
|
|
67
|
+
|
|
68
|
+
**Preview beside your chat.** With [`page-harness-dsh`](./dsh-plugin/README.md), the page opens in a resizable right pane inside DeepSeek Harness: pick elements straight into the prompt box, leave notes on the page, and share the preview with teammates.
|
|
69
|
+
|
|
70
|
+
<p align="center"><img src="./docs/dsh-preview-light.png" width="720" alt="DeepSeek Harness right-pane preview"></p>
|
|
78
71
|
|
|
79
|
-
|
|
72
|
+
### Review only & inline editing
|
|
80
73
|
|
|
81
|
-
|
|
74
|
+
**Pick, edit inline, and leave notes.** With `--no-agent` no agent CLI is started. Pick an element, leave a comment or edit its text and styles in place with a live preview, reply, resolve and approve per page. [Details →](#review-only---no-agent)
|
|
75
|
+
|
|
76
|
+
<p align="center"><img src="https://cdn.jsdelivr.net/npm/page-harness@0.1.10/docs/review-only.png" width="720" alt="Page notes panel in review-only mode"></p>
|
|
82
77
|
|
|
83
78
|
### Bookmarklet home
|
|
84
79
|
|
|
85
80
|
**One button to drag.** Run `npx page-harness` with no URL and the home page has a single **✦ Page-Harness** button. Drag it to the bookmarks bar. [Details →](#bookmarklet-no-url)
|
|
86
81
|
|
|
87
|
-
<p align="center"><img src="https://cdn.jsdelivr.net/npm/page-harness@0.1.
|
|
82
|
+
<p align="center"><img src="https://cdn.jsdelivr.net/npm/page-harness@0.1.10/docs/home.png" width="520" alt="Home page with the ✦ Page-Harness button"></p>
|
|
88
83
|
|
|
89
84
|
### Notes on any site
|
|
90
85
|
|
|
91
86
|
**Click the bookmark on any page.** The dock is injected into that page in a Shadow DOM, with no proxy, and notes are saved to your local server, grouped by site.
|
|
92
87
|
|
|
93
|
-
<p align="center"><img src="https://cdn.jsdelivr.net/npm/page-harness@0.1.
|
|
88
|
+
<p align="center"><img src="https://cdn.jsdelivr.net/npm/page-harness@0.1.10/docs/bookmarklet.png" width="720" alt="Bookmarklet dock on a plain page"></p>
|
|
94
89
|
|
|
95
90
|
### My notes
|
|
96
91
|
|
|
97
92
|
**Every site's notes in one place.** Sites on the left, that site's notes on the right, with Export Markdown, Export JSON and Copy prompt for your agent.
|
|
98
93
|
|
|
99
|
-
<p align="center"><img src="https://cdn.jsdelivr.net/npm/page-harness@0.1.
|
|
94
|
+
<p align="center"><img src="https://cdn.jsdelivr.net/npm/page-harness@0.1.10/docs/home-notes.png" width="720" alt="My notes view"></p>
|
|
100
95
|
|
|
101
96
|
## How it works
|
|
102
97
|
|
|
103
98
|
```text
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
99
|
+
Running web page ──► In-page dock (Pick / Inline edit / Notes / Chat / Artifacts)
|
|
100
|
+
│
|
|
101
|
+
▼
|
|
102
|
+
Local coding agent CLI (Claude Code / Codex / Cursor / CodeBuddy / OpenCode)
|
|
103
|
+
│
|
|
104
|
+
▼
|
|
105
|
+
Edits source or renders Live variants ──► Instant HMR preview & team review
|
|
110
106
|
```
|
|
111
107
|
|
|
112
|
-
- The overlay lives in a Shadow DOM so its styles and your app's styles do not leak into each other.
|
|
108
|
+
- The overlay lives in a Shadow DOM so its styles and your app's styles do not leak into each other.
|
|
113
109
|
- Each chat keeps the agent's session id, so follow-up messages resume the same agent session. Messages sent while a turn runs are queued per chat.
|
|
114
110
|
- Agents get a short system prompt describing the page context, the MCP tools and the Live protocol. Nothing is written to your project except `.page-harness/` (ignored by git through its own `.gitignore`) and, during Live, temporary candidate markup.
|
|
115
111
|
|
|
@@ -170,6 +166,8 @@ npx page-harness https://example.com --share
|
|
|
170
166
|
|
|
171
167
|
Send the Share link (also in Settings → Team) to teammates on the same network. Opening it gives them a reviewer session for that browser; they enter a display name once and then see the page with everyone's notes and changes in real time. Reviewers can comment, edit (review mode), reply, resolve and approve. They cannot run or see the agent, chats, history, uploads or page control. Other machines without the link get `403`.
|
|
172
168
|
|
|
169
|
+
Teammates need both ports: the app port and the control port. On a cloud machine, open both ports and pass `--public-host <public IP or domain>` so the invite link points there. To start a share preview from DeepSeek Harness, see [`dsh-plugin/`](./dsh-plugin/README.md).
|
|
170
|
+
|
|
173
171
|
## Features
|
|
174
172
|
|
|
175
173
|
| Area | Highlights |
|
|
@@ -231,6 +229,9 @@ page-harness [frontend-url] [options]
|
|
|
231
229
|
The dock is Pick and Notes. Implied when no URL is given.
|
|
232
230
|
--lang <zh|en> Home page and dock language. Omit it and each browser keeps its own.
|
|
233
231
|
--share Let teammates on your network join as reviewers (listens on 0.0.0.0)
|
|
232
|
+
--public-host <name> Hostname or IP teammates use; goes into the invite link and the Host allow-list
|
|
233
|
+
--json Print one JSON line with the URLs to stdout once listening
|
|
234
|
+
--embed-origin <origin> Let this origin frame the page and panels; Pick quotes are posted to it (repeatable)
|
|
234
235
|
--verbose / --quiet
|
|
235
236
|
```
|
|
236
237
|
|
|
@@ -327,6 +328,7 @@ Delete `<project>/.page-harness/`.
|
|
|
327
328
|
| [Security model](#security-model) | What is locked down and how |
|
|
328
329
|
| [Data](#data) | What is stored in `.page-harness/` |
|
|
329
330
|
| [FAQ](#faq) | Common questions |
|
|
331
|
+
| [Homepage](https://cocofhu.github.io/page-harness-site/) | Product tour and install |
|
|
330
332
|
| [npm package](https://www.npmjs.com/package/page-harness) | Released versions |
|
|
331
333
|
|
|
332
334
|
## Development
|
|
@@ -338,13 +340,11 @@ node dist/cli.js http://localhost:5173 --project ../some-app
|
|
|
338
340
|
|
|
339
341
|
npm run lint
|
|
340
342
|
npm run typecheck
|
|
341
|
-
npm test # unit + server integration tests
|
|
343
|
+
npm test # unit + server integration tests
|
|
342
344
|
npx playwright install chromium
|
|
343
345
|
npm run build && npm run test:e2e # browser tests against a fixture app
|
|
344
346
|
```
|
|
345
347
|
|
|
346
|
-
`PH_FAKE_AGENT=1` adds a scripted `fake` agent used by the tests; it drives the real MCP endpoint, so the whole pipeline is exercised without an LLM.
|
|
347
|
-
|
|
348
348
|
## Contributing
|
|
349
349
|
|
|
350
350
|
Issues and pull requests are welcome at [Tencent/page-harness](https://github.com/Tencent/page-harness).
|
package/README.zh-CN.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="https://cdn.jsdelivr.net/npm/page-harness@0.1.
|
|
2
|
+
<img src="https://cdn.jsdelivr.net/npm/page-harness@0.1.10/docs/logo.svg" width="72" alt="page-harness logo">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<h1 align="center">page-harness</h1>
|
|
@@ -24,19 +24,13 @@
|
|
|
24
24
|
<a href="#开发">开发</a>
|
|
25
25
|
</p>
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
<img src="https://cdn.jsdelivr.net/npm/page-harness@0.1.6/docs/hero-zh.webp" width="720" alt="page-harness">
|
|
29
|
-
</p>
|
|
30
|
-
|
|
31
|
-
<p align="center">
|
|
32
|
-
<video src="https://cdn.jsdelivr.net/npm/page-harness@0.1.8/docs/hero-zh.mp4" width="720" controls playsinline></video>
|
|
33
|
-
</p>
|
|
27
|
+
https://github.com/user-attachments/assets/7fe5d123-58e2-4aa2-a5e3-f7fe9eae51b7
|
|
34
28
|
|
|
35
29
|
## 概览
|
|
36
30
|
|
|
37
31
|
**把正在跑的网页,直接变成编码 Agent 的工作台。**
|
|
38
32
|
|
|
39
|
-
|
|
33
|
+
一行命令启动,不用改项目配置,也不用额外注册账号或填 API Key。直接在页面上点选要改的元素就能跟 Agent 对话(取点、聊天、Live 多套候选方案、看产物),或者原地在线修改文字与样式实时预览;加个 `--share` 还能生成分享链接,拉上产品、设计与测试同事在同一个页面上实时批注和审批。背后直接驱动你电脑上已经装好的 Agent CLI(Claude Code、Codex、Cursor Agent、CodeBuddy Code、OpenCode),也可以装进 [DeepSeek Harness](./dsh-plugin/README.md) 在对话右栏直接预览。只想收集意见的话,`--no-agent` 只留取点和意见;不给地址直接跑,会打开一个书签主页,把 **✦ Page-Harness** 拖到书签栏,任何网页都能标。
|
|
40
34
|
|
|
41
35
|
在终端里描述界面挺折磨人的:“左边卡片里第二个按钮,颜色再柔和一点”。我就想直接在页面上点一下,跟 Agent 说改成什么样。它改代码,dev server 刷新,结果就在同一个页面上看。page-harness 干的就是这件事。
|
|
42
36
|
|
|
@@ -46,7 +40,8 @@
|
|
|
46
40
|
|
|
47
41
|
```bash
|
|
48
42
|
npx page-harness http://localhost:5173 --project ./my-app
|
|
49
|
-
npx page-harness
|
|
43
|
+
npx page-harness http://localhost:5173 --share # 团队评审:生成分享链接让同事一起看
|
|
44
|
+
npx page-harness --no-agent http://localhost:5173 # 只评审:取点 + 在线编辑 + 意见,不启动 Agent CLI
|
|
50
45
|
npx page-harness # 不给地址:打开书签主页
|
|
51
46
|
```
|
|
52
47
|
|
|
@@ -56,60 +51,61 @@ npx page-harness # 不给地址:打开书
|
|
|
56
51
|
- 地址可以只写端口(`3000`)、`host:port` 或完整 URL。Vite、webpack、Next.js 这些的热更新照常能用,WebSocket 也代理过去了。
|
|
57
52
|
- 不要沙箱,不要注册账号,也不碰你的项目代码。数据都放在 `<project>/.page-harness/` 里。
|
|
58
53
|
|
|
59
|
-
| 服务 | 地址 |
|
|
60
|
-
|---|---|
|
|
61
|
-
| 你的应用 + 底栏 | `http://127.0.0.1:17990` |
|
|
62
|
-
| 面板 / API(控制端口) | `http://127.0.0.1:17991` |
|
|
63
|
-
| 对话历史 | `http://127.0.0.1:17991/__ph/history` |
|
|
64
|
-
| 书签主页(不给地址时) | `http://127.0.0.1:17991` |
|
|
65
|
-
|
|
66
54
|
### 其他跑法
|
|
67
55
|
|
|
68
56
|
| 方式 | 什么时候用 |
|
|
69
57
|
|---|---|
|
|
70
|
-
| `npx page-harness <地址>` |
|
|
71
|
-
| `--
|
|
58
|
+
| `npx page-harness <地址>` | 上面这种标准用法:应用走代理,取点、对话、Live 候选、产物都由 Agent CLI 驱动 |
|
|
59
|
+
| `--share` | 同一网络的同事拿链接进来当评审,实时留意见、在线改样式、按页审批([详细](#团队评审--share)) |
|
|
60
|
+
| `--no-agent <地址>` | 只收意见与在线改样式:取点 + 意见,不需要 Agent CLI([详细](#仅评审--no-agent)) |
|
|
72
61
|
| 不给地址 | 打开带 **✦ Page-Harness** 书签的主页,不走代理也能在任意网站上留意见([详细](#书签不给地址)) |
|
|
73
|
-
|
|
|
62
|
+
| `dsh plugin --profile web add page-harness-dsh` | 在 DeepSeek Harness 对话右侧直接预览页面、取点引用回填输入框、一键分享给同事([详细](./dsh-plugin/README.md)) |
|
|
74
63
|
|
|
75
64
|
## 上手看看
|
|
76
65
|
|
|
77
|
-
###
|
|
66
|
+
### DeepSeek Harness 右栏预览
|
|
67
|
+
|
|
68
|
+
**边聊边看。** 装上 [`page-harness-dsh`](./dsh-plugin/README.md) 后,页面直接嵌在 DeepSeek Harness 对话右侧:点元素一键引用到输入框,在页面上留批注后说一句「按意见改」,还能一键分享给同事评审。
|
|
69
|
+
|
|
70
|
+
<p align="center"><img src="./docs/dsh-preview-light.png" width="720" alt="DeepSeek Harness 对话右侧预览页面"></p>
|
|
78
71
|
|
|
79
|
-
|
|
72
|
+
### 仅评审与在线编辑
|
|
80
73
|
|
|
81
|
-
|
|
74
|
+
**取点、在线改样式、留意见。** 加 `--no-agent` 就不启动 Agent CLI。点元素留评论或者原地修改文字、颜色、字号、圆角实时预览,回复、解决、按页面审批都行。[详细 →](#仅评审--no-agent)
|
|
75
|
+
|
|
76
|
+
<p align="center"><img src="https://cdn.jsdelivr.net/npm/page-harness@0.1.10/docs/review-only-zh.png" width="720" alt="仅评审模式下的页面意见面板"></p>
|
|
82
77
|
|
|
83
78
|
### 书签主页
|
|
84
79
|
|
|
85
80
|
**就一个按钮,拖走就行。** 不给地址直接跑 `npx page-harness`,主页上只有一个 **✦ Page-Harness** 按钮,拖到书签栏。[详细 →](#书签不给地址)
|
|
86
81
|
|
|
87
|
-
<p align="center"><img src="https://cdn.jsdelivr.net/npm/page-harness@0.1.
|
|
82
|
+
<p align="center"><img src="https://cdn.jsdelivr.net/npm/page-harness@0.1.10/docs/home-zh.png" width="520" alt="主页上的 ✦ Page-Harness 按钮"></p>
|
|
88
83
|
|
|
89
84
|
### 任意网站留意见
|
|
90
85
|
|
|
91
86
|
**打开哪个网页都能点。** 底栏直接注入到当前页面(放在 Shadow DOM 里,不走代理),意见存到本机服务,按网站分好。
|
|
92
87
|
|
|
93
|
-
<p align="center"><img src="https://cdn.jsdelivr.net/npm/page-harness@0.1.
|
|
88
|
+
<p align="center"><img src="https://cdn.jsdelivr.net/npm/page-harness@0.1.10/docs/bookmarklet-zh.png" width="720" alt="书签注入到普通页面上的底栏"></p>
|
|
94
89
|
|
|
95
90
|
### 我的标记
|
|
96
91
|
|
|
97
92
|
**所有网站的意见都在这。** 左边网站,右边这个网站的意见,可以导出 Markdown、导出 JSON,或者复制 Prompt 丢给 Agent。
|
|
98
93
|
|
|
99
|
-
<p align="center"><img src="https://cdn.jsdelivr.net/npm/page-harness@0.1.
|
|
94
|
+
<p align="center"><img src="https://cdn.jsdelivr.net/npm/page-harness@0.1.10/docs/home-notes-zh.png" width="720" alt="我的标记页"></p>
|
|
100
95
|
|
|
101
96
|
## 原理
|
|
102
97
|
|
|
103
98
|
```text
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
99
|
+
正在运行的网页 ──► 页面悬浮底栏(取点 / 在线编辑 / 团队意见 / 对话 / 产物)
|
|
100
|
+
│
|
|
101
|
+
▼
|
|
102
|
+
连接本机 Agent CLI(Claude Code / Codex / Cursor / CodeBuddy / OpenCode)
|
|
103
|
+
│
|
|
104
|
+
▼
|
|
105
|
+
修改源码或生成多套候选方案 ──► 页面实时热更新预览 & 团队评审闭环
|
|
110
106
|
```
|
|
111
107
|
|
|
112
|
-
- 底栏在 Shadow DOM
|
|
108
|
+
- 底栏在 Shadow DOM 里,和你的样式互不影响。
|
|
113
109
|
- 每个会话记住 Agent 的 session id,后续消息续接同一个 Agent 会话;一轮还在跑时发的消息进入该会话的队列。
|
|
114
110
|
- Agent 会收到一段简短的系统提示,说明页面上下文、MCP 工具和 Live 协议。除了 `.page-harness/`(自带 `.gitignore`)和 Live 期间的临时候选标记外,不会往你的项目里写东西。
|
|
115
111
|
|
|
@@ -170,6 +166,8 @@ npx page-harness https://example.com --share
|
|
|
170
166
|
|
|
171
167
|
把 Share 链接(设置 → 团队里也有)发给同一网络的同事。打开后这个浏览器获得评审者身份,填一次显示名,就能实时看到页面上所有人的意见和修改。评审者可以评论、编辑(评审模式)、回复、解决、审批;不能使用或看到 Agent、对话、聊天记录、上传和页面控制。没有链接的其他机器一律 `403`。
|
|
172
168
|
|
|
169
|
+
同事需要能访问两个端口:应用端口和控制端口。在云主机上,放行这两个端口,并加 `--public-host <公网 IP 或域名>`,邀请链接就会指向它。想在 DeepSeek Harness 里一键启动分享预览,见 [`dsh-plugin/`](./dsh-plugin/README.md)。
|
|
170
|
+
|
|
173
171
|
## 功能
|
|
174
172
|
|
|
175
173
|
| 模块 | 亮点 |
|
|
@@ -231,6 +229,9 @@ page-harness [前端地址] [选项]
|
|
|
231
229
|
不给前端地址时默认就是这个模式。
|
|
232
230
|
--lang <zh|en> 主页和底栏的语言。不写时,每个浏览器沿用自己的选择。
|
|
233
231
|
--share 允许同一网络的同事以评审者身份加入(监听 0.0.0.0)
|
|
232
|
+
--public-host <name> 同事访问用的主机名或 IP,写进邀请链接并加入 Host 白名单
|
|
233
|
+
--json 监听成功后往 stdout 打一行包含各地址的 JSON
|
|
234
|
+
--embed-origin <origin> 允许这个源用 iframe 嵌入页面和面板,取点引用会 postMessage 给它(可重复)
|
|
234
235
|
--verbose / --quiet
|
|
235
236
|
```
|
|
236
237
|
|
|
@@ -327,6 +328,7 @@ team.json 邀请 token、签名密钥和评审者名字(权
|
|
|
327
328
|
| [安全模型](#安全模型) | 哪些地方锁住了,怎么锁的 |
|
|
328
329
|
| [数据](#数据) | `.page-harness/` 里存了什么 |
|
|
329
330
|
| [常见问题](#常见问题) | 大家常问的 |
|
|
331
|
+
| [官网](https://cocofhu.github.io/page-harness-site/) | 产品演示与安装 |
|
|
330
332
|
| [npm 包](https://www.npmjs.com/package/page-harness) | 已发布的版本 |
|
|
331
333
|
|
|
332
334
|
## 开发
|
|
@@ -338,13 +340,11 @@ node dist/cli.js http://localhost:5173 --project ../some-app
|
|
|
338
340
|
|
|
339
341
|
npm run lint
|
|
340
342
|
npm run typecheck
|
|
341
|
-
npm test # 单元测试 +
|
|
343
|
+
npm test # 单元测试 + 服务端集成测试
|
|
342
344
|
npx playwright install chromium
|
|
343
345
|
npm run build && npm run test:e2e # 基于示例应用的浏览器测试
|
|
344
346
|
```
|
|
345
347
|
|
|
346
|
-
设置 `PH_FAKE_AGENT=1` 会多出一个脚本化的 `fake` Agent,测试用它走真实的 MCP 接口,不需要大模型就能覆盖整条链路。
|
|
347
|
-
|
|
348
348
|
## 参与贡献
|
|
349
349
|
|
|
350
350
|
欢迎到 [Tencent/page-harness](https://github.com/Tencent/page-harness) 提 Issue 和 PR。
|