forked from ChaiHao/BPOS-MVP
基线:鉴权会话+工作组+工作台三区修复+编排工作区+产品设计文档
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
This commit is contained in:
@@ -1,4 +1,11 @@
|
||||
/**
|
||||
* Hono 的请求上下文变量 —— 单独成文件,避免 server 与 routes 互相 import 成环(§0.1 第 3 条)。
|
||||
*/
|
||||
export type AppEnv = { Variables: { account: string } };
|
||||
import type { Session } from '@contracts';
|
||||
|
||||
/**
|
||||
* 请求上下文(ADR-010)。
|
||||
* `session` 由鉴权中间件从**服务端会话表**解出 —— 不再有「cookie 里写谁就是谁」的明文身份;
|
||||
* `account` 保留为便捷读法,值恒取自已核验的会话,免鉴权路由上为空串。
|
||||
*/
|
||||
export type AppEnv = { Variables: { account: string; session: Session | undefined } };
|
||||
|
||||
Reference in New Issue
Block a user