oh-my-muse/muse-studio
lili a3b45ae6b5 feat(handoff): P0 统一基座——Market token 核验/核销端口 + 前端 HandoffStore/落地路由
handoff 跨空间统一接入执行版 P0(基座,前后端共享):
- 后端 market-api 新增 MarketHandoffTokenApi(verify 只读核验 + consume CAS 核销)+ market-server
  实现:复用现有 selectByTokenHash/effectiveStatus/updateLifecycleByExpectedStatus + cancel 同款
  envelope 幂等;consume 沿用调用方事务保原子(绿地:completed 状态此前无生产写入路径)。出参脱敏不回 token。
- 前端:openapi 导出 Handoff 类型;HandoffStore(Zustand,token 一次性用完即弃 + precheck 会话态);
  通用 hooks(create/status/cancel);落地路由 /handoff/land/:targetOwner(红线:解析 token→
  replaceState 清 URL→存 store,防刷新重复消费)。

验证:market 编译+install+BcBoundaryArchTest 绿;前端 tsc/eslint 绿、vitest 82→89(+handoffStore 5
+HandoffLandingPage 2)。verify/consume 真实行为(拒伪造/过期/跨属主 token + CAS 核销 + DB)随 P1
knowledge 端到端真后端 e2e 覆盖。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 09:02:52 -07:00
..

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...

      // Remove tseslint.configs.recommended and replace with this
      tseslint.configs.recommendedTypeChecked,
      // Alternatively, use this for stricter rules
      tseslint.configs.strictTypeChecked,
      // Optionally, add this for stylistic rules
      tseslint.configs.stylisticTypeChecked,

      // Other configs...
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:

// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...
      // Enable lint rules for React
      reactX.configs['recommended-typescript'],
      // Enable lint rules for React DOM
      reactDom.configs.recommended,
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])