Feature 全景 · Platform Feature Map (F1–F18)
Fabric AI Framework 的 specs/features/ 目录定义了 18 个 Feature 领域,覆盖从前端集成到后端治理的完整平台能力。以下是全景索引。
📄 specs/features/*.md
| ID | Feature | 核心内容 | 本文详述 |
|---|---|---|---|
| F1 | Portal Integration | Copilot 面板在 Fabric Portal 中的嵌入、路由、iframe 托管 | — |
| F2 | Conversations | 多轮对话、消息渲染、SSE streaming | — |
| F3 | Session Storage | 会话持久化、OneLake / DB 双后端 | — |
| F4 | Session Context | 上下文注入:workspace、artifact、user profile | — |
| F5 | Session Instructions | 共享 workspace 级指令 artifact | — |
| F6 | Agent Selection | Agent Mode vs Ask Mode 切换 | — |
| F7 | Model Support | 多模型获取策略:Capacity / BYOG / BYOM | §7 |
| F8 | Change Approval | Approval Cards、post-execution review toolbar | — |
| F9 | Copilot Item | Copilot Item 作为存储/配置/计费容器 | §2 |
| F10 | Workload Frontend Session API | 编程式 pane/session 控制 | — |
| F11 | Workload Extension Skills | Workload 贡献 skill 的注册与治理 | §4 |
| F12 | Workload Extension Remote MCP | 远程 MCP server 注册与 auth 注入 | §4 |
| F13 | Inline Tool UI Platform | Rich in-chat 组件(图表、表格、表单) | — |
| F14 | Workload Extension Evaluation | Skills/Tools 回归测试平台 | — |
| F15 | Agent Execution Environment | ADC sandbox、SDK 集成、工具清单 | §5 |
| F16 | Billing & Metering | CU-based 计费、token 计量、PAYG | §6 |
| F17 | Copilot Governance | Tenant/Workspace 治理策略、模型/Skills 审批 | §7 |
| F18 | Telemetry & Observability | OCV 反馈、usage dashboards、tracing | — |
📌 本页聚焦 F9、F11/F12、F15、F16、F17 以及跨 Feature 的架构设计,UX 层(F1–F4、F8、F13)详见 UX 代码分析。
Copilot Item 与 Session · Copilot Item & Session Model
Copilot Item 是 Fabric AI Framework 中的核心 artifact,承担三个角色。
📄 specs/building-blocks/copilot-item.md · specs/features/09-copilot-item.md · engineering/010-architecture/010-!!-architecture.md
2.1 Copilot Item 的三重角色
存储容器 Session 数据(消息、状态、附件)持久化到 Copilot Item 下的 OneLake 路径。每个 workspace 自动创建一个 Copilot Item(auto-create on first use)。
配置载体 Copilot Item 承载 workspace 级配置:可用模型、启用的 skills、session instructions、权限策略。
计费锚点 所有 session 计费归属到 Copilot Item 所在的 workspace capacity。Copilot Item = 计费上下文的 root。
2.2 Copilot Item 配置维度
| 维度 | 内容 | 说明 |
|---|---|---|
| Permissions | RBAC 权限模型 | 继承 workspace 角色:Admin / Member / Contributor / Viewer 映射到 Copilot 操作权限 |
| Metadata | Item 元数据 | Display name、description、Git integration(CI/CD 支持版本控制) |
| Identity | 身份与 auth | Delegated identity(用户身份传递到 backend)或 service identity |
| Model Config | 模型选择 | 默认模型、可用模型列表、BYOM endpoint 配置 |
| Plugin Config | Skills 启用 | 启用/禁用的 skills 列表、workload extension skills 注册 |
2.3 Session 设计原则
💡 D-12: Sessions are private by default. — Session 数据默认仅对创建者可见。Admin 可通过治理策略获得访问权,但需要显式授权。
- Session 与 Copilot Item 的关系:1 Copilot Item → N Sessions。Session 归属于创建时的 Copilot Item,不可迁移。
- Session 与 User 的关系:Session 绑定创建者 identity。其他用户无法访问(除非 admin 显式配置共享)。
- Session 状态隔离:每个 Session 有独立的 conversation history、tool state、agent context,互不干扰。
2.4 Session 生命周期状态机
📌 Auto-suspend 是成本优化的关键机制 — active session 的 compute 按 CU-seconds 计费,suspend 后仅计 storage 费用。
服务架构与职责分工 · Service Architecture & Responsibilities
Fabric Copilot 的服务架构分为四层,每层有明确的职责边界。
📄 engineering/010-architecture/010-!!-architecture.md · engineering/010-architecture/011-sessions-responsibilities.md
3.1 四层架构
3.2 职责划分
| 层级 | 组件 | 职责 |
|---|---|---|
| Shared Services | MWC / ADC Platform | Session CRUD、用户认证(MSAL token 验证)、请求路由到正确 container、billing event 上报、OneLake 持久化 |
| MWC | Managed Workload Controller | Copilot Item 管理、session 生命周期、container 编排、capacity 检查(HTTP 402 拦截)、message routing |
| Container | ADC Sandbox | GitHub Copilot SDK 运行、agent conversation loop、tool invocation、skill loading、MCP server hosting、代码执行 |
| Browser | fabric-chat React App | UI 渲染、SSE 消费、PostMessage bridge 与 Angular shell 通信、用户输入处理 |
3.3 通信路径与认证
| 路径 | 协议 | 认证方式 | 说明 |
|---|---|---|---|
| Browser → Shared | REST + SSE | MSAL Bearer Token (delegated) | 用户身份,从 Angular shell 通过 PostMessage 获取 token |
| Shared → Container | Container API (REST) | App-only Token | 系统身份,非用户 token。Container 内部所有操作都在隔离 sandbox 中 |
| Container → External | HTTPS (egress proxy) | SecretRef Token Injection | ADC egress proxy 自动注入 secrets。Container 本身无持久化 credential |
| Browser ↔ Angular Shell | PostMessage | Origin 校验 | Token 获取、theme、artifact search、navigation、OneDrive picker |
💡 安全边界:Container 是零信任的 — 不持有任何长期 credential,所有外部调用通过 egress proxy 注入 token。这确保了即使 container 被攻破,攻击面也被限制在单个 session 的生命周期内。
Skills & Plugin 模型 · Skills & Plugin Architecture
Fabric AI Framework 采用 单一 Plugin 模型(Single Plugin Model),所有 skill 通过统一注册和路由机制加载到 agent。
📄 specs/building-blocks/plugin.md · specs/building-blocks/plugin-contribution.md · engineering/060-agent/066-skills-loading.md
4.1 单一 Plugin 模型(D-8)
💡 D-8: Single Plugin Model. — 每个 Copilot session 加载一个统一的 Plugin,该 Plugin 内部包含所有可用的 skills。不存在多 Plugin 并行的架构。
这意味着:
- 所有 workload 贡献的 skills 被合并到单一 Plugin 中
- Agent 看到的是一个扁平的 tool 列表,不感知 skill 来源
- Skill 的启用/禁用通过 Copilot Item 配置控制
4.2 Context-Aware Skill 路由
| 上下文信号 | 路由行为 | 示例 |
|---|---|---|
| Active Artifact | 优先加载与当前打开 artifact 类型匹配的 skills | 打开 Notebook → 加载 Spark/Python skills;打开 Report → 加载 DAX/Visualization skills |
| Workspace Workloads | 根据 workspace 中已安装的 workload 加载对应 skills | Workspace 有 Data Factory → 加载 Pipeline skills |
| User Role | 根据用户在 workspace 中的角色过滤可用 skills | Viewer 角色 → 隐藏写操作相关 skills |
| Governance Policy | 根据 tenant/workspace 治理策略过滤 skills | Admin 禁用了某些 skills → 不加载 |
4.3 SKILL.md 格式
每个 skill 通过 SKILL.md 文件定义,使用 YAML frontmatter + Markdown body:
---
name: fabric-sql-query
description: Execute SQL queries against Fabric SQL endpoints
version: 1.2.0
workload: data-warehouse
requires:
- mcp-server: fabric-sql-endpoint
permissions:
- read:warehouse
- execute:query
---
# Fabric SQL Query Skill
You can execute SQL queries against any Fabric SQL endpoint
in the current workspace.
## Usage
- User asks to query data → use `execute_sql` tool
- Always validate query before execution
- Return results in markdown table format
4.4 Skills vs MCP Tools vs Agent Tools
| 概念 | 定义 | 注册方式 | 生命周期 |
|---|---|---|---|
| Skills | 高层业务能力,包含 instructions + tool 组合 | SKILL.md 文件,通过 virtual FS 或 workload extension 注册 |
Session 级动态加载,可按上下文切换 |
| MCP Tools | MCP 协议定义的标准工具接口 | MCP Server 注册,远程或本地 | Container 级,随 container 启动加载 |
| Agent Tools | Agent 运行时内置工具 | SDK 内置,不可外部注册 | 永久可用,所有 session 共享 |
⚠️ 动态 Skill 切换尚未解决 — engineering/060-agent/067-skills-dynamic-switching.md 标记为 unresolved。当前 skill 在 session 创建时加载,运行中切换存在状态一致性问题。
Agent 运行时 & 工具 · Agent Runtime & Tools
Agent 运行在 ADC(Azure Data Container)sandbox 中,基于 GitHub Copilot SDK 构建。
📄 engineering/060-agent/063-agent-tools.md · engineering/060-agent/065-agent-design.md · specs/features/15-agent-execution-environment.md
5.1 默认工具清单(16 Tools)
| # | 工具名 | 类别 | 功能 |
|---|---|---|---|
| 1 | report_intent | Agent 协调 | 向用户报告当前意图,更新 UI 状态 |
| 2 | sql | 数据操作 | 执行 SQL 查询(Fabric SQL endpoint) |
| 3 | task | Agent 协调 | 启动子 agent 执行复杂任务 |
| 4 | read_agent | Agent 协调 | 读取后台 agent 结果 |
| 5 | write_agent | Agent 协调 | 向 idle agent 发送消息 |
| 6 | list_agents | Agent 协调 | 列出所有活跃后台 agent |
| 7 | grep | 文件系统 | 在文件内容中搜索模式 |
| 8 | glob | 文件系统 | 按模式查找文件 |
| 9 | view | 文件系统 | 查看文件/目录内容 |
| 10 | edit | 文件系统 | 编辑文件(string replacement) |
| 11 | create | 文件系统 | 创建新文件 |
| 12 | powershell | 执行环境 | 运行 PowerShell / bash 命令 |
| 13 | web_fetch | 网络 | 获取 URL 内容(HTML → Markdown) |
| 14 | web_search | 网络 | AI-powered web 搜索 |
| 15 | manage_schedule | 调度 | 创建/管理定时任务 |
| 16 | skill | Skills | 调用注册的 skill |
5.2 执行环境详情
- Runtime
- ADC (Azure Data Container) — 隔离 sandbox 环境
- SDK
- GitHub Copilot SDK — conversation loop, tool invocation, streaming
- Filesystem
- FUSE-based Virtual Fabric Filesystem — 动态挂载 workspace 资源
- Image
- Versioned container image — 支持 rollback(tag-based versioning)
- Networking
- Egress-only via proxy — 无入站连接,所有外部调用通过 egress proxy
- Lifecycle
- Session-bound — container 随 session 创建分配,idle 后 suspend/释放
5.3 Virtual Fabric Filesystem (FUSE)
Container 内部通过 FUSE 挂载一个虚拟文件系统,将 Fabric 资源映射为文件路径:
/fabric/
├── workspace/
│ ├── artifacts/ # Workspace 中的 artifacts 列表
│ │ ├── notebook-1.ipynb
│ │ ├── report-1.pbix
│ │ └── ...
│ ├── skills/ # 已注册的 skills(SKILL.md 文件)
│ │ ├── sql-query/SKILL.md
│ │ ├── spark-execute/SKILL.md
│ │ └── ...
│ └── config/ # Copilot Item 配置
│ ├── models.json
│ └── governance.json
├── session/
│ ├── history/ # 当前 session 的对话历史
│ └── state/ # Session state(tool state, checkpoints)
└── user/
└── profile.json # 用户 profile 信息
📌 FUSE 文件系统让 agent 可以使用标准文件操作(view、grep、glob)来发现和访问 Fabric 资源,无需 workload-specific API 集成。
Billing 计费架构 · Billing & Metering
Fabric AI Framework 的计费体系涵盖三类资源的成本归属和计量。以下内容基于 fabric-ai-framework 仓库中的 spec 文档。
📄 specs/building-blocks/billing.md · specs/features/16-billing-platform.md · engineering/900-fundamentals/904-fundamentals-billing.md
6.1 计费核心原则
💡 All billing happens in the context of the workspace where the session is stored. — 所有计费都发生在 session 所在 workspace 的上下文中。Cost 归属遵循 workspace → capacity → tenant 层级链。
6.2 三类计费资源 (Billable Resource Categories)
| 资源类别 | 计量单位 | 计费来源 | 说明 |
|---|---|---|---|
| Model Inference (LLM 推理) |
Input/Output tokens | LLM provider response metadata | 仅 Fabric Capacity Models 走 Fabric 计费(消耗 CU);BYOG/BYOM 路径不走 Fabric 计费 |
| MCP Tool & API 操作 | 现有资源计量 | 各 Fabric 资源自有 billing | AI 触发的操作 等同于用户直接触发,无额外 AI 附加费。MCP tool 执行本身不单独计费 |
| Compute 执行 | CU-seconds (CPU × 时长) | ADC sandbox 运行时间 | Spark job、SQL 查询等后端计算,每 60 秒上报一次 CU-seconds |
另外,Session Storage(会话历史存储)也产生计费,按 GB 计量,会话删除后停止计费。
6.3 模型获取策略 vs 计费路径
| 获取策略 | Billing Model | 说明 |
|---|---|---|
| Fabric Capacity Models | Billed through Capacity | 消耗 workspace Fabric capacity 的 Capacity Units (CUs)。唯一产生 Fabric 收入的模型路径 |
| Bring Your Own GitHub Copilot (BYOG) | BYOL | 用户使用自有 GitHub Copilot 订阅。无 Fabric 计费,成本归属于 GitHub 订阅 |
| Bring Your Own Model Endpoint (BYOM) | BYOL | 用户自带 Azure AI Foundry 或 Cloud Foundry 实例。无 Fabric 计费,成本归属于外部服务 |
⚠️ Key Rule:只有 Fabric Capacity Models 通过 Fabric capacity 计费。所有其他模型获取策略的 LLM 费用对 Fabric 计费系统透明。Finance 和 PM 必须确保计费模型能处理同一 tenant 使用多种获取策略的混合场景。
6.4 容量要求 & 准入控制
- 最低容量:Session 创建需要 workspace 所在 capacity 为 F0 (PAYG) 或 F64+
- 无 Capacity 时拦截:若 Copilot item 未分配 Fabric Capacity,session 创建被 HTTP 402 拒绝,并显示错误信息 + capacity 设置链接
- Copilot Capacity 是 tenant 级别的,跨 capacities 共享,admin 通过 security groups 映射
6.5 计费事件上报 (Feature Spec User Stories)
| Story | 场景 | 行为 |
|---|---|---|
| F16-S2 | LLM Token 计量 | 每次 LLM 调用后:Fabric Capacity Model → post llm_tokens billing event;BYOG/BYOM → 不发送 Fabric billing event。从 LLM response metadata 提取 token count,计量准确率 ≥99% |
| F16-S3 | Compute 计量 | Session active 期间每 60 秒向 Fabric Billing API 上报 Compute CU-seconds。计费时钟从 environment active 开始,到 idle/teardown 结束 |
| F16-S4 | Storage 计量 | 会话历史存在期间,workload 按标准间隔 post storage metering events。删除 session 立即停止 storage 计费 |
| F16-S5 | 消费归属 | 所有 CU 和 token 消费 归属到 Copilot item 所在 capacity。无 fallback 到 tenant 级 capacity |
| F16-S6 | 报表可见性 | AI token 和 CU 消费 出现在标准 Fabric capacity utilization report 中,含 per-workspace breakdown,无需额外配置 |
6.6 避免双重收费 (No Double-Charging)
这是计费设计中的 核心约束:
- MCP tool 触发的 Fabric API 操作 按现有规则计费(如 DW 查询消耗 CU),不额外加收 AI 附加费
- 只有 最近的 emitting operation 应该收费 — parent/child 或跨 API 调用不能重复计量
- BYOG Copilot 和 BYOM 路径 仅计 compute + storage,不计 LLM token 费用
6.7 Itemless / Workspace-less 挑战
Unified Copilot 的一大计费挑战是 session 不绑定单一 item 或 workspace:
- OneLake 目前是 item-centric → 对 session 级存储有摩擦
- 解决方案:引入 virtual artifact / virtual workspace 概念,用于在没有传统 Fabric item 的情况下进行计量
- 跨 workspace 操作必须显式处理 cost attribution
6.8 待解决问题 (Open Questions)
OQ-5 Cross-Charge Billing & CU Metering
- 谁付费? — user capacity / workspace capacity / tenant?
- CU 计量粒度? — LLM 推理 vs 数据处理的 CU 消耗比率
- 跨 workspace 场景 — skill 跨多个 workload / resource 时的 cost attribution
Prerequisite: Cost Attribution ID 基础设施(telemetry contract)必须先实现
OQ-6 Pay-As-You-Go (PAYG) 定价模型
- 什么触发 PAYG 计费? — per-token? per-execution? per-compute-job?
- PAYG 与 Capacity-based 的关系? — 并存还是替代?
- 定价透明度? — 执行前是否需要估算 token 成本?
- 计费频率? — per-session / daily / monthly?
Impact: PAYG 需要实时成本估算、用户通知、budget caps/alerts
6.9 约束与要求
| 级别 | 要求 |
|---|---|
| Must | 计费始终在 session 所在 workspace 上下文中发生 |
| Must | 仅 Fabric Capacity Models 通过 Fabric 计费 — BYOG/BYOM 外部处理 |
| Must | Cost attribution telemetry 必须标记 workspace ID、session ID、user identity |
| Must | Skills 触发的 compute 必须归属到 session 的 workspace capacity |
| Should | 向 workspace 管理员提供 cost visibility(AI 相关 CU 消耗 dashboard) |
| Should | 支持 budget alerts — 接近 capacity 限制时预警 |
| Should | 执行前向用户展示预估成本(如果 PAYG 模型可行) |
| Avoid | 无用户同意的跨 workspace 计费 |
| Avoid | 无上限的成本暴露 — PAYG 必须有 caps/alerts/approval workflows |
| Avoid | 不透明计费 — 用户应能追溯到具体 session 或 skill 执行 |
6.10 已确认决策 (2026-04-20 Meeting)
| # | 决策 | 说明 |
|---|---|---|
| 1 | CU-based billing | Copilot 所有资源(compute、storage、LLM)统一使用 CU 计费 |
| 2 | Virtual artifact / workspace | 为 itemless Copilot 探索 virtual artifact 模型以支持计量 |
| 3 | Capacity-based > Serverless | Capacity-based 计费优先于 serverless,保证可预测性和隔离性 |
| 4 | Public Preview 必须有 billing | 不可例外 — 无计费不能发 public preview |
📌 Owner: Teddy Bercovitz(Billing spec owner),与 Finance + GitHub PM 协作。详见 specs/building-blocks/billing.md 和 meetings/2026-04-20 Fabric Copilot Billing.md。
Governance & 模型管理 · Governance & Model Management
Fabric AI Framework 的治理体系覆盖从 tenant 到 workspace 的三层控制,以及模型获取的三条路径。
📄 specs/building-blocks/governance.md · specs/building-blocks/models.md · specs/features/17-copilot-governance.md
7.1 三层治理层级
7.2 治理域 (6 Domains)
| Domain | 治理范围 | 控制粒度 | 示例 |
|---|---|---|---|
| Copilot Access | 谁能使用 Copilot | Tenant / Workspace | Admin 可完全禁用 Copilot for tenant,或限制特定 workspace |
| Model Governance | 哪些模型可用 | Tenant / Workspace | Approved model list、BYOM endpoint 白名单、默认模型设置 |
| Skills Governance | 哪些 skills 可用 | Tenant / Workspace | 启用/禁用特定 workload skills、第三方 skills 审批 |
| Data Governance | 数据访问范围 | Workspace / Session | Agent 可访问的 artifact 范围、数据分类标签遵从 |
| Action Governance | 哪些操作需要审批 | Workspace / Session | 写操作需要 approval card 确认、高风险操作需要 admin 审批 |
| Audit & Compliance | 操作记录与合规 | Tenant | 所有 agent 操作的 audit log、数据驻留合规、retention 策略 |
7.3 模型获取策略 (3 Paths)
| 策略 | 模型来源 | 计费 | 治理 |
|---|---|---|---|
| Fabric Capacity Models | Fabric 内置 LLM 服务 | CU-based(Fabric capacity 扣减) | Fabric 管理模型版本与可用性 |
| BYOG | 用户 GitHub Copilot 订阅 | GitHub 订阅计费 | 用户自行管理订阅,Fabric 仅校验 token 有效性 |
| BYOM | Azure AI Foundry / Cloud Foundry | 外部服务计费 | Admin 配置 endpoint + credentials,tenant 级白名单 |
💡 BYOM-first 策略的理由:Private Preview 阶段优先支持 BYOM,因为 (1) 无需 Fabric billing 集成即可上线,(2) 企业客户通常已有 Azure AI 资源,(3) 模型选择灵活性满足不同 compliance 需求。Fabric Capacity Models 随 GA 逐步推出。
生态集成 & 边界 · Ecosystem Integration & Boundaries
Fabric AI Framework 定义了清晰的 Builder / Consumer 角色边界,以及与 GitHub Copilot 生态的集成关系。
📄 specs/building-blocks/ecosystem-integration.md · engineering/300-frontend/300-!!-frontend-dev-design.md
8.1 Builder vs Consumer 角色
| 维度 | Builder(Workload 团队) | Consumer(终端用户) |
|---|---|---|
| 身份 | Fabric workload 开发者、ISV 合作伙伴 | Fabric workspace 中的数据分析师、工程师 |
| 接触面 | Skills SDK、MCP server 注册、Plugin contribution API | Copilot chat pane、Approval Cards、session management |
| 治理角色 | 提交 skills/tools 供审批,遵从 quality gates | 使用 admin 批准的 skills/models,遵从 workspace 策略 |
| Billing 视角 | Skill 执行 compute 计入 consumer 的 workspace capacity | 承担 session 产生的所有费用(LLM + compute + storage) |
| 开发工具 | VS Code + Copilot CLI(本地开发/测试 skills) | Fabric Portal(浏览器内 Copilot 交互) |
8.2 与 GitHub Copilot 的边界 (D-7)
💡 D-7: GitHub Copilot = SDK provider, not a competing product. — Fabric Copilot 使用 GitHub Copilot SDK 作为核心引擎,但 UX、session 管理、billing、governance 完全由 Fabric 控制。
| 能力 | GitHub Copilot SDK 提供 | Fabric 平台提供 |
|---|---|---|
| Conversation Loop | ✅ 消息处理、tool invocation、streaming | Session 管理、持久化、resume |
| Model Access | ✅ BYOG 路径(GitHub token) | Fabric Capacity Models、BYOM 路径 |
| Tool Framework | ✅ Tool registration、invocation protocol | Fabric-specific tools(SQL、OneLake、governance) |
| UX | ❌ 不提供 — SDK 是 headless | ✅ 完整 Chat UX(fabric-chat React app) |
| Billing | ❌ 不涉及 Fabric billing | ✅ CU-based billing、capacity management |
| Governance | ❌ 无 enterprise governance | ✅ Tenant/Workspace 级治理策略 |
8.3 前端 CopilotHostService 架构
Fabric Portal 前端通过 CopilotHostService 为 workload 提供编程式 Copilot 集成:
通过 CopilotHostService,workload 前端可以:
- 打开/关闭 Copilot 面板,并传入特定上下文
- 发送预填充消息(如 "Diagnose this error" + error context)
- 监听 session 事件(创建、结束、approval 请求)
- 注入 artifact context(当前打开的 notebook/report/pipeline 信息)
📌 关键集成模式:Workload 不直接与 agent 通信 — 所有交互通过 CopilotHostService → PostMessage → fabric-chat → Shared Services 链路。这保证了安全隔离和统一治理。