跳到主要内容

ARC 2.0.0-beta.25

Frame、bridge 与嵌入 surface

只有信任、origin 与 runtime 边界明确时才使用 frame、bridge 与 surface。

嵌入跨越了信任边界,需要比“一个页面能显示另一个页面”更窄的声明。

interactive AUP Web session 中的 frame 与 bridge

本节描述 interactive AUP Web-session renderer。在这条 renderer 路径中,frame 用于隔离的 document context 或受控嵌入。window.aup capability bridge 只有在 frame 显式启用 bridge、可信且同源时才可用。第三方嵌入默认应隔离;bridge 不是通用跨域 SDK。

Web Device document target 是另一条路径。它的 static frame output 和 Markdown 内容嵌入不会建立 window.aup bridge、parent session 或通用的 data/action 访问。除非有独立的 interactive-session 合同,否则把文档中的 frame 当作第三方内容。

启用前,应在审阅中明确这些决定:

  1. 哪一个精确 origin 被信任?
  2. embed 可访问哪些 data path 和 action?
  3. session lifetime、parent/child message 与失败如何处理?
  4. 哪个 browser/device target 实际通过了目标交互?

interactive AUP Web session 中的 surface

在 interactive AUP Web-session renderer 中,surface 可以呈现 AFS path,或连接 remote AUP endpoint。nested-session 行为仍取决于 runtime 和 connection context。不要只因 surface node 能 parse 就承诺任意 remote endpoint、跨域 transport 或嵌套 event flow 都能工作。

terminal 是独立的 WebSocket terminal widget,不是 AUP protocol 本身。因此它应有自己的 endpoint、authorization 与 lifecycle review,不能继承一条笼统的 AUP 信任声明。

第一版文档已有一条直接的 document-target input 示例,但它不使用 frame、bridge 或 surface。完整 runtime demo 在进入 reference page 前,仍须有独立 origin、最小权限的 data scope 与 browser acceptance。