Live

Workspace

Org scope, candidate read and explicit workspace switching are live.

LiveContract-first UITenant scope visibleNo direct brain-core call

P1 / Workspace

Workspace

workspace 页面联调组织、成员、seat、模块与 candidate read;scope 切换继续只走显式 platform action。

Phase 2 / Live APILive API
Route Contractworkspace

State markers stay explicit for SSR smoke, recovery handling and route ownership checks.

Platform fact

Members

1

当前 workspace membership 读模型返回的成员总数

Seat posture

Seats remaining

0

1 used of 0

Module access

Enabled modules

0

当前 scope 已可进入的模块数量

Switcher read

Switch candidates

Session only

candidate read 只对 session 开放,admin scope 继续只读联调。

Workspace Scope

组织、workspace 和当前 membership 只显示平台正式返回字段,不在前端改写租户语义。

Console Local OrgActive

org_id: org_20260417140628_0002

Console Local Org WorkspaceActive

workspace_id: ws_20260417140628_0003

membership_role: Owner

membership_user_id: user_20260417140628_0001

Workspace Switch

候选列表直接消费 `GET /api/workspace/candidates`,切换仍只通过显式 `POST /api/workspace/switch` 写入口进入。

Switch surfaceRead only

当前 bearer 不是 session,workspace switch 继续保持只读。

Current beareradmin

若要验证 workspace switch,请改用 session bearer。

GuardrailExplicit action

当前页面不把 `workspace switch` 写成读接口副作用,也不在前端缓存里偷偷改 scope。

Candidate sourceSession-only

workspace candidate read 当前只对 session 开放。admin 或 api_key bearer 仍只能联调当前 active workspace 的只读事实。

当前读取需要 session bearer

workspace candidate read 当前只对 session 开放。admin 或 api_key bearer 仍只能联调当前 active workspace 的只读事实。

  • current_bearer_kind: admin
  • required_bearer_kind: session
  • 请改用有效 session bearer 再重试。

Workspace Modules

完整模块入口列表来自 `GET /api/me/modules`,`modules_summary` 只继续承担摘要角色。

No modules returned

当前 workspace 还没有可展示的模块入口记录。

Members

成员列表当前只承接正式 membership 读模型,不伪造邀请流和角色管理动作。

MemberRoleStatusUser ID
Console Local Userconsole-local@example.commem_20260417140628_0004OwnerActiveuser_20260417140628_0001

Workspace Boundaries

当前页面只消费平台正式读写面,不会再把 workspace 成员表、本地缓存或 query 参数伪装成 scope 真相。

Candidate listPlatform only

候选 workspace 只来自 `GET /api/workspace/candidates`,不会再从 `workspace members` 或历史切换记录反推。

Active scopePlatform-owned

当前 active workspace 仍只能由 `POST /api/workspace/switch` 结果和后续 stable reads 回读确认,前端不会偷偷先改本地状态。

Module entries come from platformContract

模块可见性与入口完全来自 `GET /api/me/modules`,不在前端根据订单、权益或推荐结果自行推导。

Read API #1

GET /api/workspace

Read API #2

GET /api/workspace/members

Read API #3

GET /api/me/modules

Read API #4

GET /api/workspace/candidates

Write API

POST /api/workspace/switch