dsh-site-bridge 0.4.0 → 0.4.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.
package/README.md CHANGED
@@ -70,9 +70,8 @@ candidates checked for uniqueness, and the site's own xhr/fetch calls with heade
70
70
  written to files an agent can read. Automation exists so that "this selector works" and "this BFF call
71
71
  passes with my cookies" are checked against the live page instead of assumed.
72
72
 
73
- The practical consequence: for generic web browsing, a dedicated automation plugin will have more
74
- tools than this one, and that is fine — it is solving a different problem. For writing an extension
75
- that embeds into one specific site, you need the capture, and the input comes with it.
73
+ The practical consequence: this plugin is built for writing an extension for one specific site, and
74
+ the input tools exist to verify that work against the live page rather than to browse the web.
76
75
 
77
76
  ## Requirements
78
77
 
@@ -181,12 +180,12 @@ The wire protocol is small and documented in [docs/protocol.md](docs/protocol.md
181
180
  puts a secret under an unusual key, redaction will not recognise it. Treat a capture bundle as
182
181
  sensitive, exactly like any traffic dump.
183
182
 
184
- ### Position on trust
183
+ ### Trust model
185
184
 
186
- This is a deliberate trade-off, not a claim of superiority. The bridge requires a token and the
187
- extension asks for `debugger` rather than `<all_urls>`, which costs convenience — a pairing step and
188
- the Chrome debugging banner — and buys a smaller blast radius. Plugins that skip the token or take
189
- host permissions are not doing it wrong; they optimise for a different thing.
185
+ The bridge accepts only requests that carry the pairing token. The extension asks for `debugger`
186
+ instead of `<all_urls>` and does not inject a content script into every page. The cost is a pairing
187
+ step and Chrome's debugging banner. In exchange the permission is granted per tab, for the duration
188
+ of a session, and requests are read where they are made — no credential is copied out of the browser.
190
189
 
191
190
  ## Limitations
192
191
 
package/README.ru.md CHANGED
@@ -70,9 +70,8 @@ site_capture → captures/<host>/<timestamp>/
70
70
  которые агент читает. Автоматизация нужна, чтобы «этот селектор работает» и «этот вызов BFF проходит
71
71
  с моими куками» проверялись на живой странице, а не предполагались.
72
72
 
73
- Практическое следствие: для обычного браузинга специализированный плагин автоматизации даст больше
74
- инструментов, и это нормально — он решает другую задачу. Для написания расширения, встраивающегося в
75
- конкретный сайт, нужен снимок, а ввод идёт в комплекте.
73
+ Практическое следствие: плагин сделан для написания расширения под конкретный сайт, а инструменты
74
+ ввода нужны, чтобы проверять эту работу на живой странице, а не для браузинга.
76
75
 
77
76
  ## Требования
78
77
 
@@ -180,12 +179,12 @@ site_inject {js:"..."} → выполнить ваш скрипт в с
180
179
  сайт кладёт секрет под нестандартным ключом, редакция его не узнает. Считайте пакет снимка
181
180
  чувствительным, как и любой дамп трафика.
182
181
 
183
- ### Позиция по доверию
182
+ ### Модель доверия
184
183
 
185
- Это осознанный трейд-офф, а не заявка на превосходство. Мост требует токен, а расширение просит
186
- `debugger` вместо `<all_urls>`: теряется удобство — шаг сопряжения и плашка отладки Chrome — и
187
- уменьшается радиус поражения. Плагины, которые обходятся без токена или берут права на все сайты, не
188
- делают что-то неправильно; они оптимизируют другое.
184
+ Мост принимает только запросы с токеном сопряжения. Расширение просит `debugger`, а не
185
+ `<all_urls>`, и не внедряет content script в каждую страницу. Цена — шаг сопряжения и плашка отладки
186
+ Chrome. Взамен право выдаётся на вкладку и на время сессии, а запросы читаются там, где они сделаны:
187
+ учётные данные не покидают браузер.
189
188
 
190
189
  ## Ограничения
191
190
 
package/README.zh-CN.md CHANGED
@@ -56,8 +56,8 @@ site_capture → captures/<host>/<timestamp>/
56
56
  xhr/fetch(含请求头与请求体),全部写成智能体可读的文件。自动化的作用是让「这个选择器可用」和
57
57
  「这个 BFF 调用能带着我的 Cookie 通过」在活页面上被验证,而不是被假设。
58
58
 
59
- 实际后果:如果只是让智能体浏览网页,专门的自动化插件会提供更多工具,这很正常——它解决的是另一个
60
- 问题。如果要写嵌入某个具体网站的扩展,你需要抓取,而输入能力随之而来。
59
+ 实际后果:本项目是为编写面向某个具体网站的扩展而做的,输入工具用来在活页面上验证这些工作,而不是
60
+ 用来浏览网页。
61
61
 
62
62
  ## 环境要求
63
63
 
@@ -147,11 +147,11 @@ site_inject {js:"..."} → 在页面中执行你的脚本以验证
147
147
  - **仅回环。** 网桥只绑定 `127.0.0.1`,任何没有 32 字节配对令牌的请求都会被拒绝。`site_status` 打印的是令牌文件路径,而不是令牌本身。
148
148
  - **残余风险。** 请求头与请求体仍会经过 DSH 进程的内存。如果站点把密钥放在非常规字段名下,脱敏无法识别。请像对待任何流量转储一样,把快照包视为敏感数据。
149
149
 
150
- ### 关于信任的取舍
150
+ ### 信任模型
151
151
 
152
- 这是有意的权衡,而不是优越性声明。网桥要求令牌,扩展申请 `debugger` 而不是 `<all_urls>`:代价是
153
- 便利性——需要配对步骤、Chrome 会显示调试提示条——换来更小的爆炸半径。省略令牌或申请全站权限的插件
154
- 并没有做错,它们优化的是另一件事。
152
+ 网桥只接受携带配对令牌的请求。扩展申请 `debugger` 而不是 `<all_urls>`,也不会向每个页面注入
153
+ content script。代价是配对步骤与 Chrome 的调试提示条。换来的是:权限按标签页、按会话授予,请求在
154
+ 产生的地方被读取,凭据不离开浏览器。
155
155
 
156
156
  ## 限制
157
157
 
@@ -2,7 +2,7 @@
2
2
  "manifest_version": 3,
3
3
  "default_locale": "en",
4
4
  "name": "__MSG_appName__",
5
- "version": "0.4.0",
5
+ "version": "0.4.1",
6
6
  "description": "__MSG_appDesc__",
7
7
  "minimum_chrome_version": "116",
8
8
  "permissions": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-site-bridge",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Chrome/Edge MV3 bridge for DeepSeek Harness: capture page markup (DOM, styles, selectors) and BFF traffic (xhr/fetch with headers and bodies) into a workspace snapshot bundle, drive the page with trusted CDP input, and verify injected scripts. Authorization never leaves the browser and is never written to disk.",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",