Skip to content

Onboarding + Config Protocol

用途:在 CLI、macOS 应用与 Web UI 之间,共享 onboarding 与配置相关的交互界面。

组件

  • 向导引擎(共享的会话 + prompts + onboarding 状态)。
  • CLI onboarding 与 UI 客户端使用同一套向导流程。
  • Gateway RPC 暴露向导与配置 schema 端点。
  • macOS onboarding 使用向导 step 模型。
  • Web UI 基于 JSON Schema + UI hints 渲染配置表单。

Gateway RPC

  • wizard.start 参数:{ mode?: "local"|"remote", workspace?: string }
  • wizard.next 参数:{ sessionId, answer?: { stepId, value? } }
  • wizard.cancel 参数:{ sessionId }
  • wizard.status 参数:{ sessionId }
  • config.schema 参数:{}

返回(结构)

  • Wizard:{ sessionId, done, step?, status?, error? }
  • Config schema:{ schema, uiHints, version, generatedAt }

UI Hints

  • uiHints 以 path 为 key;包含可选元数据(label/help/group/order/advanced/sensitive/placeholder)。
  • 敏感字段使用 password 输入框渲染;不提供单独的脱敏层。
  • 不支持的 schema 节点会回退为原始 JSON 编辑器。

备注

  • 本文档是追踪 onboarding/config 协议重构的唯一位置。