新增本机 Agent Bridge 采集流程#22
Open
MisonL wants to merge 49 commits into
Open
Conversation
df42ade to
9c2076a
Compare
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

功能用途
这个 PR 新增的 Agent Bridge,主要是让本机 AI Agent 能在用户授权后读取当前浏览器里的真实页面体验,并生成一份可复用的页面 profile。它不是替代普通技术栈检测,而是给 Agent 提供更完整的页面上下文。
典型使用场景:
Skill 相关
这次也新增了 repo-local skill:
agent-skill/stackprism-site-experience。它的作用是把 Agent Bridge 封装成 Agent 可直接使用的采集流程:启动本机 bridge、打开目标页面、等待扩展回传 profile,并把结果整理成适合 Coding Agent 阅读的页面体验摘要。这个 skill 包含:
capture-site.mjs等采集脚本,支持输出 profile JSON 和可选截图文件。当前验证边界:这个 repo-local skill 已在 Codex 上做过实际使用验证;Claude、Gemini 等其他 Agent 工具还没有验证效果。
做了什么
这次 PR 新增了一个默认关闭的本机 Agent Bridge 流程。用户明确开启后,本机 Agent 可以通过当前浏览器 profile 采集目标页面的技术栈、首屏结构、交互路径、资产线索和可选截图,最后生成适合 Agent 阅读的页面体验 profile。
主要改动包括:
agent-skill/stackprism-site-experience,包含 Node bridge、Python fallback、采集脚本、profile schema 和使用说明。安全与边界
127.0.0.1,不开放外网监听。http:和https:页面;私网、localhost 等目标默认阻断,必须显式允许。验证
已在 rebase 到最新
upstream/main后通过以下检查:git diff --checkpython3 -m py_compile agent-skill/stackprism-site-experience/scripts/stackprism_bridge.py agent-skill/stackprism-site-experience/scripts/stackprism_bridge_lib/*.pypnpm run test:unit,357 passedpnpm run lintpnpm run typecheck,包含生产构建当前分支相对
upstream/main为0 behind / 49 ahead,PR 状态为 mergeable。