Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
04371e0
feat(native-messaging): Add Native Messaging Host with MCP Server for…
May 24, 2026
1091cf8
Merge branch 'main' into pr/1465
cyfung1031 Jul 11, 2026
09e15ce
refactor(mcp): remove prelim native-messaging implementation
cyfung1031 Jul 11, 2026
8595ea7
feat(build): MCP build gate + mcp_enabled device-local config
cyfung1031 Jul 11, 2026
8c8fac3
feat(mcp): shared bridge protocol types
cyfung1031 Jul 11, 2026
5f50bc1
feat(mcp): extension services (repos, URL policy, approval, bridge)
cyfung1031 Jul 11, 2026
a060a90
feat(mcp): controller lifecycle, UI-facing endpoints, service worker …
cyfung1031 Jul 12, 2026
4632b55
feat(mcp): native host package scaffold + shared/native/auth core mod…
cyfung1031 Jul 12, 2026
060c813
feat(mcp): broker rate limiting (windowed limiter, concurrency, auth …
cyfung1031 Jul 12, 2026
31182b0
feat(mcp): broker socket layer — HMAC challenge, IPC endpoint, sessio…
cyfung1031 Jul 12, 2026
5c68117
feat(mcp): host<->browser channel and shim socket client
cyfung1031 Jul 12, 2026
89bf3e0
feat(mcp): shim tool catalog, source resource, official SDK server wi…
cyfung1031 Jul 12, 2026
569ffd0
feat(mcp): host.ts + shim.ts entrypoints, real ESM module resolution fix
cyfung1031 Jul 12, 2026
189467a
feat(mcp): typed manifest generation + per-platform installers
cyfung1031 Jul 12, 2026
a9e9b44
feat(mcp): Tools settings card, i18n, and a real build-time exclusion…
cyfung1031 Jul 12, 2026
29986ca
feat(build): pack.js MCP profile support and hard store-build assertions
cyfung1031 Jul 12, 2026
0f10068
feat(mcp): install.html MCP banner and approval wiring
cyfung1031 Jul 12, 2026
dbada12
feat(mcp): add mcp_confirm approval page for enable/disable/delete
cyfung1031 Jul 12, 2026
351c605
feat(mcp): wire pairing dialog and host client.sync mirroring
cyfung1031 Jul 12, 2026
984d5b5
docs(mcp): commit PROTOCOL.md, THREAT-MODEL.md, store-review package;…
cyfung1031 Jul 12, 2026
23cc1e0
test(mcp): add no-listener/no-network structural proofs; hide MCP on …
cyfung1031 Jul 12, 2026
d0da780
test(mcp): raise auth/broker/native coverage to doc 08 §11's 90% bar
cyfung1031 Jul 12, 2026
0dd0a5f
test(mcp): add host.ts/shim.ts entrypoint tests
cyfung1031 Jul 12, 2026
5a58f28
fix(mcp): implement --rollback; fix install.sh bash-3.2 incompatibility
cyfung1031 Jul 12, 2026
ef0b2ab
test(mcp): raise bridge/approval/url_policy coverage to doc 08 §11's …
cyfung1031 Jul 12, 2026
545ed73
feat(mcp): implement source_disclosure — first-use-per-client consent…
cyfung1031 Jul 12, 2026
4ecbeaf
feat(mcp): render pairing dialog in-page when the options tab is open
cyfung1031 Jul 12, 2026
edf0239
docs(mcp): add end-user MCP bridge usage guide
cyfung1031 Jul 12, 2026
ebcb9b9
docs(mcp): remove workspace/.ref-docs citations from extension-side c…
cyfung1031 Jul 12, 2026
5644cfc
docs(mcp): remove workspace/.ref-docs citations from native-host prod…
cyfung1031 Jul 12, 2026
249c913
docs(mcp): remove workspace/.ref-docs citations from native-host test…
cyfung1031 Jul 12, 2026
8a1031a
docs(mcp): remove remaining workspace/.ref-docs and prelim references
cyfung1031 Jul 12, 2026
b3c19f2
docs(mcp): add native-messaging-host README/LICENSE and zh-CN bridge …
cyfung1031 Jul 12, 2026
f452b7c
CI fix
cyfung1031 Jul 12, 2026
643a8ad
✅ 修复 Native Host 路径测试的跨平台兼容性
cyfung1031 Jul 12, 2026
4dcd1ad
Merge branch 'main' into pr/ScriptCat-MCP-Bridge
cyfung1031 Jul 14, 2026
fa25d25
Merge branch 'main' into pr/ScriptCat-MCP-Bridge
cyfung1031 Jul 17, 2026
2e8821c
fix
cyfung1031 Jul 17, 2026
23861a3
Update test.yaml
cyfung1031 Jul 17, 2026
bd130e5
♻️ MCP 协议层 WS 化:action 9→6、operations.* 移除、protocol.json 单源
CodFrm Jul 17, 2026
210607f
♻️ MCP 传输层 WS 化:offscreen WebSocket client + 双向 HMAC 握手,替换 Native Mes…
CodFrm Jul 17, 2026
6b82a77
✨ MCP 扩展侧收尾:写审批阻塞化 + 设置 UI + sctl-cli 身份 + 7 语言包
CodFrm Jul 18, 2026
4a066e6
📝 MCP 文档改写:Native Messaging → sctl/WS,清理死链与失效构建门
CodFrm Jul 18, 2026
46f9874
Merge remote-tracking branch 'origin/main' into pr1573/mcp-bridge-ws
CodFrm Jul 20, 2026
1c74781
Merge branch 'main' into pr/ScriptCat-MCP-Bridge
cyfung1031 Jul 20, 2026
a25b044
Merge PR #1573 head into WS 重构分支
CodFrm Jul 20, 2026
7bc1a10
🎨 修正 mcp/types.ts 的 prettier 格式
CodFrm Jul 20, 2026
d9a665e
🐛 修复 bridge.request/cancel 的 requestId 取错层导致调用永不返回
CodFrm Jul 20, 2026
fb670b6
🐛 MCP 状态胶囊订阅 mcpStatusChanged,配对后无需刷新页面
CodFrm Jul 20, 2026
5046c10
🐛 sctl CLI 内建身份在批准链路上被判成已撤销客户端
CodFrm Jul 20, 2026
9fcf6d5
🐛 写会话开关刷新后误显示为关,禁用确认页按钮误显示为启用
CodFrm Jul 20, 2026
e003d9d
Merge remote-tracking branch 'origin/main' into pr1573/mcp-bridge-ws
CodFrm Jul 21, 2026
cca7d2d
✅ 补齐 MCP 工具页测试客户端桩
CodFrm Jul 21, 2026
2def266
♻️ 合并 main 并解决保活功能冲突
CodFrm Jul 21, 2026
fdd7526
Merge branch 'main' into pr/ScriptCat-MCP-Bridge
CodFrm Jul 21, 2026
99e98a0
💚 修复 storageName 跨上下文 E2E 就绪竞态
CodFrm Jul 21, 2026
3bb5718
Merge remote-tracking branch 'origin/main' into pr/ScriptCat-MCP-Bridge
CodFrm Jul 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/DOC-MAINTENANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ of sanitization patterns can otherwise look like matches — so don't rely on a
| [`architecture.md`](./architecture.md) | Deep internals: process model, message passing; subsystem deep-dives split to [`references/architecture-services.md`](./references/architecture-services.md), [`references/architecture-data.md`](./references/architecture-data.md), [`references/architecture-gm-api.md`](./references/architecture-gm-api.md), [`references/architecture-execution.md`](./references/architecture-execution.md), [`references/architecture-build.md`](./references/architecture-build.md), [`references/architecture-agent.md`](./references/architecture-agent.md). |
| [`cloud-sync.md`](./cloud-sync.md) | Cloud sync internals: sync files, digest/status semantics, provider differences, error classification, retry policy. |
| [`translation.md`](./translation.md) | Translation / localization single source of truth. |
| [`mcp-bridge-guide.md`](./mcp-bridge-guide.md) | End-user how-to for the MCP bridge: install sctl, enable, pair (extension↔daemon + MCP client), tool table, CLI verbs, worked examples. Security rationale lives in the sctl repo's `THREAT-MODEL.md`/`PROTOCOL.md` — link, don't duplicate. `mcp-bridge-guide_zh-CN.md` is its zh-CN translation — keep in sync via [`translation.md`](./translation.md), don't fork content. |
| [`DOC-MAINTENANCE.md`](./DOC-MAINTENANCE.md) | This guide: doc-set organization rules, fact-check / anti-drift discipline, and policy-consistency checks — for every tracked agent/contributor Markdown file, not just `AGENTS.md` + `docs/*`. |
| [`README.md`](./README.md) | The index that points to all of the above. |
| `.github/copilot-instructions.md` | Copilot-specific entry point and any genuine tool-specific differences; shared facts (architecture, commands, testing, design, translation, PR mechanics) route to the owning doc above instead of being copied. |
Expand Down
10 changes: 10 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@
| [`cloud-sync.md`](./cloud-sync.md) | 云同步实现说明:同步文件语义、主流程、状态合并、provider 差异、错误分类、retry 策略和维护注意事项。 |
| [`DOC-MAINTENANCE.md`](./DOC-MAINTENANCE.md) | 文档维护与事实核对指南:组织规则、逐条核对清单、跨文档政策一致性核对、隐私清理、以及在 resolved final tree 上的复核方法,覆盖全部 tracked 的 agent/contributor Markdown(不止 `AGENTS.md` + `docs/*`,还包括 `.github/*.md`、package-local README)。**改/审文档前先读。** |

## MCP 桥接 / MCP Bridge

内置于所有构建、**默认关闭**,从扩展设置开启;经本地伴随二进制 [`sctl`](https://github.com/scriptscat/sctl)(WebSocket daemon,仅回环 `127.0.0.1:8643`)通信,不新增浏览器权限、无 native-messaging 主机与安装器。

| 文档 | 说明 |
| --- | --- |
| [`mcp-bridge-guide.md`](./mcp-bridge-guide.md) | 使用指南:安装 sctl、启用桥接、两条配对(扩展↔daemon、MCP 客户端)、授权的实操步骤,附 6 个 MCP 工具、CLI 动词与真实用例(读取源码、请求安装、启停、删除脚本、撤销客户端)。**想实际用起来先读这份。**中文版见 [`mcp-bridge-guide_zh-CN.md`](./mcp-bridge-guide_zh-CN.md)。 |
| [`sctl` 仓库 `PROTOCOL.md`](https://github.com/scriptscat/sctl/blob/main/PROTOCOL.md) | 协议规范:扩展↔daemon WS 双向握手、扩展/客户端配对、bridge action、错误码、写操作阻塞语义。常量单源 `protocol.json` 与本仓库 [`src/app/service/service_worker/mcp/protocol.json`](../src/app/service/service_worker/mcp/protocol.json) 逐字节镜像(由 `protocol.conformance.test.ts` 守护)。 |
| [`sctl` 仓库 `THREAT-MODEL.md`](https://github.com/scriptscat/sctl/blob/main/THREAT-MODEL.md) | 威胁模型:两个信任锚点(长期密钥 K + 0600 控制令牌)、攻击面与对策、写路径人工审批 + TOCTOU、落盘凭据一览。 |

## 翻译 / Translation

| 文档 | 说明 |
Expand Down
13 changes: 13 additions & 0 deletions docs/develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,19 @@ using it — including links already shipped in installed builds, which keep sen

After `pnpm run dev`, load `dist/ext` as an unpacked extension. The browser hot-reloads page changes, but edits to `manifest.json`, `service_worker`, `offscreen`, or `sandbox` require reloading the extension.

### The MCP bridge

The MCP bridge (`src/app/service/service_worker/mcp/`) is **built into every profile and gated only
at runtime** by `mcp_enabled` (`SystemConfig`, device-local, off by default) — there is no build-time
flag and no `nativeMessaging` permission (both were removed when the transport moved to WebSocket).
It connects, from an offscreen WebSocket client (`src/app/service/offscreen/mcp-connect.ts`), to a
local companion binary [`sctl`](https://github.com/scriptscat/sctl) — a loopback-only WS daemon on
`127.0.0.1:8643`; the extension never listens on a port itself. Protocol constants are single-sourced
in [`mcp/protocol.json`](../src/app/service/service_worker/mcp/protocol.json), mirrored byte-for-byte
with the sctl repo and guarded by `protocol.conformance.test.ts`. See
[`mcp-bridge-guide.md`](./mcp-bridge-guide.md) for usage, and the sctl repo's `PROTOCOL.md` /
`THREAT-MODEL.md` for the wire protocol and security design.

## Project Structure & Module Organization

Core entry points live in `src` (`service_worker.ts`, `content.ts`, `inject.ts`, `offscreen.ts`, `sandbox.ts`). UI pages are in `src/pages`, with shared UI in `src/pages/components` and state in `src/pages/store`. Reusable domain code is in `src/pkg`; app services are in `src/app`; templates are in `src/template`; assets and translations are in `src/assets` and `src/locales`. Workspace packages live in `packages`, including browser mocks and filesystem adapters. Unit tests are colocated as `*.test.ts`/`*.test.tsx` or placed in `tests`; E2E specs are in `e2e`.
Expand Down
Loading
Loading