Skip to content

Delivery:Frontstage Callable multipart 与二进制资源协议 #1399

Description

@JAVA-LW

2026-07-21:AC-025 superseding delta

本 Delivery 的媒体调用不再依赖持久化 binding 或独立 binary binding 元数据。源码统一传 { interfaceId, schemaDigest };Host 使用同一个 unary dispatch 按响应 Content-Type 自适应 JSON、204 与 binary,并继续对上传 base64、下载字节和 trace 做脱敏/摘要。Catalog descriptor、目标路由权限与按次 write grant 保持后端校验。

父级

纵向结果

Frontstage 代码区块能够从完整 OpenAPI 生成并执行 multipart、octet-stream、普通二进制下载和 ZIP 下载接口,不开放任意 URL、credential 或 DOM File。

Contract

  • multipart/form-data 与 application/octet-stream 由 OpenAPI requestBody.content 决定。
  • Worker 只使用受控 FileRef / BinaryResource media envelope;宿主负责读取、编码、大小限制、取消和清理。
  • binary response 保留 status/content_type/file_name/resource,大对象不进入 Signal 总线。
  • 目标 API 继续执行原 session/PAT、CSRF、permission、workspace/resource ACL。
  • OpenAPI 缺 media/schema 时修正后端 annotation,不由前端猜测。

验收点

  • AC-BIN-001:三个真实 multipart console handler 都有准确 OpenAPI request schema,并能由生成函数调用。
  • AC-BIN-002:octet-stream archive chunk 可通过受控资源输入调用。
  • AC-BIN-003:文件内容与 logs ZIP 下载返回受控 BinaryResource,保留 media metadata。
  • AC-BIN-004:越权、超限、无效 FileRef、取消和清理均 fail closed,且不会泄漏 credential/path。
  • AC-BIN-005:桌面与 390px Studio 可搜索、绑定、插入并观测一次真实 media 调用。

Work Packet 边界

  • OpenAPI media truth:相关 route annotation、openapi_interface/catalog 与真实性 fixture。
  • Backend media dispatcher:受控 media request/response envelope 与 integration fixture。
  • Frontend runtime/codegen:api-client、Page Protocol/Runtime、OpenAPI codegen 与最近测试。
  • 不修改 Agent Flow application-key、任意网络策略、Page Signal 持久化或 [Root] Frontstage 代码区块浏览器运行时编排与加载体验 #1382 Worker budget。

集中验证

本 Delivery 的代码与 fixture 先装配进 Root assembly,不做独立 QA;Root 冻结后由唯一集中 Test Batch 验证。

停止条件

  • 继续实现必须开放任意 URL/credential/DOM 或绕过目标 API 权限。
  • media 语义只能由前端猜测而不能来自 OpenAPI。

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:apiPublic API or protocol contract workarea:backendBackend API, service, repository, or runtime workarea:frontendFrontend UI or interaction workarea:runtimeRuntime and execution behaviorchild-issueChild implementation issuecontractContract or API semantics changegrade:g3Cross-domain decision or implementation workneeds-backendNeeds backend workneeds-frontendNeeds frontend workphase:implementationImplementation in progressplan:treeLong plan with one Root and vertical Delivery issuesrisk:highHigh risk if implemented incorrectlysize:lLarge implementation and review sizetype:featureFeature or new capability

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions