update: 编辑整理文档 tasks
MemRelay-Operation: curated-update:4f9233e4-3180-4133-ae70-faff5e7c58c7:4 MemRelay-Resource: 4f9233e4-3180-4133-ae70-faff5e7c58c7
This commit is contained in:
+67
@@ -0,0 +1,67 @@
|
||||
---
|
||||
title: Metrix 主体架构与历史插件边界
|
||||
type: curated
|
||||
permalink: main/projects/d5a7f581-c442-4554-87b9-ee723b8b0258/curated/development/metrix-主体架构与历史插件边界
|
||||
stable_id: 44fc1143-7dee-4e0a-8086-42b65f39e0de
|
||||
scope: project
|
||||
project_id: d5a7f581-c442-4554-87b9-ee723b8b0258
|
||||
workspace_type: development
|
||||
usage_profile_id: null
|
||||
preference_context: development
|
||||
document_type: architecture
|
||||
revision: 4
|
||||
source_memory_ids: []
|
||||
source_checkpoint_ids: []
|
||||
source_file_ids: []
|
||||
source_git_commit: e660bc7bb4fc5ccda47decb4d514874a148ed9b2
|
||||
source_git_commits:
|
||||
- e660bc7bb4fc5ccda47decb4d514874a148ed9b2
|
||||
source_agent_sync_ids: []
|
||||
model_connection: Sub2API
|
||||
model_name: manual
|
||||
source_count: 29
|
||||
source_revisions: {}
|
||||
source_dispositions:
|
||||
processed: 29
|
||||
unchanged: 0
|
||||
unsupported: 0
|
||||
skipped: 0
|
||||
cited_source_ids:
|
||||
- git:server/app/main.py
|
||||
- git:server/app/modules/registry.py
|
||||
- git:server/app/core/permissions.py
|
||||
- git:server/app/core/security.py
|
||||
- git:server/app/db/init.py
|
||||
- git:server/app/migrations/registry.py
|
||||
job_cited_source_ids: []
|
||||
conflicts: []
|
||||
supersedes: []
|
||||
preferences: []
|
||||
source_cursor: 162
|
||||
source_hash: e2fcea7c8a9e0df7a91925fb2a9beabd922058868310effc908f95df2d78b218
|
||||
prompt_version: 2026-08-12.3
|
||||
schema_version: '3'
|
||||
curation_job_id: null
|
||||
created_at: '2026-09-23T15:09:30.147437+00:00'
|
||||
updated_at: '2026-10-08T08:07:42.933722+00:00'
|
||||
tags:
|
||||
- curated
|
||||
- manual
|
||||
restored_from_commit: 6a6a895eafcca6052e81a14fca103a42635dd1c2
|
||||
---
|
||||
|
||||
# Metrix 主体架构
|
||||
|
||||
当前开发范围仅server/web(主体收敛提交3dc801a)。plugins是历史独立Git项目,不在主体模块扫描范围,本阶段不读取/修改/测试/启动,不展开其实现或假定与未来主体兼容。
|
||||
|
||||
server/app/main.py为FastAPI工厂、CORS、模块router、本地Swagger资源和web/dist托管。server/app/modules/registry.py扫描APP_MODULE并校验key/版本/依赖,加载router/model/权限/迁移/生命周期;web/src/modules/registry.ts发现*/index.ts生成页面菜单。内置core/storage/database/containers/scripts/pypi/demo_crud属于主体模块,不是暂停的plugins项目。
|
||||
|
||||
core/deps.py区分Web/API Token,action:<resource>:<action>执行RBAC,read页面入口,manage_others跨用户;Token复用角色权限,require_web_session限制管理接口。security为PBKDF2-SHA256、Token哈希和Fernet。api_enabled来自数据库系统设置。
|
||||
|
||||
db/session.py首次连接sync_database进行建表、模块迁移/字段/权限种子同步,migrations/registry.py为自有迁移机制。FastAPI固定0.136.3,升级需验证新include_router行为与旧操作名迁移。
|
||||
|
||||
database/jobs.py导入导出使用线程池,scripts/scheduler.py使用APScheduler;脚本执行器线程池或独立线程+Docker,不自动pull镜像。记录保留hours默认168和每项目count默认100,各自0关闭该限制。
|
||||
|
||||
前端Vue3/TS/Naive UI/i18n/Monaco+Shiki/xterm,SQL及脚本编辑器已有明暗主题监听。storage提供FTP/SFTP,containers管理当前宿主Docker,pypi管理内网包源。
|
||||
|
||||
开发启动仅根.venv+web依赖、dev.py的backend/web两个进程8000/5173,--check仅主体预检。pytest/Playwright产物在Temp。当前源码、文档和MemRelay保持同步,历史四进程约定不再适用。
|
||||
Reference in New Issue
Block a user